vue-mount-plugin 1.0.0 → 1.1.0
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/dist/index.cjs +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +3 -3
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mount-plugin v1.
|
|
2
|
+
* vue-mount-plugin v1.1.0
|
|
3
3
|
* A simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0
|
|
4
4
|
* (c) 2021-2023 saqqdy
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -18,7 +18,7 @@ class Mount {
|
|
|
18
18
|
this.seed = 1;
|
|
19
19
|
if (typeof document === 'undefined') throw new Error('This plugin works in browser');
|
|
20
20
|
this.options = options;
|
|
21
|
-
this.target = options.target || document.createElement('div');
|
|
21
|
+
this.target = (typeof options.target === 'string' ? document.querySelector(options.target) : options.target) || document.createElement(options.tagName || 'div');
|
|
22
22
|
this.vNode = this.createVM(component, options);
|
|
23
23
|
}
|
|
24
24
|
createVM(component, _temp) {
|
|
@@ -39,7 +39,7 @@ class Mount {
|
|
|
39
39
|
parent,
|
|
40
40
|
propsData: props
|
|
41
41
|
});
|
|
42
|
-
vNode.id = '
|
|
42
|
+
vNode.id = 'mount-plugin-' + this.seed++;
|
|
43
43
|
return vNode;
|
|
44
44
|
} else {
|
|
45
45
|
vNode = vueDemi.createVNode(component, props, children, patchFlag, dynamicProps, isBlockNode);
|
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vue-mount-plugin v1.
|
|
2
|
+
* vue-mount-plugin v1.1.0
|
|
3
3
|
* A simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0
|
|
4
4
|
* (c) 2021-2023 saqqdy
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -16,7 +16,7 @@ class Mount {
|
|
|
16
16
|
this.seed = 1;
|
|
17
17
|
if (typeof document === 'undefined') throw new Error('This plugin works in browser');
|
|
18
18
|
this.options = options;
|
|
19
|
-
this.target = options.target || document.createElement('div');
|
|
19
|
+
this.target = (typeof options.target === 'string' ? document.querySelector(options.target) : options.target) || document.createElement(options.tagName || 'div');
|
|
20
20
|
this.vNode = this.createVM(component, options);
|
|
21
21
|
}
|
|
22
22
|
createVM(component, _temp) {
|
|
@@ -37,7 +37,7 @@ class Mount {
|
|
|
37
37
|
parent,
|
|
38
38
|
propsData: props
|
|
39
39
|
});
|
|
40
|
-
vNode.id = '
|
|
40
|
+
vNode.id = 'mount-plugin-' + this.seed++;
|
|
41
41
|
return vNode;
|
|
42
42
|
} else {
|
|
43
43
|
vNode = createVNode(component, props, children, patchFlag, dynamicProps, isBlockNode);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-mount-plugin",
|
|
3
3
|
"description": "A simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"packageManager": "pnpm@7.26.1",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"prettier": "prettier --write \"**/*.{js,ts,jsx,tsx,yml,json,md}\""
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"core-js": "^3.
|
|
49
|
+
"core-js": "^3.28.0",
|
|
50
50
|
"js-cool": "^2.8.0",
|
|
51
51
|
"vue-demi": "^0.13.11"
|
|
52
52
|
},
|
|
@@ -54,37 +54,37 @@
|
|
|
54
54
|
"@babel/core": "^7.20.12",
|
|
55
55
|
"@babel/preset-env": "^7.20.2",
|
|
56
56
|
"@babel/preset-typescript": "^7.18.6",
|
|
57
|
-
"@eslint-sets/eslint-config-ts": "^
|
|
58
|
-
"@microsoft/api-extractor": "^7.34.
|
|
57
|
+
"@eslint-sets/eslint-config-ts": "^5.0.0",
|
|
58
|
+
"@microsoft/api-extractor": "^7.34.4",
|
|
59
59
|
"@rollup/plugin-alias": "^4.0.3",
|
|
60
60
|
"@rollup/plugin-babel": "^6.0.3",
|
|
61
61
|
"@rollup/plugin-commonjs": "^24.0.1",
|
|
62
62
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
63
63
|
"@rollup/plugin-typescript": "^11.0.0",
|
|
64
64
|
"@types/jest": "^29.4.0",
|
|
65
|
-
"@types/node": "^18.
|
|
65
|
+
"@types/node": "^18.13.0",
|
|
66
66
|
"chalk": "^5.2.0",
|
|
67
67
|
"coveralls": "^3.1.1",
|
|
68
68
|
"cross-env": "^7.0.3",
|
|
69
|
-
"eslint": "^8.
|
|
69
|
+
"eslint": "^8.34.0",
|
|
70
70
|
"fast-glob": "^3.2.12",
|
|
71
|
-
"jest": "^29.4.
|
|
71
|
+
"jest": "^29.4.2",
|
|
72
72
|
"load-yml": "^1.2.0",
|
|
73
73
|
"npm-run-all": "^4.1.5",
|
|
74
|
-
"prettier": "^2.8.
|
|
75
|
-
"prettier-config-common": "^1.
|
|
74
|
+
"prettier": "^2.8.4",
|
|
75
|
+
"prettier-config-common": "^1.4.0",
|
|
76
76
|
"reinstaller": "^2.3.0",
|
|
77
77
|
"rimraf": "^4.1.2",
|
|
78
|
-
"rollup": "^3.
|
|
78
|
+
"rollup": "^3.15.0",
|
|
79
79
|
"rollup-plugin-filesize": "^9.1.2",
|
|
80
80
|
"rollup-plugin-visualizer": "^5.9.0",
|
|
81
81
|
"ts-jest": "^29.0.5",
|
|
82
82
|
"tsnd": "^1.1.0",
|
|
83
|
-
"typedoc": "^0.23.
|
|
83
|
+
"typedoc": "^0.23.25",
|
|
84
84
|
"typedoc-plugin-markdown": "^3.14.0",
|
|
85
85
|
"typescript": "^4.9.5",
|
|
86
86
|
"vue": "^3.2.47",
|
|
87
|
-
"vue2": "npm:vue
|
|
87
|
+
"vue2": "npm:vue@^2.7.14",
|
|
88
88
|
"zx": "^7.1.1"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|