NEZ-1726 feat: loading 动画优化 添加 unbind事件

This commit is contained in:
zhangyu
2022-03-25 14:43:36 +08:00
parent 4c64c41342
commit 1588b9328f

View File

@@ -102,10 +102,9 @@ export const myLoading = {
bind: myLoadingFunction,
update: myLoadingFunctionUpdate,
unbind: function (el, binding) {
const className = binding.arg || 'bars1'
const ds = el.getElementsByClassName(className)[0]
if (ds) {
el.removeChild(ds)
const dsBox = el.getElementsByClassName('my-loading-box')[0]
if (dsBox) {
el.removeChild(dsBox)
}
}
}