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
|
@@ -5,7 +5,7 @@ import { toCssUnit } from '../..//ui/src/dom'
|
|
|
5
5
|
import VxeLoadingComponent from '../../loading/src/loading'
|
|
6
6
|
import XEUtils from 'xe-utils'
|
|
7
7
|
|
|
8
|
-
import type { CarouselReactData, CarouselPrivateRef, VxeCarouselPropTypes, CarouselMethods, CarouselPrivateMethods, VxeCarouselEmits, VxeCarouselDefines, VxeCarouselPrivateComputed, VxeCarouselConstructor, ValueOf, VxeCarouselPrivateMethods } from '../../../types'
|
|
8
|
+
import type { CarouselReactData, CarouselPrivateRef, VxeCarouselPropTypes, CarouselInternalData, CarouselMethods, CarouselPrivateMethods, VxeCarouselEmits, VxeCarouselDefines, VxeCarouselPrivateComputed, VxeCarouselConstructor, ValueOf, VxeCarouselPrivateMethods } from '../../../types'
|
|
9
9
|
|
|
10
10
|
export default defineComponent({
|
|
11
11
|
name: 'VxeCarousel',
|
|
@@ -61,6 +61,11 @@ export default defineComponent({
|
|
|
61
61
|
itemHeight: 0
|
|
62
62
|
})
|
|
63
63
|
|
|
64
|
+
const internalData: CarouselInternalData = {
|
|
65
|
+
apTimeout: undefined,
|
|
66
|
+
stopFlag: false
|
|
67
|
+
}
|
|
68
|
+
|
|
64
69
|
const refMaps: CarouselPrivateRef = {
|
|
65
70
|
refElem
|
|
66
71
|
}
|
|
@@ -88,6 +93,7 @@ export default defineComponent({
|
|
|
88
93
|
props,
|
|
89
94
|
context,
|
|
90
95
|
reactData,
|
|
96
|
+
internalData,
|
|
91
97
|
|
|
92
98
|
getRefMaps: () => refMaps,
|
|
93
99
|
getComputeMaps: () => computeMaps
|
|
@@ -198,22 +204,22 @@ export default defineComponent({
|
|
|
198
204
|
}
|
|
199
205
|
}
|
|
200
206
|
|
|
201
|
-
let apTimeout: any = null
|
|
202
|
-
let stopFlag = false
|
|
203
|
-
|
|
204
207
|
const stopAutoPlay = () => {
|
|
205
|
-
|
|
206
|
-
|
|
208
|
+
const { apTimeout } = internalData
|
|
209
|
+
internalData.stopFlag = true
|
|
210
|
+
if (apTimeout) {
|
|
207
211
|
clearTimeout(apTimeout)
|
|
212
|
+
internalData.apTimeout = undefined
|
|
208
213
|
}
|
|
209
214
|
}
|
|
210
215
|
|
|
211
216
|
const handleAutoPlay = () => {
|
|
212
217
|
const { autoPlay, interval } = props
|
|
218
|
+
const { stopFlag } = internalData
|
|
213
219
|
stopAutoPlay()
|
|
214
220
|
if (autoPlay) {
|
|
215
|
-
stopFlag = false
|
|
216
|
-
apTimeout = setTimeout(() => {
|
|
221
|
+
internalData.stopFlag = false
|
|
222
|
+
internalData.apTimeout = setTimeout(() => {
|
|
217
223
|
if (!stopFlag) {
|
|
218
224
|
handlePrevNext(true)
|
|
219
225
|
}
|
|
@@ -324,7 +330,9 @@ export default defineComponent({
|
|
|
324
330
|
height: toCssUnit(height)
|
|
325
331
|
}
|
|
326
332
|
: null
|
|
327
|
-
},
|
|
333
|
+
}, [
|
|
334
|
+
renderItemWrapper(list)
|
|
335
|
+
]),
|
|
328
336
|
showIndicators ? renderIndicators(list) : createCommentVNode(),
|
|
329
337
|
h('div', {
|
|
330
338
|
class: 'vxe-carousel--btn-wrapper'
|
|
@@ -356,8 +364,6 @@ export default defineComponent({
|
|
|
356
364
|
])
|
|
357
365
|
}
|
|
358
366
|
|
|
359
|
-
$xeCarousel.renderVN = renderVN
|
|
360
|
-
|
|
361
367
|
const optsFlag = ref(0)
|
|
362
368
|
watch(() => props.options ? props.options.length : -1, () => {
|
|
363
369
|
optsFlag.value++
|
|
@@ -397,6 +403,8 @@ export default defineComponent({
|
|
|
397
403
|
|
|
398
404
|
provide('$xeCarousel', $xeCarousel)
|
|
399
405
|
|
|
406
|
+
$xeCarousel.renderVN = renderVN
|
|
407
|
+
|
|
400
408
|
return $xeCarousel
|
|
401
409
|
},
|
|
402
410
|
render () {
|
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
import { defineComponent, h, computed, inject, PropType } from 'vue'
|
|
1
|
+
import { defineComponent, h, computed, inject, PropType, reactive } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { getFuncText } from '../../ui/src/utils'
|
|
4
4
|
import { getConfig, createEvent, useSize, getIcon } from '../../ui'
|
|
5
5
|
|
|
6
|
-
import type { VxeCheckboxConstructor, VxeCheckboxGroupConstructor, VxeCheckboxEmits, VxeCheckboxGroupPrivateMethods, CheckboxMethods, VxeCheckboxPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
|
|
6
|
+
import type { VxeCheckboxConstructor, VxeCheckboxGroupConstructor, CheckboxReactData, VxeCheckboxEmits, ValueOf, VxeCheckboxGroupPrivateMethods, CheckboxMethods, VxeCheckboxPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
|
|
7
7
|
|
|
8
8
|
export default defineComponent({
|
|
9
9
|
name: 'VxeCheckbox',
|
|
10
10
|
props: {
|
|
11
11
|
modelValue: [String, Number, Boolean] as PropType<VxeCheckboxPropTypes.ModelValue>,
|
|
12
|
-
label: {
|
|
12
|
+
label: {
|
|
13
|
+
type: [String, Number] as PropType<VxeCheckboxPropTypes.Label>,
|
|
14
|
+
default: null
|
|
15
|
+
},
|
|
13
16
|
indeterminate: Boolean as PropType<VxeCheckboxPropTypes.Indeterminate>,
|
|
14
17
|
title: [String, Number] as PropType<VxeCheckboxPropTypes.Title>,
|
|
15
|
-
checkedValue: {
|
|
16
|
-
|
|
18
|
+
checkedValue: {
|
|
19
|
+
type: [String, Number, Boolean] as PropType<VxeCheckboxPropTypes.CheckedValue>,
|
|
20
|
+
default: true
|
|
21
|
+
},
|
|
22
|
+
uncheckedValue: {
|
|
23
|
+
type: [String, Number, Boolean] as PropType<VxeCheckboxPropTypes.UncheckedValue>,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
17
26
|
content: [String, Number] as PropType<VxeCheckboxPropTypes.Content>,
|
|
18
27
|
disabled: {
|
|
19
28
|
type: Boolean as PropType<VxeCheckboxPropTypes.Disabled>,
|
|
20
29
|
default: null
|
|
21
30
|
},
|
|
22
|
-
size: {
|
|
31
|
+
size: {
|
|
32
|
+
type: String as PropType<VxeCheckboxPropTypes.Size>,
|
|
33
|
+
default: () => getConfig().checkbox.size || getConfig().size
|
|
34
|
+
}
|
|
23
35
|
},
|
|
24
36
|
emits: [
|
|
25
37
|
'update:modelValue',
|
|
@@ -34,10 +46,14 @@ export default defineComponent({
|
|
|
34
46
|
|
|
35
47
|
const xID = XEUtils.uniqueId()
|
|
36
48
|
|
|
49
|
+
const reactData: CheckboxReactData = reactive({
|
|
50
|
+
})
|
|
51
|
+
|
|
37
52
|
const $xeCheckbox = {
|
|
38
53
|
xID,
|
|
39
54
|
props,
|
|
40
|
-
context
|
|
55
|
+
context,
|
|
56
|
+
reactData
|
|
41
57
|
} as unknown as VxeCheckboxConstructor
|
|
42
58
|
|
|
43
59
|
let checkboxMethods = {} as CheckboxMethods
|
|
@@ -53,12 +69,13 @@ export default defineComponent({
|
|
|
53
69
|
|
|
54
70
|
const computeIsDisabled = computed(() => {
|
|
55
71
|
const { disabled } = props
|
|
72
|
+
const isChecked = computeIsChecked.value
|
|
56
73
|
if (disabled === null) {
|
|
57
74
|
if ($xeCheckboxGroup) {
|
|
58
|
-
const { computeIsDisabled, computeIsMaximize } = $xeCheckboxGroup.getComputeMaps()
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
return
|
|
75
|
+
const { computeIsDisabled: computeIsGroupDisabled, computeIsMaximize: computeIsGroupMaximize } = $xeCheckboxGroup.getComputeMaps()
|
|
76
|
+
const isGroupDisabled = computeIsGroupDisabled.value
|
|
77
|
+
const isGroupMaximize = computeIsGroupMaximize.value
|
|
78
|
+
return isGroupDisabled || (isGroupMaximize && !isChecked)
|
|
62
79
|
}
|
|
63
80
|
}
|
|
64
81
|
return disabled
|
|
@@ -84,10 +101,12 @@ export default defineComponent({
|
|
|
84
101
|
}
|
|
85
102
|
}
|
|
86
103
|
|
|
104
|
+
const dispatchEvent = (type: ValueOf<VxeCheckboxEmits>, params: Record<string, any>, evnt: Event | null) => {
|
|
105
|
+
emit(type, createEvent(evnt, { $checkbox: $xeCheckbox }, params))
|
|
106
|
+
}
|
|
107
|
+
|
|
87
108
|
checkboxMethods = {
|
|
88
|
-
dispatchEvent
|
|
89
|
-
emit(type, createEvent(evnt, { $checkbox: $xeCheckbox }, params))
|
|
90
|
-
}
|
|
109
|
+
dispatchEvent
|
|
91
110
|
}
|
|
92
111
|
|
|
93
112
|
Object.assign($xeCheckbox, checkboxMethods)
|
|
@@ -96,7 +115,7 @@ export default defineComponent({
|
|
|
96
115
|
const vSize = computeSize.value
|
|
97
116
|
const isDisabled = computeIsDisabled.value
|
|
98
117
|
const isChecked = computeIsChecked.value
|
|
99
|
-
const indeterminate = props.indeterminate
|
|
118
|
+
const indeterminate = !isChecked && props.indeterminate
|
|
100
119
|
return h('label', {
|
|
101
120
|
class: ['vxe-checkbox', {
|
|
102
121
|
[`size--${vSize}`]: vSize,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent, h, provide, PropType, computed, inject } from 'vue'
|
|
1
|
+
import { defineComponent, h, provide, PropType, computed, inject, reactive } from 'vue'
|
|
2
2
|
import { getConfig, createEvent, useSize } from '../../ui'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import VxeCheckboxComponent from './checkbox'
|
|
5
5
|
|
|
6
|
-
import type { VxeCheckboxGroupConstructor, VxeCheckboxGroupEmits, VxeCheckboxGroupPrivateMethods, CheckboxGroupPrivateMethods, CheckboxGroupPrivateComputed, CheckboxGroupMethods, VxeCheckboxGroupPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
|
|
6
|
+
import type { VxeCheckboxGroupConstructor, VxeCheckboxGroupEmits, ValueOf, CheckboxGroupReactData, VxeCheckboxGroupPrivateMethods, CheckboxGroupPrivateMethods, CheckboxGroupPrivateComputed, CheckboxGroupMethods, VxeCheckboxGroupPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
|
|
7
7
|
|
|
8
8
|
export default defineComponent({
|
|
9
9
|
name: 'VxeCheckboxGroup',
|
|
@@ -15,8 +15,14 @@ export default defineComponent({
|
|
|
15
15
|
type: Boolean as PropType<VxeCheckboxGroupPropTypes.Disabled>,
|
|
16
16
|
default: null
|
|
17
17
|
},
|
|
18
|
-
max: {
|
|
19
|
-
|
|
18
|
+
max: {
|
|
19
|
+
type: [String, Number] as PropType<VxeCheckboxGroupPropTypes.Max>,
|
|
20
|
+
default: null
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
type: String as PropType<VxeCheckboxGroupPropTypes.Size>,
|
|
24
|
+
default: () => getConfig().checkboxGroup.size || getConfig().size
|
|
25
|
+
}
|
|
20
26
|
},
|
|
21
27
|
emits: [
|
|
22
28
|
'update:modelValue',
|
|
@@ -29,6 +35,9 @@ export default defineComponent({
|
|
|
29
35
|
|
|
30
36
|
const xID = XEUtils.uniqueId()
|
|
31
37
|
|
|
38
|
+
const reactData: CheckboxGroupReactData = reactive({
|
|
39
|
+
})
|
|
40
|
+
|
|
32
41
|
const computeIsDisabled = computed(() => {
|
|
33
42
|
const { disabled } = props
|
|
34
43
|
if (disabled === null) {
|
|
@@ -49,7 +58,7 @@ export default defineComponent({
|
|
|
49
58
|
})
|
|
50
59
|
|
|
51
60
|
const computePropsOpts = computed(() => {
|
|
52
|
-
return props.optionProps
|
|
61
|
+
return Object.assign({}, props.optionProps)
|
|
53
62
|
})
|
|
54
63
|
|
|
55
64
|
const computeLabelField = computed(() => {
|
|
@@ -76,16 +85,19 @@ export default defineComponent({
|
|
|
76
85
|
xID,
|
|
77
86
|
props,
|
|
78
87
|
context,
|
|
88
|
+
reactData,
|
|
79
89
|
|
|
80
90
|
getComputeMaps: () => computeMaps
|
|
81
91
|
} as unknown as VxeCheckboxGroupConstructor & VxeCheckboxGroupPrivateMethods
|
|
82
92
|
|
|
83
93
|
useSize(props)
|
|
84
94
|
|
|
95
|
+
const dispatchEvent = (type: ValueOf<VxeCheckboxGroupEmits>, params: Record<string, any>, evnt: Event | null) => {
|
|
96
|
+
emit(type, createEvent(evnt, { $checkboxGroup: $xeCheckboxGroup }, params))
|
|
97
|
+
}
|
|
98
|
+
|
|
85
99
|
const checkboxGroupMethods: CheckboxGroupMethods = {
|
|
86
|
-
dispatchEvent
|
|
87
|
-
emit(type, createEvent(evnt, { $checkboxGroup: $xeCheckboxGroup }, params))
|
|
88
|
-
}
|
|
100
|
+
dispatchEvent
|
|
89
101
|
}
|
|
90
102
|
|
|
91
103
|
const checkboxGroupPrivateMethods: CheckboxGroupPrivateMethods = {
|
|
@@ -132,10 +144,10 @@ export default defineComponent({
|
|
|
132
144
|
: []))
|
|
133
145
|
}
|
|
134
146
|
|
|
135
|
-
$xeCheckboxGroup.renderVN = renderVN
|
|
136
|
-
|
|
137
147
|
provide('$xeCheckboxGroup', $xeCheckboxGroup)
|
|
138
148
|
|
|
149
|
+
$xeCheckboxGroup.renderVN = renderVN
|
|
150
|
+
|
|
139
151
|
return renderVN
|
|
140
152
|
}
|
|
141
153
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
2
|
import { VxeUI } from '@vxe-ui/core'
|
|
3
|
-
import VxeCollapsePaneComponent from '
|
|
3
|
+
import VxeCollapsePaneComponent from '../collapse/src/collapse-pane'
|
|
4
4
|
import { dynamicApp } from '../dynamics'
|
|
5
5
|
|
|
6
6
|
export const VxeCollapsePane = Object.assign({}, VxeCollapsePaneComponent, {
|
|
@@ -234,8 +234,6 @@ export default defineComponent({
|
|
|
234
234
|
])
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
$xeCountdown.renderVN = renderVN
|
|
238
|
-
|
|
239
237
|
watch(() => props.modelValue, () => {
|
|
240
238
|
updateCount()
|
|
241
239
|
handleStop()
|
|
@@ -252,6 +250,8 @@ export default defineComponent({
|
|
|
252
250
|
|
|
253
251
|
updateCount()
|
|
254
252
|
|
|
253
|
+
$xeCountdown.renderVN = renderVN
|
|
254
|
+
|
|
255
255
|
return $xeCountdown
|
|
256
256
|
},
|
|
257
257
|
render () {
|
|
@@ -636,7 +636,7 @@ export default defineComponent({
|
|
|
636
636
|
datePickerMethods.dispatchEvent(evnt.type, { value: inputValue }, evnt)
|
|
637
637
|
}
|
|
638
638
|
|
|
639
|
-
const
|
|
639
|
+
const handleChange = (value: string, evnt: Event | { type: string }) => {
|
|
640
640
|
reactData.inputValue = value
|
|
641
641
|
emit('update:modelValue', value)
|
|
642
642
|
if (XEUtils.toValueString(props.modelValue) !== value) {
|
|
@@ -656,7 +656,7 @@ export default defineComponent({
|
|
|
656
656
|
reactData.inputValue = value
|
|
657
657
|
if (!isDatePickerType) {
|
|
658
658
|
if (inpImmediate) {
|
|
659
|
-
|
|
659
|
+
handleChange(value, evnt)
|
|
660
660
|
} else {
|
|
661
661
|
datePickerMethods.dispatchEvent('input', { value }, evnt)
|
|
662
662
|
}
|
|
@@ -702,7 +702,7 @@ export default defineComponent({
|
|
|
702
702
|
if (isDatePickerType) {
|
|
703
703
|
hidePanel()
|
|
704
704
|
}
|
|
705
|
-
|
|
705
|
+
handleChange('', evnt)
|
|
706
706
|
datePickerMethods.dispatchEvent('clear', { value }, evnt)
|
|
707
707
|
}
|
|
708
708
|
|
|
@@ -820,19 +820,19 @@ export default defineComponent({
|
|
|
820
820
|
datetimeRest.push(item)
|
|
821
821
|
}
|
|
822
822
|
})
|
|
823
|
-
|
|
823
|
+
handleChange(datetimeRest.map(date => XEUtils.toDateString(date, dateValueFormat)).join(','), { type: 'update' })
|
|
824
824
|
} else {
|
|
825
825
|
// 如果是日期类型
|
|
826
826
|
if (dateMultipleValue.some(val => XEUtils.isEqual(val, inpVal))) {
|
|
827
|
-
|
|
827
|
+
handleChange(dateMultipleValue.filter(val => !XEUtils.isEqual(val, inpVal)).join(','), { type: 'update' })
|
|
828
828
|
} else {
|
|
829
|
-
|
|
829
|
+
handleChange(dateMultipleValue.concat([inpVal]).join(','), { type: 'update' })
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
832
|
} else {
|
|
833
833
|
// 如果为单选
|
|
834
834
|
if (!XEUtils.isEqual(modelValue, inpVal)) {
|
|
835
|
-
|
|
835
|
+
handleChange(inpVal, { type: 'update' })
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
}
|
|
@@ -849,7 +849,7 @@ export default defineComponent({
|
|
|
849
849
|
if (type === 'time') {
|
|
850
850
|
inpDateVal = XEUtils.toDateString(inpDateVal, dateLabelFormat)
|
|
851
851
|
if (inputValue !== inpDateVal) {
|
|
852
|
-
|
|
852
|
+
handleChange(inpDateVal, { type: 'check' })
|
|
853
853
|
}
|
|
854
854
|
reactData.inputValue = inpDateVal
|
|
855
855
|
} else {
|
|
@@ -877,7 +877,7 @@ export default defineComponent({
|
|
|
877
877
|
dateRevert()
|
|
878
878
|
}
|
|
879
879
|
} else {
|
|
880
|
-
|
|
880
|
+
handleChange('', { type: 'check' })
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
}
|
|
@@ -886,7 +886,7 @@ export default defineComponent({
|
|
|
886
886
|
const { inputValue } = reactData
|
|
887
887
|
const inpImmediate = computeInpImmediate.value
|
|
888
888
|
if (!inpImmediate) {
|
|
889
|
-
|
|
889
|
+
handleChange(inputValue, evnt)
|
|
890
890
|
}
|
|
891
891
|
afterCheckValue()
|
|
892
892
|
if (!reactData.visiblePanel) {
|
|
@@ -1155,10 +1155,10 @@ export default defineComponent({
|
|
|
1155
1155
|
datetimeRest.push(item)
|
|
1156
1156
|
}
|
|
1157
1157
|
})
|
|
1158
|
-
|
|
1158
|
+
handleChange(datetimeRest.map(date => XEUtils.toDateString(date, dateValueFormat)).join(','), { type: 'update' })
|
|
1159
1159
|
} else {
|
|
1160
1160
|
// 如果是日期类型
|
|
1161
|
-
|
|
1161
|
+
handleChange(dateMultipleValue.join(','), { type: 'update' })
|
|
1162
1162
|
}
|
|
1163
1163
|
} else {
|
|
1164
1164
|
dateChange(dateValue || reactData.currentDate)
|
|
@@ -465,8 +465,6 @@ export default defineComponent({
|
|
|
465
465
|
])
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
$xeDrawer.renderVN = renderVN
|
|
469
|
-
|
|
470
468
|
watch(() => props.width, recalculate)
|
|
471
469
|
watch(() => props.height, recalculate)
|
|
472
470
|
|
|
@@ -496,6 +494,8 @@ export default defineComponent({
|
|
|
496
494
|
|
|
497
495
|
provide('$xeDrawer', '$xeDrawer')
|
|
498
496
|
|
|
497
|
+
$xeDrawer.renderVN = renderVN
|
|
498
|
+
|
|
499
499
|
return $xeDrawer
|
|
500
500
|
},
|
|
501
501
|
render () {
|
|
@@ -8,8 +8,6 @@ import type { VxeButtonComponent } from '../../../types/all'
|
|
|
8
8
|
|
|
9
9
|
const componentDefaultModelProp = 'modelValue'
|
|
10
10
|
|
|
11
|
-
const defaultCompProps = { transfer: true }
|
|
12
|
-
|
|
13
11
|
/**
|
|
14
12
|
* 已废弃
|
|
15
13
|
* @deprecated
|
|
@@ -39,7 +37,7 @@ function getNativeAttrs (renderOpts: any) {
|
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
function getComponentFormItemProps (renderOpts: any, params: any, value: any, defaultProps?: any) {
|
|
42
|
-
return XEUtils.assign({},
|
|
40
|
+
return XEUtils.assign({}, defaultProps, renderOpts.props, { [componentDefaultModelProp]: value })
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
/**
|
|
@@ -19,11 +19,12 @@ const VxeFormConfigItem = defineComponent({
|
|
|
19
19
|
provide('xeFormItemInfo', xeformiteminfo)
|
|
20
20
|
|
|
21
21
|
const renderVN = () => {
|
|
22
|
-
const
|
|
23
|
-
const
|
|
22
|
+
const formProps = $xeForm.props
|
|
23
|
+
const formReactData = $xeForm.reactData
|
|
24
|
+
const { data, rules, readonly, disabled, span: allSpan, align: allAlign, titleBold: allTitleBold, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical, padding: allPadding } = formProps
|
|
24
25
|
const { computeValidOpts } = $xeForm.getComputeMaps()
|
|
25
26
|
const item = props.itemConfig as VxeFormDefines.ItemInfo
|
|
26
|
-
const { collapseAll } =
|
|
27
|
+
const { collapseAll } = formReactData
|
|
27
28
|
const validOpts = computeValidOpts.value
|
|
28
29
|
const { slots, title, visible, folding, field, collapseNode, itemRender, showError, errRule, className, titleOverflow, vertical, padding, children, showTitle, contentClassName, contentStyle, titleClassName, titleStyle } = item
|
|
29
30
|
const compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null
|
|
@@ -11,7 +11,7 @@ export default defineComponent({
|
|
|
11
11
|
setup (props, { slots }) {
|
|
12
12
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
13
13
|
const $xeForm = inject('$xeForm', {} as VxeFormConstructor & VxeFormPrivateMethods)
|
|
14
|
-
const
|
|
14
|
+
const $xeParentFormGather = inject<XEFormItemProvide | null>('$xeFormGather', null)
|
|
15
15
|
const formItem = reactive(createItem($xeForm, props))
|
|
16
16
|
formItem.children = []
|
|
17
17
|
|
|
@@ -21,7 +21,8 @@ export default defineComponent({
|
|
|
21
21
|
watchItem(props, formItem)
|
|
22
22
|
|
|
23
23
|
onMounted(() => {
|
|
24
|
-
|
|
24
|
+
const elem = refElem.value
|
|
25
|
+
assembleItem($xeForm, elem, formItem, $xeParentFormGather)
|
|
25
26
|
})
|
|
26
27
|
|
|
27
28
|
onUnmounted(() => {
|
|
@@ -32,9 +33,10 @@ export default defineComponent({
|
|
|
32
33
|
const { className, field } = props
|
|
33
34
|
const span = props.span || ($xeForm ? $xeForm.props.span : null)
|
|
34
35
|
const defaultSlot = slots.default
|
|
36
|
+
const params = { $form: $xeForm, data: $xeForm ? $xeForm.props.data : {}, item: formItem as any, field: field as string, property: field as string }
|
|
35
37
|
return h('div', {
|
|
36
38
|
ref: refElem,
|
|
37
|
-
class: ['vxe-form--gather vxe-form--item-row', formItem.id, span ? `vxe-form--item-col_${span} is--span` : '', className ? (XEUtils.isFunction(className) ? className(
|
|
39
|
+
class: ['vxe-form--gather vxe-form--item-row', formItem.id, span ? `vxe-form--item-col_${span} is--span` : '', className ? (XEUtils.isFunction(className) ? className(params) : className) : '']
|
|
38
40
|
}, defaultSlot ? defaultSlot({}) : [])
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -58,7 +58,10 @@ export const formItemProps = {
|
|
|
58
58
|
titleSuffix: Object as PropType<VxeFormItemPropTypes.TitleSuffix>,
|
|
59
59
|
resetValue: { default: null },
|
|
60
60
|
visibleMethod: Function as PropType<VxeFormItemPropTypes.VisibleMethod>,
|
|
61
|
-
visible: {
|
|
61
|
+
visible: {
|
|
62
|
+
type: Boolean as PropType<VxeFormItemPropTypes.Visible>,
|
|
63
|
+
default: null
|
|
64
|
+
},
|
|
62
65
|
folding: Boolean as PropType<VxeFormItemPropTypes.Folding>,
|
|
63
66
|
collapseNode: Boolean as PropType<VxeFormItemPropTypes.CollapseNode>,
|
|
64
67
|
itemRender: Object as PropType<VxeFormItemPropTypes.ItemRender>,
|
|
@@ -71,7 +74,7 @@ export default defineComponent({
|
|
|
71
74
|
setup (props, { slots }) {
|
|
72
75
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
73
76
|
const $xeForm = inject('$xeForm', {} as VxeFormConstructor & VxeFormPrivateMethods)
|
|
74
|
-
const
|
|
77
|
+
const $xeFormGather = inject<XEFormItemProvide | null>('$xeFormGather', null)
|
|
75
78
|
const formItem = reactive(createItem($xeForm, props))
|
|
76
79
|
formItem.slots = slots
|
|
77
80
|
|
|
@@ -81,7 +84,8 @@ export default defineComponent({
|
|
|
81
84
|
watchItem(props, formItem)
|
|
82
85
|
|
|
83
86
|
onMounted(() => {
|
|
84
|
-
|
|
87
|
+
const elem = refElem.value
|
|
88
|
+
assembleItem($xeForm, elem, formItem, $xeFormGather)
|
|
85
89
|
})
|
|
86
90
|
|
|
87
91
|
onUnmounted(() => {
|
|
@@ -89,9 +93,10 @@ export default defineComponent({
|
|
|
89
93
|
})
|
|
90
94
|
|
|
91
95
|
const renderItem = ($xeForm: VxeFormConstructor & VxeFormPrivateMethods, item: VxeFormDefines.ItemInfo) => {
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const {
|
|
96
|
+
const formProps = $xeForm.props
|
|
97
|
+
const formReactData = $xeForm.reactData
|
|
98
|
+
const { data, rules, readonly, disabled, titleBold: allTitleBold, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical, padding: allPadding } = formProps
|
|
99
|
+
const { collapseAll } = formReactData
|
|
95
100
|
const { computeValidOpts } = $xeForm.getComputeMaps()
|
|
96
101
|
const validOpts = computeValidOpts.value
|
|
97
102
|
const { slots, title, visible, folding, field, collapseNode, itemRender, showError, errRule, className, titleOverflow, vertical, padding, showTitle, contentClassName, contentStyle, titleClassName, titleStyle } = item
|
|
@@ -104,8 +109,8 @@ export default defineComponent({
|
|
|
104
109
|
const itemTitleStyle = compConf ? (compConf.formItemTitleStyle || compConf.itemTitleStyle) : null
|
|
105
110
|
const defaultSlot = slots ? slots.default : null
|
|
106
111
|
const titleSlot = slots ? slots.title : null
|
|
107
|
-
const span = item.span ||
|
|
108
|
-
const align = item.align ||
|
|
112
|
+
const span = item.span || formProps.span
|
|
113
|
+
const align = item.align || formProps.align
|
|
109
114
|
const itemPadding = XEUtils.eqNull(padding) ? allPadding : padding
|
|
110
115
|
const itemVertical = XEUtils.eqNull(vertical) ? allVertical : vertical
|
|
111
116
|
const titleBold = XEUtils.eqNull(item.titleBold) ? allTitleBold : item.titleBold
|
|
@@ -243,8 +248,8 @@ export default defineComponent({
|
|
|
243
248
|
}
|
|
244
249
|
|
|
245
250
|
const renderVN = () => {
|
|
246
|
-
const
|
|
247
|
-
return
|
|
251
|
+
const customLayout = $xeForm ? $xeForm.props.customLayout : false
|
|
252
|
+
return customLayout
|
|
248
253
|
? renderItem($xeForm, formItem as unknown as VxeFormDefines.ItemInfo)
|
|
249
254
|
: h('div', {
|
|
250
255
|
ref: refElem
|
|
@@ -71,7 +71,10 @@ function getResetValue (value: any, resetValue: any) {
|
|
|
71
71
|
export default defineComponent({
|
|
72
72
|
name: 'VxeForm',
|
|
73
73
|
props: {
|
|
74
|
-
collapseStatus: {
|
|
74
|
+
collapseStatus: {
|
|
75
|
+
type: Boolean as PropType<VxeFormPropTypes.CollapseStatus>,
|
|
76
|
+
default: true
|
|
77
|
+
},
|
|
75
78
|
loading: Boolean as PropType<VxeFormPropTypes.Loading>,
|
|
76
79
|
data: Object as PropType<VxeFormPropTypes.Data>,
|
|
77
80
|
size: {
|
|
@@ -156,7 +159,8 @@ export default defineComponent({
|
|
|
156
159
|
})
|
|
157
160
|
|
|
158
161
|
const internalData = reactive<FormInternalData>({
|
|
159
|
-
|
|
162
|
+
meTimeout: undefined,
|
|
163
|
+
stTimeout: undefined,
|
|
160
164
|
tooltipStore: {
|
|
161
165
|
item: null,
|
|
162
166
|
visible: false
|
|
@@ -455,15 +459,13 @@ export default defineComponent({
|
|
|
455
459
|
})
|
|
456
460
|
}
|
|
457
461
|
|
|
458
|
-
let showErrTime: number
|
|
459
|
-
|
|
460
462
|
const beginValidate = (itemList: VxeFormDefines.ItemInfo[], type?: string, callback?: any): Promise<any> => {
|
|
461
463
|
const { data, rules: formRules } = props
|
|
462
464
|
const validOpts = computeValidOpts.value
|
|
463
465
|
const validRest: any = {}
|
|
464
466
|
const validFields: string[] = []
|
|
465
467
|
const itemValids: any[] = []
|
|
466
|
-
clearTimeout(
|
|
468
|
+
clearTimeout(internalData.meTimeout)
|
|
467
469
|
if (data && formRules) {
|
|
468
470
|
itemList.forEach((item) => {
|
|
469
471
|
const { field } = item
|
|
@@ -490,7 +492,7 @@ export default defineComponent({
|
|
|
490
492
|
}
|
|
491
493
|
}).catch(() => {
|
|
492
494
|
return new Promise<void>((resolve) => {
|
|
493
|
-
|
|
495
|
+
internalData.meTimeout = window.setTimeout(() => {
|
|
494
496
|
itemList.forEach((item) => {
|
|
495
497
|
if (item.errRule) {
|
|
496
498
|
item.showError = true
|
|
@@ -585,7 +587,7 @@ export default defineComponent({
|
|
|
585
587
|
const overflowElem = (evnt.currentTarget as HTMLDivElement).children[0]
|
|
586
588
|
const content = (overflowElem.textContent || '').trim()
|
|
587
589
|
const isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth
|
|
588
|
-
clearTimeout(internalData.
|
|
590
|
+
clearTimeout(internalData.stTimeout)
|
|
589
591
|
if (tooltipStore.item !== item) {
|
|
590
592
|
closeTooltip()
|
|
591
593
|
}
|
|
@@ -607,7 +609,7 @@ export default defineComponent({
|
|
|
607
609
|
$tooltip.setActived(false)
|
|
608
610
|
}
|
|
609
611
|
if (tooltipOpts.enterable) {
|
|
610
|
-
internalData.
|
|
612
|
+
internalData.stTimeout = setTimeout(() => {
|
|
611
613
|
$tooltip = refTooltip.value
|
|
612
614
|
if ($tooltip && !$tooltip.isActived()) {
|
|
613
615
|
closeTooltip()
|
|
@@ -719,8 +721,6 @@ export default defineComponent({
|
|
|
719
721
|
])
|
|
720
722
|
}
|
|
721
723
|
|
|
722
|
-
$xeForm.renderVN = renderVN
|
|
723
|
-
|
|
724
724
|
const staticItemFlag = ref(0)
|
|
725
725
|
watch(() => reactData.staticItems.length, () => {
|
|
726
726
|
staticItemFlag.value++
|
|
@@ -773,6 +773,8 @@ export default defineComponent({
|
|
|
773
773
|
provide('$xeFormGather', null)
|
|
774
774
|
provide('$xeFormItem', null)
|
|
775
775
|
|
|
776
|
+
$xeForm.renderVN = renderVN
|
|
777
|
+
|
|
776
778
|
return $xeForm
|
|
777
779
|
},
|
|
778
780
|
render () {
|
|
@@ -30,7 +30,8 @@ function renderSuffixIcon (titleSuffix: VxeFormItemPropTypes.TitleSuffix) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export function renderTitle ($xeForm: VxeFormConstructor & VxeFormPrivateMethods, item: VxeFormDefines.ItemInfo) {
|
|
33
|
-
const
|
|
33
|
+
const formProps = $xeForm.props
|
|
34
|
+
const { data, readonly, disabled } = formProps
|
|
34
35
|
const { computeTooltipOpts } = $xeForm.getComputeMaps()
|
|
35
36
|
const { slots, field, itemRender, titlePrefix, titleSuffix } = item
|
|
36
37
|
const tooltipOpts = computeTooltipOpts.value
|
|
@@ -45,7 +45,8 @@ export function isActiveItem ($xeForm: VxeFormConstructor, formItem: VxeFormDefi
|
|
|
45
45
|
if (!visibleMethod) {
|
|
46
46
|
return true
|
|
47
47
|
}
|
|
48
|
-
const
|
|
48
|
+
const formProps = $xeForm.props
|
|
49
|
+
const { data } = formProps
|
|
49
50
|
return visibleMethod({ data, field, property: field, item: formItem, $form: $xeForm, $grid: $xeForm.xegrid })
|
|
50
51
|
}
|
|
51
52
|
|