shijiplus-web-plugin 0.1.48 → 0.1.49
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
CHANGED
|
@@ -23,7 +23,8 @@ const install = (vue, opts = {}) => {
|
|
|
23
23
|
vComp.$el.parentNode.removeChild(vComp.$el)
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
vue.prototype.$
|
|
26
|
+
vue.prototype.$removeVComp = removeVComp
|
|
27
|
+
const getComponentInstance = (component, options) => {
|
|
27
28
|
const defaultConfig = {
|
|
28
29
|
props: {}
|
|
29
30
|
}
|
|
@@ -40,7 +41,13 @@ const install = (vue, opts = {}) => {
|
|
|
40
41
|
document.body.appendChild(instance.$el)
|
|
41
42
|
return instance
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
|
|
45
|
+
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
|
+
}
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
export default {
|