vxe-pc-ui 4.9.31 → 4.9.32
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/button/src/button.js +1 -1
- package/es/date-picker/src/date-picker.js +1 -1
- package/es/date-range-picker/src/date-range-picker.js +1 -1
- package/es/form/render/index.js +1 -1
- package/es/form/src/form.js +4 -4
- package/es/form/src/itemInfo.js +4 -4
- package/es/icon/style.css +1 -1
- package/es/image-preview/index.js +1 -1
- package/es/modal/src/modal.js +1 -1
- package/es/pager/src/pager.js +2 -2
- package/es/select/src/select.js +25 -2
- package/es/split/src/split.js +5 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +23 -10
- package/es/tabs/src/tabs.js +2 -2
- package/es/tree/src/tree.js +7 -3
- package/es/tree-select/src/tree-select.js +16 -4
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +2 -2
- package/lib/button/src/button.js +1 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +1 -1
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/form/render/index.js +1 -1
- package/lib/form/render/index.min.js +1 -1
- package/lib/form/src/form.js +4 -4
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +4 -4
- package/lib/form/src/itemInfo.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/image-preview/index.js +1 -1
- package/lib/image-preview/index.min.js +1 -1
- package/lib/index.umd.js +103 -45
- package/lib/index.umd.min.js +1 -1
- package/lib/modal/src/modal.js +1 -1
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/pager/src/pager.js +2 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/select/src/select.js +29 -2
- package/lib/select/src/select.min.js +1 -1
- package/lib/split/src/split.js +5 -5
- package/lib/split/src/split.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/src/table-select.js +24 -10
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tabs/src/tabs.js +2 -2
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tree/src/tree.js +6 -2
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +17 -4
- 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/lib/upload/src/upload.js +2 -2
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/button/src/button.ts +1 -1
- package/packages/date-picker/src/date-picker.ts +1 -1
- package/packages/date-range-picker/src/date-range-picker.ts +1 -1
- package/packages/form/render/index.ts +1 -1
- package/packages/form/src/form.ts +4 -4
- package/packages/form/src/itemInfo.ts +4 -4
- package/packages/image-preview/index.ts +2 -1
- package/packages/modal/src/modal.ts +1 -1
- package/packages/pager/src/pager.ts +2 -2
- package/packages/select/src/select.ts +25 -2
- package/packages/split/src/split.ts +5 -5
- package/packages/table-select/src/table-select.ts +24 -11
- package/packages/tabs/src/tabs.ts +2 -2
- package/packages/tree/src/tree.ts +6 -3
- package/packages/tree-select/src/tree-select.ts +16 -4
- package/packages/upload/index.ts +1 -0
- package/packages/upload/src/upload.ts +2 -2
- package/types/components/select.d.ts +2 -0
- package/types/components/table-select.d.ts +3 -1
- package/types/components/tree-select.d.ts +2 -0
- package/types/components/tree.d.ts +8 -0
- /package/es/icon/{iconfont.1758099912007.ttf → iconfont.1758173429533.ttf} +0 -0
- /package/es/icon/{iconfont.1758099912007.woff → iconfont.1758173429533.woff} +0 -0
- /package/es/icon/{iconfont.1758099912007.woff2 → iconfont.1758173429533.woff2} +0 -0
- /package/es/{iconfont.1758099912007.ttf → iconfont.1758173429533.ttf} +0 -0
- /package/es/{iconfont.1758099912007.woff → iconfont.1758173429533.woff} +0 -0
- /package/es/{iconfont.1758099912007.woff2 → iconfont.1758173429533.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1758099912007.ttf → iconfont.1758173429533.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1758099912007.woff → iconfont.1758173429533.woff} +0 -0
- /package/lib/icon/style/{iconfont.1758099912007.woff2 → iconfont.1758173429533.woff2} +0 -0
- /package/lib/{iconfont.1758099912007.ttf → iconfont.1758173429533.ttf} +0 -0
- /package/lib/{iconfont.1758099912007.woff → iconfont.1758173429533.woff} +0 -0
- /package/lib/{iconfont.1758099912007.woff2 → iconfont.1758173429533.woff2} +0 -0
|
@@ -102,6 +102,7 @@ export default defineVxeComponent({
|
|
|
102
102
|
// 已废弃
|
|
103
103
|
isHover: Boolean as PropType<VxeTreePropTypes.IsHover>,
|
|
104
104
|
expandAll: Boolean as PropType<VxeTreePropTypes.ExpandAll>,
|
|
105
|
+
expandNodeKeys: Array as PropType<VxeTreePropTypes.ExpandNodeKeys>,
|
|
105
106
|
showLine: {
|
|
106
107
|
type: Boolean as PropType<VxeTreePropTypes.ShowLine>,
|
|
107
108
|
default: () => getConfig().tree.showLine
|
|
@@ -666,7 +667,7 @@ export default defineVxeComponent({
|
|
|
666
667
|
const triggerSearchEvent = XEUtils.debounce(() => handleData(true), 350, { trailing: true })
|
|
667
668
|
|
|
668
669
|
const loadData = (list: any[]) => {
|
|
669
|
-
const { expandAll, transform } = props
|
|
670
|
+
const { expandAll, expandNodeKeys, transform } = props
|
|
670
671
|
const { initialized, scrollYStore } = internalData
|
|
671
672
|
const keyField = computeKeyField.value
|
|
672
673
|
const parentField = computeParentField.value
|
|
@@ -683,7 +684,7 @@ export default defineVxeComponent({
|
|
|
683
684
|
handleData(true)
|
|
684
685
|
if (sYLoad) {
|
|
685
686
|
if (!(props.height || props.maxHeight)) {
|
|
686
|
-
errLog('vxe.error.reqProp', ['height | max-height | virtual-y-config.enabled=false'])
|
|
687
|
+
errLog('vxe.error.reqProp', ['[tree] height | max-height | virtual-y-config.enabled=false'])
|
|
687
688
|
}
|
|
688
689
|
}
|
|
689
690
|
return computeScrollLoad().then(() => {
|
|
@@ -692,6 +693,8 @@ export default defineVxeComponent({
|
|
|
692
693
|
internalData.initialized = true
|
|
693
694
|
if (expandAll) {
|
|
694
695
|
$xeTree.setAllExpandNode(true)
|
|
696
|
+
} else if (expandNodeKeys && expandNodeKeys.length) {
|
|
697
|
+
$xeTree.setExpandByNodeId(expandNodeKeys, true)
|
|
695
698
|
}
|
|
696
699
|
handleSetCheckboxByNodeId(props.checkNodeKeys || [], true)
|
|
697
700
|
}
|
|
@@ -1558,7 +1561,7 @@ export default defineVxeComponent({
|
|
|
1558
1561
|
XEUtils.eachTree(nodeList, (childRow, index, items, path, parent, nodes) => {
|
|
1559
1562
|
const itemNodeId = getNodeId(childRow)
|
|
1560
1563
|
nodeMaps[itemNodeId] = {
|
|
1561
|
-
item:
|
|
1564
|
+
item: childRow,
|
|
1562
1565
|
index: -1,
|
|
1563
1566
|
items,
|
|
1564
1567
|
parent: parent || parentNodeItem.item,
|
|
@@ -50,6 +50,7 @@ export default defineVxeComponent({
|
|
|
50
50
|
popupClassName: [String, Function] as PropType<VxeTreeSelectPropTypes.PopupClassName>,
|
|
51
51
|
prefixIcon: String as PropType<VxeTreeSelectPropTypes.PrefixIcon>,
|
|
52
52
|
placement: String as PropType<VxeTreeSelectPropTypes.Placement>,
|
|
53
|
+
lazyOptions: Array as PropType<VxeTreeSelectPropTypes.LazyOptions>,
|
|
53
54
|
options: Array as PropType<VxeTreeSelectPropTypes.Options>,
|
|
54
55
|
optionProps: Object as PropType<VxeTreeSelectPropTypes.OptionProps>,
|
|
55
56
|
zIndex: Number as PropType<VxeTreeSelectPropTypes.ZIndex>,
|
|
@@ -257,13 +258,23 @@ export default defineVxeComponent({
|
|
|
257
258
|
})
|
|
258
259
|
|
|
259
260
|
const computeSelectLabel = computed(() => {
|
|
260
|
-
const { modelValue } = props
|
|
261
|
+
const { modelValue, lazyOptions } = props
|
|
261
262
|
const { fullNodeMaps } = internalData
|
|
263
|
+
const valueField = computeValueField.value
|
|
262
264
|
const labelField = computeLabelField.value
|
|
263
265
|
const selectVals = XEUtils.eqNull(modelValue) ? [] : (XEUtils.isArray(modelValue) ? modelValue : [modelValue])
|
|
264
266
|
return selectVals.map(val => {
|
|
265
267
|
const cacheItem = fullNodeMaps[val]
|
|
266
|
-
|
|
268
|
+
if (cacheItem) {
|
|
269
|
+
return cacheItem.item[labelField]
|
|
270
|
+
}
|
|
271
|
+
if (lazyOptions) {
|
|
272
|
+
const lazyItem = lazyOptions.find(item => item[valueField] === val)
|
|
273
|
+
if (lazyItem) {
|
|
274
|
+
return lazyItem[labelField]
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return val
|
|
267
278
|
}).join(', ')
|
|
268
279
|
})
|
|
269
280
|
|
|
@@ -334,12 +345,12 @@ export default defineVxeComponent({
|
|
|
334
345
|
nodeid = getOptUniqueId()
|
|
335
346
|
}
|
|
336
347
|
if (keyMaps[nodeid]) {
|
|
337
|
-
errLog('vxe.error.repeatKey', [nodeKeyField
|
|
348
|
+
errLog('vxe.error.repeatKey', [`[tree-select] ${nodeKeyField}`, nodeid])
|
|
338
349
|
}
|
|
339
350
|
keyMaps[nodeid] = true
|
|
340
351
|
const value = item[valueField]
|
|
341
352
|
if (nodeMaps[value]) {
|
|
342
|
-
errLog('vxe.error.repeatKey', [valueField
|
|
353
|
+
errLog('vxe.error.repeatKey', [`[tree-select] ${valueField}`, value])
|
|
343
354
|
}
|
|
344
355
|
nodeMaps[value] = { item, index, items, parent, nodes }
|
|
345
356
|
}
|
|
@@ -820,6 +831,7 @@ export default defineVxeComponent({
|
|
|
820
831
|
hasChildField: treeOpts.hasChildField || hasChildField,
|
|
821
832
|
accordion: treeOpts.accordion,
|
|
822
833
|
expandAll: treeOpts.expandAll,
|
|
834
|
+
expandNodeKeys: treeOpts.expandNodeKeys,
|
|
823
835
|
nodeConfig: treeNodeOpts,
|
|
824
836
|
lazy: treeOpts.lazy,
|
|
825
837
|
loadMethod: treeOpts.loadMethod,
|
package/packages/upload/index.ts
CHANGED
|
@@ -1772,10 +1772,10 @@ export default defineVxeComponent({
|
|
|
1772
1772
|
|
|
1773
1773
|
onMounted(() => {
|
|
1774
1774
|
if (props.multiple && props.singleMode) {
|
|
1775
|
-
errLog('vxe.error.errConflicts', ['multiple', 'single-mode'])
|
|
1775
|
+
errLog('vxe.error.errConflicts', ['[upload] multiple', 'single-mode'])
|
|
1776
1776
|
}
|
|
1777
1777
|
if (props.imageStyle) {
|
|
1778
|
-
warnLog('vxe.error.delProp', ['image-style', 'image-config'])
|
|
1778
|
+
warnLog('vxe.error.delProp', ['[upload] image-style', 'image-config'])
|
|
1779
1779
|
}
|
|
1780
1780
|
|
|
1781
1781
|
if (props.dragSort) {
|
|
@@ -49,6 +49,7 @@ export namespace VxeSelectPropTypes {
|
|
|
49
49
|
export type PrefixIcon = string
|
|
50
50
|
export type AllowCreate = boolean
|
|
51
51
|
export type Placement = 'top' | 'bottom' | ''
|
|
52
|
+
export type LazyOptions = VxeSelectDefines.SelectOptions[]
|
|
52
53
|
export type Options = VxeSelectDefines.SelectOptions[]
|
|
53
54
|
export type OptionProps = {
|
|
54
55
|
value?: string
|
|
@@ -150,6 +151,7 @@ export interface VxeSelectProps {
|
|
|
150
151
|
prefixIcon?: VxeSelectPropTypes.PrefixIcon
|
|
151
152
|
allowCreate?: VxeSelectPropTypes.AllowCreate
|
|
152
153
|
placement?: VxeSelectPropTypes.Placement
|
|
154
|
+
lazyOptions?: VxeSelectPropTypes.LazyOptions
|
|
153
155
|
options?: VxeSelectPropTypes.Options
|
|
154
156
|
optionProps?: VxeSelectPropTypes.OptionProps
|
|
155
157
|
optionGroups?: VxeSelectPropTypes.OptionGroups
|
|
@@ -38,6 +38,7 @@ export namespace VxeTableSelectPropTypes {
|
|
|
38
38
|
export type Placement = 'top' | 'bottom'
|
|
39
39
|
export type Columns<D = any> = VxeGridPropTypes.Columns<D>
|
|
40
40
|
export type Options<D = any> = D[]
|
|
41
|
+
export type LazyOptions<D = any> = D[]
|
|
41
42
|
export interface OptionProps {
|
|
42
43
|
value?: string
|
|
43
44
|
label?: string
|
|
@@ -50,7 +51,7 @@ export namespace VxeTableSelectPropTypes {
|
|
|
50
51
|
height?: number | string
|
|
51
52
|
className?: string | ((params: { $tableSelect: VxeTableSelectConstructor }) => string)
|
|
52
53
|
}
|
|
53
|
-
export type GridConfig<D = any> = Omit<VxeGridProps<D>, 'data' | '
|
|
54
|
+
export type GridConfig<D = any> = Omit<VxeGridProps<D>, 'data' | 'height' | 'maxHeight' | 'minHeight' | 'size'>
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
export interface VxeTableSelectProps<D = any> {
|
|
@@ -68,6 +69,7 @@ export interface VxeTableSelectProps<D = any> {
|
|
|
68
69
|
placement?: VxeTableSelectPropTypes.Placement
|
|
69
70
|
columns?: VxeTableSelectPropTypes.Columns
|
|
70
71
|
options?: VxeTableSelectPropTypes.Options
|
|
72
|
+
lazyOptions?: VxeTableSelectPropTypes.LazyOptions
|
|
71
73
|
optionProps?: VxeTableSelectPropTypes.OptionProps
|
|
72
74
|
transfer?: VxeTableSelectPropTypes.Transfer
|
|
73
75
|
popupConfig?: VxeTableSelectPropTypes.PopupConfig
|
|
@@ -55,6 +55,7 @@ export namespace VxeTreeSelectPropTypes {
|
|
|
55
55
|
|
|
56
56
|
[key: string]: any
|
|
57
57
|
}
|
|
58
|
+
export type LazyOptions<D = Option> = D[]
|
|
58
59
|
export type Options<D = Option> = D[]
|
|
59
60
|
export interface OptionProps {
|
|
60
61
|
value?: string
|
|
@@ -140,6 +141,7 @@ export interface VxeTreeSelectProps<D = any> {
|
|
|
140
141
|
placement?: VxeTreeSelectPropTypes.Placement
|
|
141
142
|
filterable?: VxeTreeSelectPropTypes.Filterable
|
|
142
143
|
filterConfig?: VxeTreeSelectPropTypes.FilterConfig
|
|
144
|
+
lazyOptions?: VxeTreeSelectPropTypes.LazyOptions<D>
|
|
143
145
|
options?: VxeTreeSelectPropTypes.Options<D>
|
|
144
146
|
optionProps?: VxeTreeSelectPropTypes.OptionProps
|
|
145
147
|
remote?: VxeTreeSelectPropTypes.Remote
|
|
@@ -63,6 +63,7 @@ export namespace VxeTreePropTypes {
|
|
|
63
63
|
export type ShowLine = boolean
|
|
64
64
|
export type Indent = number
|
|
65
65
|
export type ExpandAll = boolean
|
|
66
|
+
export type ExpandNodeKeys = string[] | number[]
|
|
66
67
|
export type ShowRadio = boolean
|
|
67
68
|
export type CheckNodeKey = string | number | null
|
|
68
69
|
export interface RadioConfig<D = any> {
|
|
@@ -183,7 +184,14 @@ export interface VxeTreeProps<D = any> {
|
|
|
183
184
|
childrenField?: VxeTreePropTypes.ChildrenField
|
|
184
185
|
hasChildField?: VxeTreePropTypes.HasChildField
|
|
185
186
|
mapChildrenField?: VxeTreePropTypes.MapChildrenField
|
|
187
|
+
/**
|
|
188
|
+
* 默认展开所有节点(只会在初始化时被触发一次)
|
|
189
|
+
*/
|
|
186
190
|
expandAll?: VxeTreePropTypes.ExpandAll
|
|
191
|
+
/**
|
|
192
|
+
* 默认展开指定节点(只会在初始化时被触发一次)
|
|
193
|
+
*/
|
|
194
|
+
expandNodeKeys?: VxeTreePropTypes.ExpandNodeKeys
|
|
187
195
|
transform?: VxeTreePropTypes.Transform
|
|
188
196
|
trigger?: VxeTreePropTypes.Trigger
|
|
189
197
|
/**
|
|
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
|