fix:处理loading unbind 报错
This commit is contained in:
@@ -106,9 +106,14 @@ export const myLoading = {
|
|||||||
bind: myLoadingFunction,
|
bind: myLoadingFunction,
|
||||||
update: myLoadingFunctionUpdate,
|
update: myLoadingFunctionUpdate,
|
||||||
unbind: function (el, binding) {
|
unbind: function (el, binding) {
|
||||||
const dsBox = el.getElementsByClassName('my-loading-box')[0]
|
let divBox = ''
|
||||||
if (dsBox) {
|
el.children.forEach((item) => {
|
||||||
el.removeChild(dsBox)
|
if (item.className.indexOf('my-loading-box') !== -1) {
|
||||||
|
divBox = item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (el && divBox) {
|
||||||
|
el.removeChild(divBox)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user