vxe-pc-ui 3.14.23 → 3.14.24
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/es/date-panel/src/date-panel.js +3 -1
- package/es/date-picker/src/date-picker.js +7 -1
- package/es/tree/src/tree.js +18 -13
- package/es/tree-select/src/tree-select.js +19 -6
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/date-panel/src/date-panel.js +5 -1
- package/lib/date-panel/src/date-panel.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +7 -1
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/index.umd.js +61 -30
- package/lib/index.umd.min.js +1 -1
- package/lib/tree/src/tree.js +26 -18
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +21 -6
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +1 -1
- 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/package.json +1 -1
- package/packages/date-panel/src/date-panel.ts +3 -1
- package/packages/date-picker/src/date-picker.ts +10 -3
- package/packages/tree/src/tree.ts +18 -13
- package/packages/tree-select/src/tree-select.ts +19 -6
- package/types/components/date-panel.d.ts +15 -2
- /package/es/icon/{iconfont.1779801326952.ttf → iconfont.1779854987918.ttf} +0 -0
- /package/es/icon/{iconfont.1779801326952.woff → iconfont.1779854987918.woff} +0 -0
- /package/es/icon/{iconfont.1779801326952.woff2 → iconfont.1779854987918.woff2} +0 -0
- /package/es/{iconfont.1779801326952.ttf → iconfont.1779854987918.ttf} +0 -0
- /package/es/{iconfont.1779801326952.woff → iconfont.1779854987918.woff} +0 -0
- /package/es/{iconfont.1779801326952.woff2 → iconfont.1779854987918.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1779801326952.ttf → iconfont.1779854987918.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1779801326952.woff → iconfont.1779854987918.woff} +0 -0
- /package/lib/icon/style/{iconfont.1779801326952.woff2 → iconfont.1779854987918.woff2} +0 -0
- /package/lib/{iconfont.1779801326952.ttf → iconfont.1779854987918.ttf} +0 -0
- /package/lib/{iconfont.1779801326952.woff → iconfont.1779854987918.woff} +0 -0
- /package/lib/{iconfont.1779801326952.woff2 → iconfont.1779854987918.woff2} +0 -0
|
@@ -11,7 +11,7 @@ import VxeDatePanelComponent from '../../date-panel/src/date-panel'
|
|
|
11
11
|
import VxeButtonComponent from '../../button/src/button'
|
|
12
12
|
import VxeButtonGroupComponent from '../../button/src/button-group'
|
|
13
13
|
|
|
14
|
-
import type { VxeDatePickerConstructor, VxeDatePickerEmits, DatePickerInternalData, DatePickerReactData, VxeButtonGroupDefines, VxeComponentSizeType, VxeDatePickerPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDatePickerDefines, VxeDatePanelConstructor } from '../../../types'
|
|
14
|
+
import type { VxeDatePickerConstructor, VxeDatePickerEmits, DatePickerInternalData, DatePickerReactData, VxeButtonGroupDefines, VxeComponentSizeType, VxeDatePanelDefines, VxeDatePickerPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDatePickerDefines, VxeDatePanelConstructor } from '../../../types'
|
|
15
15
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
16
16
|
|
|
17
17
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
@@ -579,11 +579,17 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
},
|
|
582
|
-
panelConfirmEvent (params:
|
|
582
|
+
panelConfirmEvent (params: VxeDatePanelDefines.ConfirmEventParams) {
|
|
583
583
|
const $xeDatePicker = this
|
|
584
584
|
|
|
585
585
|
$xeDatePicker.dispatchEvent('confirm', params, params.$event)
|
|
586
586
|
},
|
|
587
|
+
panelRevertEvent (params: VxeDatePanelDefines.RevertEventParams) {
|
|
588
|
+
const $xeDatePicker = this
|
|
589
|
+
const reactData = $xeDatePicker.reactData
|
|
590
|
+
|
|
591
|
+
reactData.inputLabel = params.label
|
|
592
|
+
},
|
|
587
593
|
// 全局事件
|
|
588
594
|
handleGlobalMousedownEvent (evnt: Event) {
|
|
589
595
|
const $xeDatePicker = this
|
|
@@ -994,7 +1000,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
994
1000
|
},
|
|
995
1001
|
on: {
|
|
996
1002
|
change: $xeDatePicker.panelChangeEvent,
|
|
997
|
-
confirm: $xeDatePicker.panelConfirmEvent
|
|
1003
|
+
confirm: $xeDatePicker.panelConfirmEvent,
|
|
1004
|
+
revert: $xeDatePicker.panelRevertEvent
|
|
998
1005
|
}
|
|
999
1006
|
})
|
|
1000
1007
|
]),
|
|
@@ -1942,19 +1942,20 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1942
1942
|
evnt.preventDefault()
|
|
1943
1943
|
evnt.stopPropagation()
|
|
1944
1944
|
const { transform } = props
|
|
1945
|
-
const { selectCheckboxMaps } = internalData
|
|
1945
|
+
const { selectCheckboxMaps, nodeMaps } = internalData
|
|
1946
1946
|
const childrenField = $xeTree.computeChildrenField
|
|
1947
1947
|
const mapChildrenField = $xeTree.computeMapChildrenField
|
|
1948
1948
|
const checkboxOpts = $xeTree.computeCheckboxOpts
|
|
1949
|
-
const { checkStrictly, checkMethod } = checkboxOpts
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
}
|
|
1949
|
+
const { checkStrictly, checkMode, checkMethod } = checkboxOpts
|
|
1950
|
+
const nodeid = $xeTree.getNodeId(node)
|
|
1951
|
+
const childList: any[] = XEUtils.get(node, childrenField)
|
|
1952
|
+
const isExistChild = childList && childList.length > 0
|
|
1953
|
+
const nodeItem = nodeMaps[nodeid] || {}
|
|
1954
|
+
const nLevel = nodeItem.level
|
|
1955
|
+
const isDisabled = checkMethod ? !checkMethod({ $tree: $xeTree, node }) : !handleVisibleOrCheckMode(checkMode, isExistChild, nLevel)
|
|
1954
1956
|
if (isDisabled) {
|
|
1955
1957
|
return
|
|
1956
1958
|
}
|
|
1957
|
-
const nodeid = $xeTree.getNodeId(node)
|
|
1958
1959
|
let isChecked = false
|
|
1959
1960
|
if (selectCheckboxMaps[nodeid]) {
|
|
1960
1961
|
delete selectCheckboxMaps[nodeid]
|
|
@@ -2016,20 +2017,24 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2016
2017
|
changeRadioEvent (evnt: MouseEvent, node: any) {
|
|
2017
2018
|
const $xeTree = this
|
|
2018
2019
|
const reactData = $xeTree.reactData
|
|
2020
|
+
const internalData = $xeTree.internalData
|
|
2019
2021
|
|
|
2020
2022
|
evnt.preventDefault()
|
|
2021
2023
|
evnt.stopPropagation()
|
|
2024
|
+
const { nodeMaps } = internalData
|
|
2022
2025
|
const radioOpts = $xeTree.computeRadioOpts
|
|
2023
|
-
const
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2026
|
+
const childrenField = $xeTree.computeChildrenField
|
|
2027
|
+
const { checkMode, checkMethod } = radioOpts
|
|
2028
|
+
const nodeid = $xeTree.getNodeId(node)
|
|
2029
|
+
const childList: any[] = XEUtils.get(node, childrenField)
|
|
2030
|
+
const isExistChild = childList && childList.length > 0
|
|
2031
|
+
const nodeItem = nodeMaps[nodeid] || {}
|
|
2032
|
+
const nLevel = nodeItem.level
|
|
2033
|
+
const isDisabled = checkMethod ? !checkMethod({ $tree: $xeTree, node }) : !handleVisibleOrCheckMode(checkMode, isExistChild, nLevel)
|
|
2028
2034
|
if (isDisabled) {
|
|
2029
2035
|
return
|
|
2030
2036
|
}
|
|
2031
2037
|
const isChecked = true
|
|
2032
|
-
const nodeid = $xeTree.getNodeId(node)
|
|
2033
2038
|
const value = deNodeValue(nodeid)
|
|
2034
2039
|
reactData.selectRadioKey = nodeid
|
|
2035
2040
|
$xeTree.emitRadioMode(value)
|
|
@@ -322,11 +322,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
322
322
|
const propsOpts = $xeTreeSelect.computePropsOpts as VxeTreeSelectPropTypes.OptionProps
|
|
323
323
|
return propsOpts.children || 'children'
|
|
324
324
|
},
|
|
325
|
-
|
|
325
|
+
computeNodeParentField () {
|
|
326
326
|
const $xeTreeSelect = this
|
|
327
327
|
|
|
328
328
|
const propsOpts = $xeTreeSelect.computePropsOpts as VxeTreeSelectPropTypes.OptionProps
|
|
329
|
-
|
|
329
|
+
const treeOpts = $xeTreeSelect.computeTreeOpts as VxeTreeSelectPropTypes.TreeConfig
|
|
330
|
+
return propsOpts.parent || treeOpts.parentField || 'parentId'
|
|
330
331
|
},
|
|
331
332
|
computeHasChildField () {
|
|
332
333
|
const $xeTreeSelect = this
|
|
@@ -440,6 +441,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
440
441
|
const { separator } = props
|
|
441
442
|
const treeOpts = $xeTreeSelect.computeTreeOpts
|
|
442
443
|
const nodeKeyField = $xeTreeSelect.computeNodeKeyField
|
|
444
|
+
const nodeParentField = $xeTreeSelect.computeNodeParentField
|
|
443
445
|
const childrenField = $xeTreeSelect.computeChildrenField
|
|
444
446
|
const valueField = $xeTreeSelect.computeValueField
|
|
445
447
|
const labelField = $xeTreeSelect.computeLabelField
|
|
@@ -470,9 +472,20 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
470
472
|
}
|
|
471
473
|
if (optList) {
|
|
472
474
|
if (transform) {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
+
// if (showFullLabel) {
|
|
476
|
+
const treeList = XEUtils.toArrayTree(optList, {
|
|
477
|
+
key: nodeKeyField,
|
|
478
|
+
parentKey: nodeParentField,
|
|
479
|
+
mapChildren: childrenField,
|
|
480
|
+
rootParentValue: treeOpts.rootParentValue,
|
|
481
|
+
rootValues: treeOpts.rootValues
|
|
475
482
|
})
|
|
483
|
+
XEUtils.eachTree(treeList, handleOptNode, { children: childrenField })
|
|
484
|
+
// } else {
|
|
485
|
+
// optList.forEach((item, index, items) => {
|
|
486
|
+
// handleOptNode(item, index, items, [], null, [])
|
|
487
|
+
// })
|
|
488
|
+
// }
|
|
476
489
|
} else {
|
|
477
490
|
XEUtils.eachTree(optList, handleOptNode, { children: childrenField })
|
|
478
491
|
}
|
|
@@ -893,7 +906,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
893
906
|
const labelField = $xeTreeSelect.computeLabelField
|
|
894
907
|
const valueField = $xeTreeSelect.computeValueField
|
|
895
908
|
const childrenField = $xeTreeSelect.computeChildrenField
|
|
896
|
-
const
|
|
909
|
+
const nodeParentField = $xeTreeSelect.computeNodeParentField
|
|
897
910
|
const hasChildField = $xeTreeSelect.computeHasChildField
|
|
898
911
|
const virtualYOpts = $xeTreeSelect.computeVirtualYOpts
|
|
899
912
|
const filterOpts = $xeTreeSelect.computeFilterOpts
|
|
@@ -1088,7 +1101,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1088
1101
|
valueField: valueField,
|
|
1089
1102
|
keyField: nodeKeyField,
|
|
1090
1103
|
childrenField: treeOpts.childrenField || childrenField,
|
|
1091
|
-
parentField:
|
|
1104
|
+
parentField: nodeParentField,
|
|
1092
1105
|
hasChildField: treeOpts.hasChildField || hasChildField,
|
|
1093
1106
|
accordion: treeOpts.accordion,
|
|
1094
1107
|
expandAll: treeOpts.expandAll,
|
|
@@ -137,14 +137,16 @@ export interface DatePanelPrivateMethods { }
|
|
|
137
137
|
export interface VxeDatePanelPrivateMethods extends DatePanelPrivateMethods { }
|
|
138
138
|
|
|
139
139
|
export type VxeDatePanelEmits = [
|
|
140
|
-
'
|
|
140
|
+
'model-value',
|
|
141
|
+
'modelValue',
|
|
141
142
|
'change',
|
|
142
143
|
'click',
|
|
143
144
|
'clear',
|
|
144
145
|
'date-prev',
|
|
145
146
|
'date-today',
|
|
146
147
|
'date-next',
|
|
147
|
-
'confirm'
|
|
148
|
+
'confirm',
|
|
149
|
+
'revert'
|
|
148
150
|
]
|
|
149
151
|
|
|
150
152
|
export namespace VxeDatePanelDefines {
|
|
@@ -243,18 +245,29 @@ export namespace VxeDatePanelDefines {
|
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
export interface ChangeEventParams extends DatePanelEventParams, DatePanelParams { }
|
|
248
|
+
|
|
249
|
+
export interface ConfirmEventParams extends DatePanelEventParams {}
|
|
250
|
+
export interface RevertEventParams extends DatePanelEventParams {
|
|
251
|
+
label: string
|
|
252
|
+
}
|
|
246
253
|
}
|
|
247
254
|
|
|
248
255
|
export type VxeDatePanelEventProps = {
|
|
249
256
|
onChange?: VxeDatePanelEvents.Change
|
|
257
|
+
onConfirm?: VxeDatePanelEvents.Confirm
|
|
258
|
+
onRevert?: VxeDatePanelEvents.Revert
|
|
250
259
|
}
|
|
251
260
|
|
|
252
261
|
export interface VxeDatePanelListeners {
|
|
253
262
|
change?: VxeDatePanelEvents.Change
|
|
263
|
+
confirm?: VxeDatePanelEvents.Confirm
|
|
264
|
+
revert?: VxeDatePanelEvents.Revert
|
|
254
265
|
}
|
|
255
266
|
|
|
256
267
|
export namespace VxeDatePanelEvents {
|
|
257
268
|
export type Change = (params: VxeDatePanelDefines.ChangeEventParams) => void
|
|
269
|
+
export type Confirm = (params: VxeDatePanelDefines.ConfirmEventParams) => void
|
|
270
|
+
export type Revert = (params: VxeDatePanelDefines.RevertEventParams) => void
|
|
258
271
|
}
|
|
259
272
|
|
|
260
273
|
export namespace VxeDatePanelSlotTypes {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|