@reviewpush/rp-treeselect 0.0.7 → 0.0.9
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/rp-treeselect.cjs.js +3 -7
- package/dist/rp-treeselect.cjs.js.map +1 -1
- package/dist/rp-treeselect.cjs.min.js +1 -1
- package/dist/rp-treeselect.cjs.min.js.map +1 -1
- package/dist/rp-treeselect.umd.js +3 -7
- package/dist/rp-treeselect.umd.js.map +1 -1
- package/dist/rp-treeselect.umd.min.js +1 -1
- package/dist/rp-treeselect.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/HiddenFields.vue +1 -0
- package/src/components/MenuPortal.vue +6 -3
- package/src/components/Option.vue +5 -1
- package/src/components/Treeselect.vue +2 -4
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import
|
|
2
|
+
import { inject, createApp } from 'vue'
|
|
3
3
|
import { watchSize, setupResizeAndScrollEventListeners, find } from '../utils'
|
|
4
4
|
import Menu from './Menu'
|
|
5
5
|
|
|
6
6
|
const PortalTarget = {
|
|
7
7
|
name: 'rp-treeselect--portal-target',
|
|
8
|
-
|
|
8
|
+
setup() {
|
|
9
|
+
const instance = inject('instance')
|
|
10
|
+
return { instance }
|
|
11
|
+
},
|
|
9
12
|
|
|
10
13
|
watch: {
|
|
11
14
|
'instance.menu.isOpen'(newValue) {
|
|
@@ -152,7 +155,7 @@
|
|
|
152
155
|
const el = document.createElement('div')
|
|
153
156
|
document.body.appendChild(el)
|
|
154
157
|
|
|
155
|
-
this.portalTarget =
|
|
158
|
+
this.portalTarget = createApp({
|
|
156
159
|
el,
|
|
157
160
|
parent: this,
|
|
158
161
|
...PortalTarget,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import { inject } from 'vue'
|
|
2
3
|
import { UNCHECKED, INDETERMINATE, CHECKED } from '../constants'
|
|
3
4
|
import { onLeftClick } from '../utils'
|
|
4
5
|
import Tip from './Tip'
|
|
@@ -8,7 +9,10 @@
|
|
|
8
9
|
|
|
9
10
|
const Option = {
|
|
10
11
|
name: 'rp-treeselect--option',
|
|
11
|
-
|
|
12
|
+
setup() {
|
|
13
|
+
const instance = inject('instance')
|
|
14
|
+
return { instance }
|
|
15
|
+
},
|
|
12
16
|
|
|
13
17
|
props: {
|
|
14
18
|
node: {
|
|
@@ -68,10 +68,6 @@
|
|
|
68
68
|
export default {
|
|
69
69
|
name: 'rp-treeselect',
|
|
70
70
|
|
|
71
|
-
setup() {
|
|
72
|
-
provide('instance', this)
|
|
73
|
-
},
|
|
74
|
-
|
|
75
71
|
props: {
|
|
76
72
|
/**
|
|
77
73
|
* Whether to allow resetting value even if there are disabled selected nodes.
|
|
@@ -906,6 +902,8 @@
|
|
|
906
902
|
created() {
|
|
907
903
|
this.verifyProps()
|
|
908
904
|
this.resetFlags()
|
|
905
|
+
|
|
906
|
+
provide('instance', this)
|
|
909
907
|
},
|
|
910
908
|
|
|
911
909
|
mounted() {
|