- 博客(6)
- 收藏
- 关注
原创 获取[n,m]之间随机数
获取[n,m]之间随机数该方法能获取[n,m]之间随机数getRandom(n, m) { //该方法能产生[n,m]之间随机数 let result = Math.floor(Math.floor(Math.random() * (m - n + 1) + n)); return result;},
2021-11-05 17:11:07
134
原创 vue倒计时
data() { return { h:23,//时 m:59,//分 s:59,//秒 countdown:'24:00:00',//倒计时 timer:null,//重复执行 }, onLoad(){ this.timer = setInterval(()=>..
2020-10-28 10:43:03
125
原创 vue 防止路由重复点击报错
在router/index.js中添加如下代码importVuefrom'vue'importRouterfrom'vue-router'Vue.use(Router)//防止路由重复点击报错,constoriginalPush=Router.prototype.pushRouter.prototype.push=functionpush(location){returnoriginalPush.call(this,location...
2020-08-17 10:53:11
579
原创 vue折叠面板的实现
<view class="content-item" v-for="(item,index) in list" :key="index"> <view class="content-title"> <view>{{item.name}}</view> <image @click="isShowTextImg(index)" class="right-img" v-if="!item.showContent" src="../../../../static/images/mobil
2020-07-08 16:32:51
2222
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人