shijiplus-web-plugin 0.1.49 → 0.1.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/extentionPlugin/view.js +13 -13
package/package.json
CHANGED
|
@@ -13,15 +13,20 @@ const install = (vue, opts = {}) => {
|
|
|
13
13
|
return instance.show(config)
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
const removeVComp = (
|
|
17
|
-
|
|
18
|
-
vComp.$children.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
vComp.$el.parentNode
|
|
16
|
+
const removeVComp = (topComp) => {
|
|
17
|
+
const execFun = (vComp) => {
|
|
18
|
+
if (vComp.$children && vComp.$children.length) {
|
|
19
|
+
vComp.$children.forEach(item => {
|
|
20
|
+
execFun(item)
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
if (vComp.$el.parentNode) {
|
|
24
|
+
vComp.$el.parentNode.removeChild(vComp.$el)
|
|
25
|
+
}
|
|
24
26
|
}
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
execFun(topComp)
|
|
29
|
+
}, 500)
|
|
25
30
|
}
|
|
26
31
|
vue.prototype.$removeVComp = removeVComp
|
|
27
32
|
const getComponentInstance = (component, options) => {
|
|
@@ -43,11 +48,6 @@ const install = (vue, opts = {}) => {
|
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
vue.prototype.$getComponentInstance = getComponentInstance
|
|
46
|
-
vue.prototype.$importComponentInstance = async (compPath, options) => {
|
|
47
|
-
const component = await import(compPath)
|
|
48
|
-
const instance = this.$getComponentInstance(component.default)
|
|
49
|
-
return instance
|
|
50
|
-
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export default {
|