Commit d703c9d6 by LJM

库存管理/优势货源:新增需做重复多次点击限制

parent 878e9a9e
......@@ -14,3 +14,4 @@ export default {
}, false);
},
}
export default {
bind(el, binding) {
el.addEventListener('click', e => {
console.log(e)
if (!el.disabled) {
el.disabled = true
el.style.cursor = 'not-allowed'
setTimeout(() => {
el.style.cursor = 'pointer'
el.disabled = false
}, 3000)
}
})
},
}
import Vue from 'vue'
import BackTopDirective from './backTop';
import dbClick from './dbClick';
export default {
install (Vue) {
install(Vue) {
Vue.directive('backTop', BackTopDirective);
Vue.directive('dbClick', dbClick);
}
}
......@@ -162,7 +162,7 @@
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="addBestgoods.dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="addBestgoodsSubmit">确 定</el-button>
<el-button type="primary" @click="addBestgoodsSubmit" v-dbClick>确 定</el-button>
</div>
</el-dialog>
<el-dialog title="修改优势货源" :close-on-click-modal="false" :visible.sync="addBestgoods.dialogVisibleUpdate" width="1000px">
......@@ -436,7 +436,6 @@ export default {
var self = this;
if (this.addBestgoodsParam.length > 0) {
for (let i = 0; i < this.addBestgoodsParam.length; i++) {
if (!this.addBestgoodsParam[i].goods_name) {
this.$message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment