This commit is contained in:
liushiwei
2024-10-25 18:33:21 +08:00
17 changed files with 113528 additions and 1276 deletions

View File

@@ -21,6 +21,24 @@ Vue.prototype.$base = "https://seller.kuajingmaihuo.com"
Object.keys(utils).forEach(v => Vue.prototype[`$${v}`] = utils[v])
Vue.prototype.$http = instance
utils.initWindow()
Vue.directive('throttle', {
bind: function (el, obj) {
let timerId = null
let flag = true
el.addEventListener('input', function () {
if (!flag) return
flag = false
timerId && clearTimeout(timerId)
timerId = setTimeout(function () {
flag = true
obj.value()
}, 800)
})
}
})
new Vue({
store,