热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_43879922
阿尔博特邦
5 年前
trueweixin_43879922

2021年的12月23号,今天中午要补个觉,然后就去学习了,目标是星辰大海,当下只是开始,寒假要去提升,目标很远大,得从小入手

每日读书打卡
CSDN App 扫码分享
分享
评论
1
打赏
  • 复制链接
  • 举报
下一条:
vue 按钮点击10S后在进行请求1、 <el-button icon="el-icon-s-opportunity" type="info" :disabled="abledBut" size="mini" @click="batchVerify" v-hasPermi="['system:buyer:verify']">批量验证买号降权 </el-button> <el-tag style="margin-left:10px" v-if="abledBut">({{setTimeNum}}s)</el-tag>2、 data数据: abledBut: false, //是否禁止 setTimeNum: 10, // 倒计时时间 timeWrap: null, // 定时器标识3、实时监听 watch: { setTimeNum (newVal, oldVal) { if (newVal < 0) { clearInterval(this.timeWrap) this.abledBut = false this.setTimeNum = 10 } } }, 4、在按钮函数里面添加 if (this.setTimeNum > 0) { this.abledBut = true this.timeWrap = setInterval(() => { this.setTimeNum -= 1 }, 1000) }5完成 如果成功请点个赞谢谢 日常模板 而已
立即登录