let text = [] for (i = 0; i < 4; i++) {
text.push(letter[Math.floor(Math.random() * 36)])
}
return text
},
randomDeg (min, max, f) { // 设置文字倾斜角度
f = undefined ? Math.random() > 0.5 ? 1 : -1 : 1
return f * (Math.random() * (max - min) + min)
},
next () {
this.draw()
}
}
}
</script>
<style scoped>
</style>
样式什么的自己可以调一调,效果如下:

更多教程点击《Vue.js前端组件学习教程》,欢迎大家学习阅读。
关于vue.js组件的教程,请大家点击专题vue.js组件学习教程进行学习。










