NEZ-1726 feat: loading 动画优化 添加 unbind事件
This commit is contained in:
@@ -102,10 +102,9 @@ export const myLoading = {
|
|||||||
bind: myLoadingFunction,
|
bind: myLoadingFunction,
|
||||||
update: myLoadingFunctionUpdate,
|
update: myLoadingFunctionUpdate,
|
||||||
unbind: function (el, binding) {
|
unbind: function (el, binding) {
|
||||||
const className = binding.arg || 'bars1'
|
const dsBox = el.getElementsByClassName('my-loading-box')[0]
|
||||||
const ds = el.getElementsByClassName(className)[0]
|
if (dsBox) {
|
||||||
if (ds) {
|
el.removeChild(dsBox)
|
||||||
el.removeChild(ds)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user