1234567891011121314151617181920212223242526272829303132333435 |
- export default{
- data(){
- },
- methods: {
- randomString(encode = 36, number = -8) {
- return Math.random() // 生成随机数字,
- .toString(encode) // 转化成36进制
- .slice(number)
- }
- }
- // install(Vue){
- // //这里是示例方法 getTime是方法名 function()可以携带参数
- // Vue.prototype.getTime = function(val,fun,title){
- // this.$confirm(val, '提示', {
- // confirmButtonText: '确定',
- // cancelButtonText: '取消',
- // type: 'warning'
- // }).then(() => {
- // fun
- // this.$message({
- // type: 'success',
- // message: title+'成功!'
- // });
- // }).catch(() => {
- // this.$message({
- // type: 'info',
- // message: '已取消'+title
- // });
- // });
- // }
- // }
-
- }
|