Vue.js El-switch 点击openAccess() 后延迟5秒回弹初始值
<el-switch style="display: inline-block" v-model="checked" active-color="#ff4949" inactive-color="#0fbdf0" @change="openAccess()"> methods: { openAccess() { w51_event("changeAccess", this.id + "_" + this.checked); setTimeout(() => { this.checked = !this.checked; }, 5000); }, }, data() { return { checked: true, status: "", id: "--", }; },
原文地址: https://www.cveoy.top/t/topic/pX0z 著作权归作者所有。请勿转载和采集!