vxe-pc-ui 4.1.20 → 4.1.21
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/README.md +82 -1
- package/es/anchor/src/anchor-link.js +1 -1
- package/es/anchor/src/anchor.js +1 -1
- package/es/breadcrumb/src/breadcrumb.js +1 -1
- package/es/button/src/button-group.js +4 -1
- package/es/calendar/src/calendar.js +64 -32
- package/es/carousel/src/carousel-item.js +13 -3
- package/es/carousel/src/carousel.js +16 -8
- package/es/checkbox/src/checkbox.js +30 -14
- package/es/checkbox/src/group.js +17 -8
- package/es/collapse-pane/index.js +1 -1
- package/es/countdown/src/countdown.js +1 -1
- package/es/date-picker/src/date-picker.js +12 -12
- package/es/drawer/src/drawer.js +1 -1
- package/es/form/render/index.js +1 -2
- package/es/form/src/form-config-item.js +4 -3
- package/es/form/src/form-gather.js +5 -3
- package/es/form/src/form-item.js +15 -10
- package/es/form/src/form.js +11 -8
- package/es/form/src/render.js +2 -1
- package/es/form/src/util.js +2 -1
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +22 -10
- package/es/image/src/group.js +4 -1
- package/es/image/src/preview.js +1 -1
- package/es/input/src/input.js +129 -65
- package/es/layout-aside/src/layout-aside.js +1 -1
- package/es/list/src/list.js +7 -5
- package/es/list-design/src/list-design.js +1 -1
- package/es/list-design/src/list-view.js +1 -1
- package/es/loading/src/loading.js +1 -1
- package/es/menu/src/menu.js +1 -1
- package/es/number-input/src/number-input.js +6 -6
- package/es/pager/src/pager.js +85 -45
- package/es/password-input/src/password-input.js +2 -2
- package/es/print/src/page-break.js +11 -2
- package/es/print/src/print.js +6 -4
- package/es/radio/src/group.js +5 -2
- package/es/row/src/row.js +1 -1
- package/es/select/src/optgroup.js +11 -8
- package/es/select/src/option.js +9 -7
- package/es/select/src/select.js +32 -29
- package/es/select/src/util.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tabs/src/tab-pane.js +13 -3
- package/es/tabs/src/tabs.js +57 -47
- package/es/textarea/src/textarea.js +4 -4
- package/es/tooltip/src/tooltip.js +1 -1
- package/es/tree/src/tree.js +6 -3
- package/es/tree-select/src/tree-select.js +16 -9
- package/es/ui/index.js +1 -7
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +5 -5
- package/lib/anchor/src/anchor-link.js +1 -1
- package/lib/anchor/src/anchor-link.min.js +1 -1
- package/lib/anchor/src/anchor.js +1 -1
- package/lib/anchor/src/anchor.min.js +1 -1
- package/lib/breadcrumb/src/breadcrumb.js +1 -1
- package/lib/breadcrumb/src/breadcrumb.min.js +1 -1
- package/lib/button/src/button-group.js +4 -1
- package/lib/button/src/button-group.min.js +1 -1
- package/lib/calendar/src/calendar.js +42 -24
- package/lib/calendar/src/calendar.min.js +1 -1
- package/lib/carousel/src/carousel-item.js +16 -3
- package/lib/carousel/src/carousel-item.min.js +1 -1
- package/lib/carousel/src/carousel.js +18 -8
- package/lib/carousel/src/carousel.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +16 -12
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +10 -7
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/collapse-pane/index.js +1 -1
- package/lib/collapse-pane/index.min.js +1 -1
- package/lib/countdown/src/countdown.js +1 -1
- package/lib/countdown/src/countdown.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +12 -12
- package/lib/drawer/src/drawer.js +1 -1
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/form/render/index.js +1 -4
- package/lib/form/render/index.min.js +1 -1
- package/lib/form/src/form-config-item.js +4 -5
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-gather.js +11 -9
- package/lib/form/src/form-gather.min.js +1 -1
- package/lib/form/src/form-item.js +11 -12
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +7 -7
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +2 -1
- package/lib/form/src/util.js +2 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +20 -11
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/image/src/group.js +4 -1
- package/lib/image/src/group.min.js +1 -1
- package/lib/image/src/preview.js +1 -1
- package/lib/image/src/preview.min.js +1 -1
- package/lib/index.umd.js +522 -377
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +77 -50
- package/lib/input/src/input.min.js +1 -1
- package/lib/layout-aside/src/layout-aside.js +1 -1
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/list/src/list.js +9 -5
- package/lib/list/src/list.min.js +1 -1
- package/lib/list-design/src/list-design.js +1 -1
- package/lib/list-design/src/list-design.min.js +1 -1
- package/lib/list-design/src/list-view.js +1 -1
- package/lib/list-design/src/list-view.min.js +1 -1
- package/lib/loading/src/loading.js +1 -1
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/menu/src/menu.js +1 -1
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/number-input/src/number-input.js +6 -6
- package/lib/pager/src/pager.js +40 -39
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/password-input/src/password-input.js +2 -2
- package/lib/print/src/page-break.js +14 -2
- package/lib/print/src/page-break.min.js +1 -1
- package/lib/print/src/print.js +8 -6
- package/lib/print/src/print.min.js +1 -1
- package/lib/radio/src/group.js +5 -2
- package/lib/radio/src/group.min.js +1 -1
- package/lib/row/src/row.js +1 -1
- package/lib/row/src/row.min.js +1 -1
- package/lib/select/src/optgroup.js +12 -9
- package/lib/select/src/optgroup.min.js +1 -1
- package/lib/select/src/option.js +9 -7
- package/lib/select/src/option.min.js +1 -1
- package/lib/select/src/select.js +33 -32
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/src/util.js +2 -2
- package/lib/select/src/util.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tabs/src/tab-pane.js +16 -3
- package/lib/tabs/src/tab-pane.min.js +1 -1
- package/lib/tabs/src/tabs.js +62 -50
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/textarea/src/textarea.js +4 -4
- package/lib/tooltip/src/tooltip.js +1 -1
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tree/src/tree.js +2 -2
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +11 -7
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +3 -10
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +5 -5
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +2 -2
- package/packages/anchor/src/anchor-link.ts +2 -2
- package/packages/anchor/src/anchor.ts +2 -2
- package/packages/breadcrumb/src/breadcrumb.ts +2 -2
- package/packages/button/src/button-group.ts +4 -1
- package/packages/calendar/src/calendar.ts +67 -35
- package/packages/carousel/src/carousel-item.ts +19 -4
- package/packages/carousel/src/carousel.ts +19 -11
- package/packages/checkbox/src/checkbox.ts +34 -15
- package/packages/checkbox/src/group.ts +22 -10
- package/packages/collapse-pane/index.ts +1 -1
- package/packages/countdown/src/countdown.ts +2 -2
- package/packages/date-picker/src/date-picker.ts +12 -12
- package/packages/drawer/src/drawer.ts +2 -2
- package/packages/form/render/index.ts +1 -3
- package/packages/form/src/form-config-item.ts +4 -3
- package/packages/form/src/form-gather.ts +5 -3
- package/packages/form/src/form-item.ts +15 -10
- package/packages/form/src/form.ts +12 -10
- package/packages/form/src/render.ts +2 -1
- package/packages/form/src/util.ts +2 -1
- package/packages/icon-picker/src/icon-picker.ts +26 -13
- package/packages/image/src/group.ts +4 -1
- package/packages/image/src/preview.ts +2 -2
- package/packages/input/src/input.ts +133 -71
- package/packages/layout-aside/src/layout-aside.ts +2 -2
- package/packages/list/src/list.ts +12 -11
- package/packages/list-design/src/list-design.ts +2 -2
- package/packages/list-design/src/list-view.ts +2 -2
- package/packages/loading/src/loading.ts +2 -2
- package/packages/menu/src/menu.ts +2 -2
- package/packages/number-input/src/number-input.ts +6 -6
- package/packages/pager/src/pager.ts +91 -50
- package/packages/password-input/src/password-input.ts +2 -2
- package/packages/print/src/page-break.ts +18 -4
- package/packages/print/src/print.ts +10 -5
- package/packages/radio/src/group.ts +6 -3
- package/packages/row/src/row.ts +2 -2
- package/packages/select/src/optgroup.ts +16 -13
- package/packages/select/src/option.ts +10 -8
- package/packages/select/src/select.ts +42 -36
- package/packages/select/src/util.ts +3 -3
- package/packages/tabs/src/tab-pane.ts +20 -5
- package/packages/tabs/src/tabs.ts +59 -49
- package/packages/textarea/src/textarea.ts +4 -4
- package/packages/tooltip/src/tooltip.ts +2 -2
- package/packages/tree/src/tree.ts +7 -4
- package/packages/tree-select/src/tree-select.ts +20 -12
- package/packages/ui/index.ts +0 -7
- package/packages/upload/src/upload.ts +6 -6
- package/types/components/calendar.d.ts +6 -0
- package/types/components/carousel.d.ts +5 -0
- package/types/components/form.d.ts +4 -2
- package/types/components/icon-picker.d.ts +4 -0
- package/types/components/input.d.ts +9 -1
- package/types/components/list.d.ts +1 -0
- package/types/components/optgroup.d.ts +10 -4
- package/types/components/tabs.d.ts +4 -0
- package/types/components/toolbar.d.ts +5 -0
- package/types/components/tree-select.d.ts +4 -0
- package/types/ui/index.d.ts +0 -22
- /package/es/{collapse-pane → collapse}/src/collapse-pane.js +0 -0
- /package/es/icon/style/{iconfont.1725680652286.ttf → iconfont.1725941866604.ttf} +0 -0
- /package/es/icon/style/{iconfont.1725680652286.woff → iconfont.1725941866604.woff} +0 -0
- /package/es/icon/style/{iconfont.1725680652286.woff2 → iconfont.1725941866604.woff2} +0 -0
- /package/es/{iconfont.1725680652286.ttf → iconfont.1725941866604.ttf} +0 -0
- /package/es/{iconfont.1725680652286.woff → iconfont.1725941866604.woff} +0 -0
- /package/es/{iconfont.1725680652286.woff2 → iconfont.1725941866604.woff2} +0 -0
- /package/lib/{collapse-pane → collapse}/src/collapse-pane.js +0 -0
- /package/lib/{collapse-pane → collapse}/src/collapse-pane.min.js +0 -0
- /package/lib/icon/style/{iconfont.1725680652286.ttf → iconfont.1725941866604.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1725680652286.woff → iconfont.1725941866604.woff} +0 -0
- /package/lib/icon/style/{iconfont.1725680652286.woff2 → iconfont.1725941866604.woff2} +0 -0
- /package/lib/{iconfont.1725680652286.ttf → iconfont.1725941866604.ttf} +0 -0
- /package/lib/{iconfont.1725680652286.woff → iconfont.1725941866604.woff} +0 -0
- /package/lib/{iconfont.1725680652286.woff2 → iconfont.1725941866604.woff2} +0 -0
- /package/packages/{collapse-pane → collapse}/src/collapse-pane.ts +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent, h, Teleport, PropType, ref, Ref, inject, computed, provide, onUnmounted, reactive, nextTick, watch, onMounted, createCommentVNode } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize
|
|
3
|
+
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize } from '../../ui'
|
|
4
4
|
import { getEventTargetNode, getAbsolutePos } from '../../ui/src/dom'
|
|
5
5
|
import { getLastZIndex, nextZIndex, getFuncText } from '../../ui/src/utils'
|
|
6
6
|
import VxeInputComponent from '../../input/src/input'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
|
|
9
|
-
import type { VxeSelectPropTypes, VxeSelectConstructor, SelectInternalData, SelectReactData, VxeSelectEmits, VxeInputConstructor, SelectMethods, SelectPrivateRef, VxeSelectMethods, VxeOptgroupProps, VxeOptionProps, VxeTableConstructor, VxeDrawerConstructor, VxeDrawerMethods, VxeTablePrivateMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeModalConstructor, VxeModalMethods } from '../../../types'
|
|
9
|
+
import type { VxeSelectPropTypes, VxeSelectConstructor, SelectInternalData, SelectReactData, VxeSelectEmits, VxeComponentSlotType, VxeInputConstructor, SelectMethods, SelectPrivateRef, VxeSelectMethods, VxeOptgroupProps, VxeOptionProps, VxeTableConstructor, VxeDrawerConstructor, VxeDrawerMethods, VxeTablePrivateMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeModalConstructor, VxeModalMethods } from '../../../types'
|
|
10
10
|
|
|
11
11
|
function isOptionVisible (option: any) {
|
|
12
12
|
return option.visible !== false
|
|
@@ -187,11 +187,11 @@ export default defineComponent({
|
|
|
187
187
|
})
|
|
188
188
|
|
|
189
189
|
const computePropsOpts = computed(() => {
|
|
190
|
-
return props.optionProps
|
|
190
|
+
return Object.assign({}, props.optionProps)
|
|
191
191
|
})
|
|
192
192
|
|
|
193
193
|
const computeGroupPropsOpts = computed(() => {
|
|
194
|
-
return props.optionGroupProps
|
|
194
|
+
return Object.assign({}, props.optionGroupProps)
|
|
195
195
|
})
|
|
196
196
|
|
|
197
197
|
const computeLabelField = computed(() => {
|
|
@@ -234,6 +234,28 @@ export default defineComponent({
|
|
|
234
234
|
return XEUtils.toNumber(props.multiCharOverflow)
|
|
235
235
|
})
|
|
236
236
|
|
|
237
|
+
const computeSelectLabel = computed(() => {
|
|
238
|
+
const { modelValue, multiple, remote } = props
|
|
239
|
+
const multiMaxCharNum = computeMultiMaxCharNum.value
|
|
240
|
+
if (modelValue && multiple) {
|
|
241
|
+
const vals = XEUtils.isArray(modelValue) ? modelValue : [modelValue]
|
|
242
|
+
if (remote) {
|
|
243
|
+
return vals.map(val => getRemoteSelectLabel(val)).join(', ')
|
|
244
|
+
}
|
|
245
|
+
return vals.map((val) => {
|
|
246
|
+
const label = getSelectLabel(val)
|
|
247
|
+
if (multiMaxCharNum > 0 && label.length > multiMaxCharNum) {
|
|
248
|
+
return `${label.substring(0, multiMaxCharNum)}...`
|
|
249
|
+
}
|
|
250
|
+
return label
|
|
251
|
+
}).join(', ')
|
|
252
|
+
}
|
|
253
|
+
if (remote) {
|
|
254
|
+
return getRemoteSelectLabel(modelValue)
|
|
255
|
+
}
|
|
256
|
+
return getSelectLabel(modelValue)
|
|
257
|
+
})
|
|
258
|
+
|
|
237
259
|
const callSlot = <T>(slotFunc: ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T) => {
|
|
238
260
|
if (slotFunc) {
|
|
239
261
|
if (XEUtils.isString(slotFunc)) {
|
|
@@ -300,28 +322,6 @@ export default defineComponent({
|
|
|
300
322
|
return XEUtils.toValueString(item ? item[labelField as 'label'] : value)
|
|
301
323
|
}
|
|
302
324
|
|
|
303
|
-
const computeSelectLabel = computed(() => {
|
|
304
|
-
const { modelValue, multiple, remote } = props
|
|
305
|
-
const multiMaxCharNum = computeMultiMaxCharNum.value
|
|
306
|
-
if (modelValue && multiple) {
|
|
307
|
-
const vals = XEUtils.isArray(modelValue) ? modelValue : [modelValue]
|
|
308
|
-
if (remote) {
|
|
309
|
-
return vals.map(val => getRemoteSelectLabel(val)).join(', ')
|
|
310
|
-
}
|
|
311
|
-
return vals.map((val) => {
|
|
312
|
-
const label = getSelectLabel(val)
|
|
313
|
-
if (multiMaxCharNum > 0 && label.length > multiMaxCharNum) {
|
|
314
|
-
return `${label.substring(0, multiMaxCharNum)}...`
|
|
315
|
-
}
|
|
316
|
-
return label
|
|
317
|
-
}).join(', ')
|
|
318
|
-
}
|
|
319
|
-
if (remote) {
|
|
320
|
-
return getRemoteSelectLabel(modelValue)
|
|
321
|
-
}
|
|
322
|
-
return getSelectLabel(modelValue)
|
|
323
|
-
})
|
|
324
|
-
|
|
325
325
|
const getOptkey = () => {
|
|
326
326
|
const optionOpts = computeOptionOpts.value
|
|
327
327
|
return optionOpts.keyField || props.optionId || '_X_OPTION_KEY'
|
|
@@ -534,8 +534,8 @@ export default defineComponent({
|
|
|
534
534
|
}
|
|
535
535
|
|
|
536
536
|
const changeEvent = (evnt: Event, selectValue: any) => {
|
|
537
|
+
emit('update:modelValue', selectValue)
|
|
537
538
|
if (selectValue !== props.modelValue) {
|
|
538
|
-
emit('update:modelValue', selectValue)
|
|
539
539
|
selectMethods.dispatchEvent('change', { value: selectValue }, evnt)
|
|
540
540
|
// 自动更新校验状态
|
|
541
541
|
if ($xeForm && formItemInfo) {
|
|
@@ -774,19 +774,25 @@ export default defineComponent({
|
|
|
774
774
|
reactData.isActivated = true
|
|
775
775
|
}
|
|
776
776
|
|
|
777
|
-
const
|
|
777
|
+
const handleSearchEvent = () => {
|
|
778
778
|
const { remote, remoteMethod } = props
|
|
779
779
|
const { searchValue } = reactData
|
|
780
780
|
if (remote && remoteMethod) {
|
|
781
781
|
reactData.searchLoading = true
|
|
782
|
-
Promise.resolve(
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
782
|
+
Promise.resolve(
|
|
783
|
+
remoteMethod({ searchValue })
|
|
784
|
+
).then(() => nextTick())
|
|
785
|
+
.catch(() => nextTick())
|
|
786
|
+
.finally(() => {
|
|
787
|
+
reactData.searchLoading = false
|
|
788
|
+
refreshOption()
|
|
789
|
+
})
|
|
786
790
|
} else {
|
|
787
791
|
refreshOption()
|
|
788
792
|
}
|
|
789
|
-
}
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
const triggerSearchEvent = XEUtils.debounce(handleSearchEvent, 350, { trailing: true })
|
|
790
796
|
|
|
791
797
|
const togglePanelEvent = (params: any) => {
|
|
792
798
|
const { $event } = params
|
|
@@ -999,7 +1005,7 @@ export default defineComponent({
|
|
|
999
1005
|
}, defaultSlot ? defaultSlot({}) : []),
|
|
1000
1006
|
h('span', {
|
|
1001
1007
|
class: 'vxe-select-label'
|
|
1002
|
-
}, selectLabel)
|
|
1008
|
+
}, [selectLabel])
|
|
1003
1009
|
])
|
|
1004
1010
|
}
|
|
1005
1011
|
return h('div', {
|
|
@@ -1099,8 +1105,6 @@ export default defineComponent({
|
|
|
1099
1105
|
])
|
|
1100
1106
|
}
|
|
1101
1107
|
|
|
1102
|
-
$xeSelect.renderVN = renderVN
|
|
1103
|
-
|
|
1104
1108
|
watch(() => reactData.staticOptions, (value) => {
|
|
1105
1109
|
if (value.some((item) => item.options && item.options.length)) {
|
|
1106
1110
|
reactData.fullOptionList = []
|
|
@@ -1149,6 +1153,8 @@ export default defineComponent({
|
|
|
1149
1153
|
|
|
1150
1154
|
provide('$xeSelect', $xeSelect)
|
|
1151
1155
|
|
|
1156
|
+
$xeSelect.renderVN = renderVN
|
|
1157
|
+
|
|
1152
1158
|
return $xeSelect
|
|
1153
1159
|
},
|
|
1154
1160
|
render () {
|
|
@@ -5,7 +5,7 @@ import { OptionInfo } from './option-info'
|
|
|
5
5
|
import type { VxeSelectConstructor } from '../../../types'
|
|
6
6
|
|
|
7
7
|
export interface XEOptionProvide {
|
|
8
|
-
|
|
8
|
+
optionConfig: OptionInfo;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export function isOption (option: any) {
|
|
@@ -24,11 +24,11 @@ export function watchOption (props: any, option: OptionInfo) {
|
|
|
24
24
|
})
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export function assembleOption ($xeSelect: VxeSelectConstructor, el: HTMLDivElement, option: OptionInfo,
|
|
27
|
+
export function assembleOption ($xeSelect: VxeSelectConstructor, el: HTMLDivElement, option: OptionInfo, $xeOptgroup?: XEOptionProvide | null) {
|
|
28
28
|
const { reactData } = $xeSelect
|
|
29
29
|
const { staticOptions } = reactData
|
|
30
30
|
const parentElem = el.parentNode
|
|
31
|
-
const parentOption =
|
|
31
|
+
const parentOption = $xeOptgroup ? $xeOptgroup.optionConfig : null
|
|
32
32
|
const parentCols = parentOption ? parentOption.options : staticOptions
|
|
33
33
|
if (parentElem && parentCols) {
|
|
34
34
|
parentCols.splice(XEUtils.arrayIndexOf(parentElem.children, el), 0, option)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { defineComponent, ref, h, reactive, PropType, watch, inject, onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
+
import { createEvent } from '../../ui'
|
|
3
4
|
import { assembleAnchorTab, destroyAnchorTab } from './util'
|
|
4
5
|
|
|
5
|
-
import type { VxeTabPanePropTypes, TabPaneReactData, TabPanePrivateRef, VxeTabPanePrivateComputed, VxeTabPaneConstructor, VxeTabPanePrivateMethods, VxeTabPaneDefines, VxeTabsConstructor, VxeTabsPrivateMethods } from '../../../types'
|
|
6
|
+
import type { VxeTabPanePropTypes, TabPaneReactData, TabPaneMethods, TabPanePrivateMethods, VxeTabPaneEmits, ValueOf, TabPanePrivateRef, VxeTabPanePrivateComputed, VxeTabPaneConstructor, VxeTabPanePrivateMethods, VxeTabPaneDefines, VxeTabsConstructor, VxeTabsPrivateMethods } from '../../../types'
|
|
6
7
|
|
|
7
8
|
export default defineComponent({
|
|
8
9
|
name: 'VxeTabPane',
|
|
@@ -15,9 +16,9 @@ export default defineComponent({
|
|
|
15
16
|
preload: Boolean as PropType<VxeTabPanePropTypes.Preload>,
|
|
16
17
|
permissionCode: [String, Number] as PropType<VxeTabPanePropTypes.PermissionCode>
|
|
17
18
|
},
|
|
18
|
-
emits: [],
|
|
19
|
+
emits: [] as VxeTabPaneEmits,
|
|
19
20
|
setup (props, context) {
|
|
20
|
-
const { slots } = context
|
|
21
|
+
const { slots, emit } = context
|
|
21
22
|
|
|
22
23
|
const xID = XEUtils.uniqueId()
|
|
23
24
|
|
|
@@ -59,6 +60,19 @@ export default defineComponent({
|
|
|
59
60
|
getComputeMaps: () => computeMaps
|
|
60
61
|
} as unknown as VxeTabPaneConstructor & VxeTabPanePrivateMethods
|
|
61
62
|
|
|
63
|
+
const dispatchEvent = (type: ValueOf<VxeTabPaneEmits>, params: Record<string, any>, evnt: Event | null) => {
|
|
64
|
+
emit(type, createEvent(evnt, { $tabPane: $xeTabPane }, params))
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const tabPaneMethods: TabPaneMethods = {
|
|
68
|
+
dispatchEvent
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const tabPanePrivateMethods: TabPanePrivateMethods = {
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
Object.assign($xeTabPane, tabPaneMethods, tabPanePrivateMethods)
|
|
75
|
+
|
|
62
76
|
watch(() => props.title, (val) => {
|
|
63
77
|
tabConfig.title = val
|
|
64
78
|
})
|
|
@@ -76,8 +90,9 @@ export default defineComponent({
|
|
|
76
90
|
})
|
|
77
91
|
|
|
78
92
|
onMounted(() => {
|
|
79
|
-
|
|
80
|
-
|
|
93
|
+
const elem = refElem.value
|
|
94
|
+
if ($xeTabs && elem) {
|
|
95
|
+
assembleAnchorTab($xeTabs, elem, tabConfig)
|
|
81
96
|
}
|
|
82
97
|
})
|
|
83
98
|
|
|
@@ -5,7 +5,7 @@ import { toCssUnit } from '../..//ui/src/dom'
|
|
|
5
5
|
import { warnLog } from '../../ui/src/log'
|
|
6
6
|
import XEUtils from 'xe-utils'
|
|
7
7
|
|
|
8
|
-
import type { VxeTabsPropTypes, VxeTabPaneProps, VxeTabsEmits, TabsReactData, TabsPrivateRef, VxeTabsPrivateComputed, VxeTabsConstructor, VxeTabsPrivateMethods, VxeTabPaneDefines, ValueOf, TabsMethods, TabsPrivateMethods } from '../../../types'
|
|
8
|
+
import type { VxeTabsPropTypes, VxeTabPaneProps, VxeTabsEmits, TabsInternalData, TabsReactData, TabsPrivateRef, VxeTabsPrivateComputed, VxeTabsConstructor, VxeTabsPrivateMethods, VxeTabPaneDefines, ValueOf, TabsMethods, TabsPrivateMethods } from '../../../types'
|
|
9
9
|
|
|
10
10
|
export default defineComponent({
|
|
11
11
|
name: 'VxeTabs',
|
|
@@ -55,28 +55,22 @@ export default defineComponent({
|
|
|
55
55
|
resizeFlag: 1
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
-
const
|
|
59
|
-
|
|
58
|
+
const internalData: TabsInternalData = {
|
|
59
|
+
slTimeout: undefined
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
if (permissionCode) {
|
|
65
|
-
if (!permission.checkVisible(permissionCode)) {
|
|
66
|
-
return false
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return true
|
|
62
|
+
const refMaps: TabsPrivateRef = {
|
|
63
|
+
refElem
|
|
70
64
|
}
|
|
71
65
|
|
|
72
66
|
const computeTabOptions = computed(() => {
|
|
73
67
|
const { options } = props
|
|
74
|
-
return (options || []).filter(handleFilterTab)
|
|
68
|
+
return (options || []).filter((item) => handleFilterTab(item))
|
|
75
69
|
})
|
|
76
70
|
|
|
77
71
|
const computeTabStaticOptions = computed(() => {
|
|
78
72
|
const { staticTabs } = reactData
|
|
79
|
-
return staticTabs.filter(handleFilterTab)
|
|
73
|
+
return staticTabs.filter((item) => handleFilterTab(item))
|
|
80
74
|
})
|
|
81
75
|
|
|
82
76
|
const computeMaps: VxeTabsPrivateComputed = {
|
|
@@ -92,6 +86,16 @@ export default defineComponent({
|
|
|
92
86
|
getComputeMaps: () => computeMaps
|
|
93
87
|
} as unknown as VxeTabsConstructor & VxeTabsPrivateMethods
|
|
94
88
|
|
|
89
|
+
const handleFilterTab = (item: VxeTabPaneProps | VxeTabPaneDefines.TabConfig) => {
|
|
90
|
+
const { permissionCode } = item
|
|
91
|
+
if (permissionCode) {
|
|
92
|
+
if (!permission.checkVisible(permissionCode)) {
|
|
93
|
+
return false
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return true
|
|
97
|
+
}
|
|
98
|
+
|
|
95
99
|
const callSlot = (slotFunc: any, params: any) => {
|
|
96
100
|
if (slotFunc) {
|
|
97
101
|
if (XEUtils.isString(slotFunc)) {
|
|
@@ -218,13 +222,15 @@ export default defineComponent({
|
|
|
218
222
|
}
|
|
219
223
|
}
|
|
220
224
|
|
|
221
|
-
let scrollTimeout: any = null
|
|
222
|
-
|
|
223
225
|
const startScrollAnimation = (offsetPos: number, offsetSize: number) => {
|
|
226
|
+
const { slTimeout } = internalData
|
|
224
227
|
let offsetLeft = offsetSize
|
|
225
228
|
let scrollCount = 6
|
|
226
229
|
let delayNum = 35
|
|
227
|
-
|
|
230
|
+
if (slTimeout) {
|
|
231
|
+
clearTimeout(slTimeout)
|
|
232
|
+
internalData.slTimeout = undefined
|
|
233
|
+
}
|
|
228
234
|
const scrollAnimate = () => {
|
|
229
235
|
const headerWrapperEl = refHeadWrapperElem.value
|
|
230
236
|
if (scrollCount > 0) {
|
|
@@ -236,13 +242,13 @@ export default defineComponent({
|
|
|
236
242
|
if (clientWidth + scrollLeft < scrollWidth) {
|
|
237
243
|
headerWrapperEl.scrollLeft += offsetLeft
|
|
238
244
|
delayNum -= 4
|
|
239
|
-
|
|
245
|
+
internalData.slTimeout = setTimeout(scrollAnimate, delayNum)
|
|
240
246
|
}
|
|
241
247
|
} else {
|
|
242
248
|
if (scrollLeft > 0) {
|
|
243
249
|
headerWrapperEl.scrollLeft -= offsetLeft
|
|
244
250
|
delayNum -= 4
|
|
245
|
-
|
|
251
|
+
internalData.slTimeout = setTimeout(scrollAnimate, delayNum)
|
|
246
252
|
}
|
|
247
253
|
}
|
|
248
254
|
updateTabStyle()
|
|
@@ -297,41 +303,43 @@ export default defineComponent({
|
|
|
297
303
|
})
|
|
298
304
|
}
|
|
299
305
|
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
if (
|
|
310
|
-
|
|
311
|
-
item = list[index + 1]
|
|
312
|
-
}
|
|
313
|
-
} else {
|
|
314
|
-
if (index > 0) {
|
|
315
|
-
item = list[index - 1]
|
|
316
|
-
}
|
|
306
|
+
const handlePrevNext = (isNext: boolean) => {
|
|
307
|
+
const { activeName } = reactData
|
|
308
|
+
const tabOptions = computeTabOptions.value
|
|
309
|
+
const tabStaticOptions = computeTabStaticOptions.value
|
|
310
|
+
const list = tabStaticOptions.length ? tabStaticOptions : tabOptions
|
|
311
|
+
const index = XEUtils.findIndexOf(list, item => item.name === activeName)
|
|
312
|
+
if (index > -1) {
|
|
313
|
+
let item: VxeTabPaneProps | null = null
|
|
314
|
+
if (isNext) {
|
|
315
|
+
if (index < list.length - 1) {
|
|
316
|
+
item = list[index + 1]
|
|
317
317
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
reactData.activeName = name
|
|
322
|
-
emit('update:modelValue', value)
|
|
323
|
-
addInitName(name, null)
|
|
318
|
+
} else {
|
|
319
|
+
if (index > 0) {
|
|
320
|
+
item = list[index - 1]
|
|
324
321
|
}
|
|
325
322
|
}
|
|
326
|
-
|
|
323
|
+
if (item) {
|
|
324
|
+
const name = item.name
|
|
325
|
+
const value = name
|
|
326
|
+
reactData.activeName = name
|
|
327
|
+
emit('update:modelValue', value)
|
|
328
|
+
addInitName(name, null)
|
|
329
|
+
}
|
|
327
330
|
}
|
|
331
|
+
return nextTick()
|
|
328
332
|
}
|
|
329
333
|
|
|
330
334
|
const tabsMethods: TabsMethods = {
|
|
331
335
|
dispatchEvent,
|
|
332
336
|
scrollToTab,
|
|
333
|
-
prev
|
|
334
|
-
|
|
337
|
+
prev () {
|
|
338
|
+
return handlePrevNext(false)
|
|
339
|
+
},
|
|
340
|
+
next () {
|
|
341
|
+
return handlePrevNext(true)
|
|
342
|
+
},
|
|
335
343
|
prevTab () {
|
|
336
344
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
337
345
|
warnLog('vxe.error.delFunc', ['prevTab', 'prev'])
|
|
@@ -475,9 +483,9 @@ export default defineComponent({
|
|
|
475
483
|
const { activeName } = reactData
|
|
476
484
|
const activeDefaultTab = tabList.find(item => item.name === activeName)
|
|
477
485
|
if (destroyOnClose) {
|
|
478
|
-
return activeDefaultTab ?
|
|
486
|
+
return [activeDefaultTab ? renderTabPane(activeDefaultTab) : createCommentVNode()]
|
|
479
487
|
}
|
|
480
|
-
return tabList.map(renderTabPane)
|
|
488
|
+
return tabList.map((item) => renderTabPane(item))
|
|
481
489
|
}
|
|
482
490
|
|
|
483
491
|
const renderVN = () => {
|
|
@@ -552,7 +560,9 @@ export default defineComponent({
|
|
|
552
560
|
}
|
|
553
561
|
|
|
554
562
|
watch(() => reactData.resizeFlag, () => {
|
|
555
|
-
nextTick(
|
|
563
|
+
nextTick(() => {
|
|
564
|
+
updateTabStyle()
|
|
565
|
+
})
|
|
556
566
|
})
|
|
557
567
|
|
|
558
568
|
nextTick(() => {
|
|
@@ -567,13 +577,13 @@ export default defineComponent({
|
|
|
567
577
|
globalEvents.off($xeTabs, 'resize')
|
|
568
578
|
})
|
|
569
579
|
|
|
570
|
-
$xeTabs.renderVN = renderVN
|
|
571
|
-
|
|
572
580
|
provide('$xeTabs', $xeTabs)
|
|
573
581
|
|
|
574
582
|
addInitName(props.modelValue, null)
|
|
575
583
|
initDefaultName(reactData.staticTabs.length ? reactData.staticTabs : props.options)
|
|
576
584
|
|
|
585
|
+
$xeTabs.renderVN = renderVN
|
|
586
|
+
|
|
577
587
|
return $xeTabs
|
|
578
588
|
},
|
|
579
589
|
render () {
|
|
@@ -211,7 +211,7 @@ export default defineComponent({
|
|
|
211
211
|
$xeTextarea.dispatchEvent(evnt.type, { value }, evnt)
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
const
|
|
214
|
+
const handleChange = (value: string, evnt: Event) => {
|
|
215
215
|
reactData.inputValue = value
|
|
216
216
|
emit('update:modelValue', value)
|
|
217
217
|
if (XEUtils.toValueString(props.modelValue) !== value) {
|
|
@@ -229,7 +229,7 @@ export default defineComponent({
|
|
|
229
229
|
const value = textElem.value
|
|
230
230
|
reactData.inputValue = value
|
|
231
231
|
if (immediate) {
|
|
232
|
-
|
|
232
|
+
handleChange(value, evnt)
|
|
233
233
|
}
|
|
234
234
|
$xeTextarea.dispatchEvent('input', { value }, evnt)
|
|
235
235
|
handleResize()
|
|
@@ -240,7 +240,7 @@ export default defineComponent({
|
|
|
240
240
|
if (immediate) {
|
|
241
241
|
triggerEvent(evnt)
|
|
242
242
|
} else {
|
|
243
|
-
|
|
243
|
+
handleChange(reactData.inputValue, evnt)
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
@@ -248,7 +248,7 @@ export default defineComponent({
|
|
|
248
248
|
const { immediate } = props
|
|
249
249
|
const { inputValue } = reactData
|
|
250
250
|
if (!immediate) {
|
|
251
|
-
|
|
251
|
+
handleChange(inputValue, evnt)
|
|
252
252
|
}
|
|
253
253
|
$xeTextarea.dispatchEvent('blur', { value: inputValue }, evnt)
|
|
254
254
|
}
|
|
@@ -109,7 +109,10 @@ export default defineComponent({
|
|
|
109
109
|
type: String as PropType<VxeTreePropTypes.IconLoaded>,
|
|
110
110
|
default: () => getConfig().tree.iconLoaded
|
|
111
111
|
},
|
|
112
|
-
size: {
|
|
112
|
+
size: {
|
|
113
|
+
type: String as PropType<VxeTreePropTypes.Size>,
|
|
114
|
+
default: () => getConfig().tree.size || getConfig().size
|
|
115
|
+
}
|
|
113
116
|
},
|
|
114
117
|
emits: [
|
|
115
118
|
'update:modelValue',
|
|
@@ -490,7 +493,7 @@ export default defineComponent({
|
|
|
490
493
|
const { lazy, transform } = props
|
|
491
494
|
const { nodeMaps } = reactData
|
|
492
495
|
if (!lazy) {
|
|
493
|
-
return
|
|
496
|
+
return Promise.resolve([])
|
|
494
497
|
}
|
|
495
498
|
const childrenField = computeChildrenField.value
|
|
496
499
|
const parentNodeItem = nodeMaps[getNodeId(node)]
|
|
@@ -1135,8 +1138,6 @@ export default defineComponent({
|
|
|
1135
1138
|
])
|
|
1136
1139
|
}
|
|
1137
1140
|
|
|
1138
|
-
$xeTree.renderVN = renderVN
|
|
1139
|
-
|
|
1140
1141
|
const dataFlag = ref(0)
|
|
1141
1142
|
watch(() => props.data ? props.data.length : 0, () => {
|
|
1142
1143
|
dataFlag.value++
|
|
@@ -1172,6 +1173,8 @@ export default defineComponent({
|
|
|
1172
1173
|
updateData(props.data || [])
|
|
1173
1174
|
updateCheckboxChecked(props.checkNodeKeys || [])
|
|
1174
1175
|
|
|
1176
|
+
$xeTree.renderVN = renderVN
|
|
1177
|
+
|
|
1175
1178
|
return $xeTree
|
|
1176
1179
|
},
|
|
1177
1180
|
render () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, h, PropType, Ref, nextTick, inject, reactive, Teleport, createCommentVNode, onMounted, onUnmounted, watch } from 'vue'
|
|
1
|
+
import { defineComponent, ref, computed, h, PropType, Ref, nextTick, inject, provide, reactive, Teleport, createCommentVNode, onMounted, onUnmounted, watch } from 'vue'
|
|
2
2
|
import { getConfig, getI18n, getIcon, globalEvents, createEvent, useSize } from '../../ui'
|
|
3
3
|
import { getEventTargetNode, getAbsolutePos } from '../../ui/src/dom'
|
|
4
4
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils'
|
|
@@ -6,7 +6,7 @@ import XEUtils from 'xe-utils'
|
|
|
6
6
|
import VxeInputComponent from '../../input/src/input'
|
|
7
7
|
import VxeTreeComponent from '../../tree/src/tree'
|
|
8
8
|
|
|
9
|
-
import type { TreeSelectReactData, VxeTreeSelectEmits, TreeSelectPrivateRef, TreeSelectPrivateMethods, TreeSelectMethods, VxeTreeSelectPrivateComputed, VxeTreeSelectPropTypes, VxeTreeSelectConstructor, VxeFormDefines, VxeDrawerConstructor, VxeDrawerMethods, VxeTreeSelectPrivateMethods, VxeTableConstructor, VxeTablePrivateMethods, VxeFormConstructor, VxeFormPrivateMethods, VxeInputConstructor, VxeModalConstructor, VxeModalMethods } from '../../../types'
|
|
9
|
+
import type { TreeSelectReactData, VxeTreeSelectEmits, TreeSelectInternalData, TreeSelectPrivateRef, TreeSelectPrivateMethods, TreeSelectMethods, VxeTreeSelectPrivateComputed, VxeTreeSelectPropTypes, VxeTreeSelectConstructor, VxeFormDefines, VxeDrawerConstructor, VxeDrawerMethods, VxeTreeSelectPrivateMethods, VxeTableConstructor, VxeTablePrivateMethods, VxeFormConstructor, VxeFormPrivateMethods, VxeInputConstructor, VxeModalConstructor, VxeModalMethods } from '../../../types'
|
|
10
10
|
|
|
11
11
|
function getOptUniqueId () {
|
|
12
12
|
return XEUtils.uniqueId('node_')
|
|
@@ -37,7 +37,10 @@ export default defineComponent({
|
|
|
37
37
|
placement: String as PropType<VxeTreeSelectPropTypes.Placement>,
|
|
38
38
|
options: Array as PropType<VxeTreeSelectPropTypes.Options>,
|
|
39
39
|
optionProps: Object as PropType<VxeTreeSelectPropTypes.OptionProps>,
|
|
40
|
-
size: {
|
|
40
|
+
size: {
|
|
41
|
+
type: String as PropType<VxeTreeSelectPropTypes.Size>,
|
|
42
|
+
default: () => getConfig().select.size || getConfig().size
|
|
43
|
+
},
|
|
41
44
|
remote: Boolean as PropType<VxeTreeSelectPropTypes.Remote>,
|
|
42
45
|
remoteMethod: Function as PropType<VxeTreeSelectPropTypes.RemoteMethod>,
|
|
43
46
|
treeConfig: Object as PropType<VxeTreeSelectPropTypes.TreeConfig>,
|
|
@@ -87,6 +90,10 @@ export default defineComponent({
|
|
|
87
90
|
isActivated: false
|
|
88
91
|
})
|
|
89
92
|
|
|
93
|
+
const internalData: TreeSelectInternalData = {
|
|
94
|
+
hpTimeout: undefined
|
|
95
|
+
}
|
|
96
|
+
|
|
90
97
|
const refMaps: TreeSelectPrivateRef = {
|
|
91
98
|
refElem
|
|
92
99
|
}
|
|
@@ -186,9 +193,9 @@ export default defineComponent({
|
|
|
186
193
|
const computeSelectLabel = computed(() => {
|
|
187
194
|
const { modelValue } = props
|
|
188
195
|
const { fullNodeMaps } = reactData
|
|
196
|
+
const labelField = computeLabelField.value
|
|
189
197
|
return (XEUtils.isArray(modelValue) ? modelValue : [modelValue]).map(value => {
|
|
190
198
|
const cacheItem = fullNodeMaps[value]
|
|
191
|
-
const labelField = computeLabelField.value
|
|
192
199
|
return cacheItem ? cacheItem.item[labelField] : value
|
|
193
200
|
}).join(', ')
|
|
194
201
|
})
|
|
@@ -201,6 +208,7 @@ export default defineComponent({
|
|
|
201
208
|
props,
|
|
202
209
|
context,
|
|
203
210
|
reactData,
|
|
211
|
+
internalData,
|
|
204
212
|
|
|
205
213
|
getRefMaps: () => refMaps,
|
|
206
214
|
getComputeMaps: () => computeMaps
|
|
@@ -236,7 +244,7 @@ export default defineComponent({
|
|
|
236
244
|
parent: any
|
|
237
245
|
nodes: any[]
|
|
238
246
|
}> = {}
|
|
239
|
-
XEUtils.eachTree(options, (item, index, items, parent, nodes) => {
|
|
247
|
+
XEUtils.eachTree(options, (item, index, items, path, parent, nodes) => {
|
|
240
248
|
let nodeid = getOptid(item)
|
|
241
249
|
if (!nodeid) {
|
|
242
250
|
nodeid = getOptUniqueId()
|
|
@@ -326,13 +334,11 @@ export default defineComponent({
|
|
|
326
334
|
})
|
|
327
335
|
}
|
|
328
336
|
|
|
329
|
-
let hidePanelTimeout: number
|
|
330
|
-
|
|
331
337
|
const showOptionPanel = () => {
|
|
332
338
|
const { loading } = props
|
|
333
339
|
const isDisabled = computeIsDisabled.value
|
|
334
340
|
if (!loading && !isDisabled) {
|
|
335
|
-
clearTimeout(
|
|
341
|
+
clearTimeout(internalData.hpTimeout)
|
|
336
342
|
if (!reactData.initialized) {
|
|
337
343
|
reactData.initialized = true
|
|
338
344
|
}
|
|
@@ -348,16 +354,16 @@ export default defineComponent({
|
|
|
348
354
|
|
|
349
355
|
const hideOptionPanel = () => {
|
|
350
356
|
reactData.visiblePanel = false
|
|
351
|
-
|
|
357
|
+
internalData.hpTimeout = window.setTimeout(() => {
|
|
352
358
|
reactData.visibleAnimate = false
|
|
353
359
|
}, 350)
|
|
354
360
|
}
|
|
355
361
|
|
|
356
362
|
const changeEvent = (evnt: Event, selectValue: any) => {
|
|
357
363
|
const { fullNodeMaps } = reactData
|
|
364
|
+
emit('update:modelValue', selectValue)
|
|
358
365
|
if (selectValue !== props.modelValue) {
|
|
359
366
|
const cacheItem = fullNodeMaps[selectValue]
|
|
360
|
-
emit('update:modelValue', selectValue)
|
|
361
367
|
treeSelectMethods.dispatchEvent('change', { value: selectValue, option: cacheItem ? cacheItem.item : null }, evnt)
|
|
362
368
|
// 自动更新校验状态
|
|
363
369
|
if ($xeForm && formItemInfo) {
|
|
@@ -610,8 +616,6 @@ export default defineComponent({
|
|
|
610
616
|
])
|
|
611
617
|
}
|
|
612
618
|
|
|
613
|
-
$xeTreeSelect.renderVN = renderVN
|
|
614
|
-
|
|
615
619
|
watch(() => props.options, () => {
|
|
616
620
|
cacheItemMap()
|
|
617
621
|
})
|
|
@@ -630,6 +634,10 @@ export default defineComponent({
|
|
|
630
634
|
globalEvents.off($xeTreeSelect, 'blur')
|
|
631
635
|
})
|
|
632
636
|
|
|
637
|
+
provide('$xeTreeSelect', $xeTreeSelect)
|
|
638
|
+
|
|
639
|
+
$xeTreeSelect.renderVN = renderVN
|
|
640
|
+
|
|
633
641
|
return $xeTreeSelect
|
|
634
642
|
},
|
|
635
643
|
render () {
|
package/packages/ui/index.ts
CHANGED
|
@@ -32,13 +32,6 @@ export function setup (options?: VxeGlobalConfig) {
|
|
|
32
32
|
VxeUI.config = config
|
|
33
33
|
VxeUI.setup = setup
|
|
34
34
|
|
|
35
|
-
/**
|
|
36
|
-
* 已废弃
|
|
37
|
-
* @deprecated
|
|
38
|
-
*/
|
|
39
|
-
export const globalStore = {}
|
|
40
|
-
VxeUI.globalStore = globalStore
|
|
41
|
-
|
|
42
35
|
setConfig({
|
|
43
36
|
alert: {},
|
|
44
37
|
anchor: {},
|