Merge branch 'label' of https://gitee.com/three-make-money/temu-plugin into label
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user