vxe-pc-ui 4.8.8 → 4.8.10

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.
Files changed (99) hide show
  1. package/README.md +1 -0
  2. package/es/color-picker/src/color-picker.js +12 -0
  3. package/es/color-picker/style.css +2 -5
  4. package/es/color-picker/style.min.css +1 -1
  5. package/es/components.js +3 -0
  6. package/es/form/src/form.js +16 -10
  7. package/es/gantt/index.js +12 -0
  8. package/es/gantt/src/gantt.js +61 -0
  9. package/es/gantt/style.css +0 -0
  10. package/es/gantt/style.min.css +0 -0
  11. package/es/icon/style.css +1 -1
  12. package/es/list/src/list.js +59 -55
  13. package/es/number-input/src/number-input.js +2 -2
  14. package/es/select/src/select.js +24 -20
  15. package/es/style.css +1 -1
  16. package/es/style.min.css +1 -1
  17. package/es/tree/src/tree.js +44 -31
  18. package/es/tree-select/src/tree-select.js +9 -5
  19. package/es/ui/index.js +4 -2
  20. package/es/ui/src/log.js +1 -1
  21. package/es/vxe-color-picker/style.css +2 -5
  22. package/es/vxe-color-picker/style.min.css +1 -1
  23. package/es/vxe-gantt/index.js +3 -0
  24. package/es/vxe-gantt/style.css +0 -0
  25. package/es/vxe-gantt/style.min.css +0 -0
  26. package/lib/color-picker/src/color-picker.js +12 -0
  27. package/lib/color-picker/src/color-picker.min.js +1 -1
  28. package/lib/color-picker/style/style.css +2 -5
  29. package/lib/color-picker/style/style.min.css +1 -1
  30. package/lib/components.js +13 -1
  31. package/lib/components.min.js +1 -1
  32. package/lib/form/src/form.js +15 -9
  33. package/lib/form/src/form.min.js +1 -1
  34. package/lib/gantt/index.js +19 -0
  35. package/lib/gantt/index.min.js +1 -0
  36. package/lib/gantt/src/gantt.js +72 -0
  37. package/lib/gantt/src/gantt.min.js +1 -0
  38. package/lib/gantt/style/index.js +1 -0
  39. package/lib/gantt/style/style.css +0 -0
  40. package/lib/gantt/style/style.min.css +0 -0
  41. package/lib/icon/style/style.css +1 -1
  42. package/lib/icon/style/style.min.css +1 -1
  43. package/lib/index.umd.js +265 -132
  44. package/lib/index.umd.min.js +1 -1
  45. package/lib/list/src/list.js +66 -62
  46. package/lib/list/src/list.min.js +1 -1
  47. package/lib/number-input/src/number-input.js +2 -2
  48. package/lib/number-input/src/number-input.min.js +1 -1
  49. package/lib/select/src/select.js +24 -20
  50. package/lib/select/src/select.min.js +1 -1
  51. package/lib/style.css +1 -1
  52. package/lib/style.min.css +1 -1
  53. package/lib/tree/src/tree.js +46 -30
  54. package/lib/tree/src/tree.min.js +1 -1
  55. package/lib/tree-select/src/tree-select.js +9 -5
  56. package/lib/tree-select/src/tree-select.min.js +1 -1
  57. package/lib/ui/index.js +4 -2
  58. package/lib/ui/index.min.js +1 -1
  59. package/lib/ui/src/log.js +1 -1
  60. package/lib/ui/src/log.min.js +1 -1
  61. package/lib/vxe-color-picker/style/style.css +2 -5
  62. package/lib/vxe-color-picker/style/style.min.css +1 -1
  63. package/lib/vxe-gantt/index.js +22 -0
  64. package/lib/vxe-gantt/index.min.js +1 -0
  65. package/lib/vxe-gantt/style/index.js +1 -0
  66. package/lib/vxe-gantt/style/style.css +0 -0
  67. package/lib/vxe-gantt/style/style.min.css +0 -0
  68. package/package.json +1 -1
  69. package/packages/color-picker/src/color-picker.ts +12 -0
  70. package/packages/components.ts +3 -0
  71. package/packages/form/src/form.ts +18 -10
  72. package/packages/gantt/index.ts +16 -0
  73. package/packages/gantt/src/gantt.ts +87 -0
  74. package/packages/list/src/list.ts +61 -56
  75. package/packages/number-input/src/number-input.ts +2 -2
  76. package/packages/select/src/select.ts +27 -22
  77. package/packages/tree/src/tree.ts +47 -35
  78. package/packages/tree-select/src/tree-select.ts +10 -5
  79. package/packages/ui/index.ts +3 -1
  80. package/styles/all.scss +1 -0
  81. package/styles/components/color-picker.scss +2 -5
  82. package/styles/components/gantt.scss +0 -0
  83. package/types/all.d.ts +3 -0
  84. package/types/components/gantt.d.ts +77 -0
  85. package/types/components/grid.d.ts +3 -0
  86. package/types/components/number-input.d.ts +4 -0
  87. package/types/ui/global-config.d.ts +2 -0
  88. /package/es/icon/{iconfont.1754439880814.ttf → iconfont.1754474084337.ttf} +0 -0
  89. /package/es/icon/{iconfont.1754439880814.woff → iconfont.1754474084337.woff} +0 -0
  90. /package/es/icon/{iconfont.1754439880814.woff2 → iconfont.1754474084337.woff2} +0 -0
  91. /package/es/{iconfont.1754439880814.ttf → iconfont.1754474084337.ttf} +0 -0
  92. /package/es/{iconfont.1754439880814.woff → iconfont.1754474084337.woff} +0 -0
  93. /package/es/{iconfont.1754439880814.woff2 → iconfont.1754474084337.woff2} +0 -0
  94. /package/lib/icon/style/{iconfont.1754439880814.ttf → iconfont.1754474084337.ttf} +0 -0
  95. /package/lib/icon/style/{iconfont.1754439880814.woff → iconfont.1754474084337.woff} +0 -0
  96. /package/lib/icon/style/{iconfont.1754439880814.woff2 → iconfont.1754474084337.woff2} +0 -0
  97. /package/lib/{iconfont.1754439880814.ttf → iconfont.1754474084337.ttf} +0 -0
  98. /package/lib/{iconfont.1754439880814.woff → iconfont.1754474084337.woff} +0 -0
  99. /package/lib/{iconfont.1754439880814.woff2 → iconfont.1754474084337.woff2} +0 -0
@@ -832,6 +832,9 @@ export default defineVxeComponent({
832
832
  maxLength: 3,
833
833
  placeholder: '',
834
834
  modelValue: rValue,
835
+ controlConfig: {
836
+ showButton: false
837
+ },
835
838
  'onUpdate:modelValue' (val) {
836
839
  reactData.rValue = val
837
840
  },
@@ -846,6 +849,9 @@ export default defineVxeComponent({
846
849
  maxLength: 3,
847
850
  placeholder: '',
848
851
  modelValue: gValue,
852
+ controlConfig: {
853
+ showButton: false
854
+ },
849
855
  'onUpdate:modelValue' (val) {
850
856
  reactData.gValue = val
851
857
  },
@@ -860,6 +866,9 @@ export default defineVxeComponent({
860
866
  maxLength: 3,
861
867
  placeholder: '',
862
868
  modelValue: bValue,
869
+ controlConfig: {
870
+ showButton: false
871
+ },
863
872
  'onUpdate:modelValue' (val) {
864
873
  reactData.bValue = val
865
874
  },
@@ -875,6 +884,9 @@ export default defineVxeComponent({
875
884
  maxLength: 4,
876
885
  placeholder: '',
877
886
  modelValue: aValue,
887
+ controlConfig: {
888
+ showButton: false
889
+ },
878
890
  'onUpdate:modelValue' (val) {
879
891
  reactData.aValue = val
880
892
  },
@@ -33,6 +33,7 @@ import VxeForm from './form'
33
33
  import VxeFormGather from './form-gather'
34
34
  import VxeFormGroup from './form-group'
35
35
  import VxeFormItem from './form-item'
36
+ import VxeGantt from './gantt'
36
37
  import VxeIcon from './icon'
37
38
  import VxeIconPicker from './icon-picker'
38
39
  import VxeImage from './image'
@@ -118,6 +119,7 @@ const components = [
118
119
  VxeFormGather,
119
120
  VxeFormGroup,
120
121
  VxeFormItem,
122
+ VxeGantt,
121
123
  VxeIcon,
122
124
  VxeIconPicker,
123
125
  VxeImage,
@@ -224,6 +226,7 @@ export * from './form'
224
226
  export * from './form-gather'
225
227
  export * from './form-group'
226
228
  export * from './form-item'
229
+ export * from './gantt'
227
230
  export * from './icon'
228
231
  export * from './icon-picker'
229
232
  export * from './image'
@@ -1,4 +1,4 @@
1
- import { h, ref, Ref, provide, computed, inject, reactive, watch, nextTick, PropType, onMounted } from 'vue'
1
+ import { h, ref, Ref, provide, computed, inject, reactive, watch, nextTick, PropType, onMounted, onUnmounted } from 'vue'
2
2
  import { defineVxeComponent } from '../../ui/src/comp'
3
3
  import XEUtils from 'xe-utils'
4
4
  import { getConfig, validators, renderer, createEvent, useSize } from '../../ui'
@@ -140,6 +140,18 @@ function checkRuleStatus (rule: VxeFormDefines.FormRule, val: any) {
140
140
  return true
141
141
  }
142
142
 
143
+ function createInternalData (): FormInternalData {
144
+ return {
145
+ meTimeout: undefined,
146
+ stTimeout: undefined,
147
+ tooltipStore: {
148
+ item: null,
149
+ visible: false
150
+ },
151
+ itemFormatCache: {}
152
+ }
153
+ }
154
+
143
155
  export default defineVxeComponent({
144
156
  name: 'VxeForm',
145
157
  props: {
@@ -246,15 +258,7 @@ export default defineVxeComponent({
246
258
  formItems: []
247
259
  })
248
260
 
249
- const internalData = reactive<FormInternalData>({
250
- meTimeout: undefined,
251
- stTimeout: undefined,
252
- tooltipStore: {
253
- item: null,
254
- visible: false
255
- },
256
- itemFormatCache: {}
257
- })
261
+ const internalData = createInternalData()
258
262
 
259
263
  const refElem = ref<HTMLFormElement>()
260
264
  const refTooltip = ref() as Ref<VxeTooltipInstance>
@@ -870,6 +874,10 @@ export default defineVxeComponent({
870
874
  })
871
875
  })
872
876
 
877
+ onUnmounted(() => {
878
+ XEUtils.assign(internalData, createInternalData())
879
+ })
880
+
873
881
  if (props.items) {
874
882
  loadItem(props.items)
875
883
  }
@@ -0,0 +1,16 @@
1
+ import { App } from 'vue'
2
+ import { VxeUI } from '@vxe-ui/core'
3
+ import VxeGanttComponent from './src/gantt'
4
+ import { dynamicApp } from '../dynamics'
5
+
6
+ export const VxeGantt = Object.assign({}, VxeGanttComponent, {
7
+ install (app: App) {
8
+ app.component(VxeGanttComponent.name as string, VxeGanttComponent)
9
+ }
10
+ })
11
+
12
+ dynamicApp.use(VxeGantt)
13
+ VxeUI.component(VxeGanttComponent)
14
+
15
+ export const Gantt = VxeGantt
16
+ export default VxeGantt
@@ -0,0 +1,87 @@
1
+ import { ref, h, reactive, PropType, onUnmounted } from 'vue'
2
+ import { defineVxeComponent } from '../../ui/src/comp'
3
+ import { getConfig, createEvent } from '../../ui'
4
+ import XEUtils from 'xe-utils'
5
+
6
+ import type { GanttReactData, VxeGanttEmits, VxeGanttPropTypes, GanttPrivateRef, GanttInternalData, ValueOf, GanttMethods, GanttPrivateMethods, VxeGanttPrivateComputed, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types'
7
+ import type { VxeTableInstance } from '../../../types/components/table'
8
+
9
+ function createInternalData (): GanttInternalData {
10
+ return {
11
+ }
12
+ }
13
+
14
+ export default defineVxeComponent({
15
+ name: 'VxeGantt',
16
+ props: {
17
+ size: {
18
+ type: String as PropType<VxeGanttPropTypes.Size>,
19
+ default: () => getConfig().gantt.size || getConfig().size
20
+ }
21
+ },
22
+ emits: [
23
+ ] as VxeGanttEmits,
24
+ setup (props, context) {
25
+ const { emit } = context
26
+
27
+ const xID = XEUtils.uniqueId()
28
+
29
+ const refElem = ref<HTMLDivElement>()
30
+ const refTable = ref<VxeTableInstance>()
31
+
32
+ const reactData = reactive<GanttReactData>({
33
+ })
34
+
35
+ const internalData = createInternalData()
36
+
37
+ const refMaps: GanttPrivateRef = {
38
+ refElem,
39
+ refTable
40
+ }
41
+
42
+ const computeMaps: VxeGanttPrivateComputed = {
43
+ }
44
+
45
+ const $xeGantt = {
46
+ xID,
47
+ props,
48
+ context,
49
+ reactData,
50
+ internalData,
51
+
52
+ getRefMaps: () => refMaps,
53
+ getComputeMaps: () => computeMaps
54
+ } as unknown as VxeGanttConstructor & VxeGanttPrivateMethods
55
+
56
+ const dispatchEvent = (type: ValueOf<VxeGanttEmits>, params: Record<string, any>, evnt: Event | null) => {
57
+ emit(type, createEvent(evnt, { $gantt: $xeGantt }, params))
58
+ }
59
+
60
+ const ganttMethods: GanttMethods = {
61
+ dispatchEvent
62
+ }
63
+
64
+ const ganttPrivateMethods: GanttPrivateMethods = {
65
+ }
66
+
67
+ Object.assign($xeGantt, ganttMethods, ganttPrivateMethods)
68
+
69
+ const renderVN = () => {
70
+ return h('div', {
71
+ ref: refElem,
72
+ class: 'vxe-gantt'
73
+ })
74
+ }
75
+
76
+ onUnmounted(() => {
77
+ XEUtils.assign(internalData, createInternalData())
78
+ })
79
+
80
+ $xeGantt.renderVN = renderVN
81
+
82
+ return $xeGantt
83
+ },
84
+ render () {
85
+ return this.renderVN()
86
+ }
87
+ })
@@ -7,6 +7,22 @@ import VxeLoadingComponent from '../../loading/src/loading'
7
7
 
8
8
  import type { VxeListConstructor, VxeListPropTypes, VxeListEmits, ListReactData, ListInternalData, ValueOf, ListMethods, ListPrivateRef, VxeListMethods } from '../../../types'
9
9
 
10
+ function createInternalData (): ListInternalData {
11
+ return {
12
+ resizeObserver: undefined,
13
+ fullData: [],
14
+ lastScrollLeft: 0,
15
+ lastScrollTop: 0,
16
+ scrollYStore: {
17
+ startIndex: 0,
18
+ endIndex: 0,
19
+ visibleSize: 0,
20
+ offsetSize: 0,
21
+ rowHeight: 0
22
+ }
23
+ }
24
+ }
25
+
10
26
  export default defineVxeComponent({
11
27
  name: 'VxeList',
12
28
  props: {
@@ -49,19 +65,7 @@ export default defineVxeComponent({
49
65
  items: []
50
66
  })
51
67
 
52
- const internalData: ListInternalData = {
53
- resizeObserver: undefined,
54
- fullData: [],
55
- lastScrollLeft: 0,
56
- lastScrollTop: 0,
57
- scrollYStore: {
58
- startIndex: 0,
59
- endIndex: 0,
60
- visibleSize: 0,
61
- offsetSize: 0,
62
- rowHeight: 0
63
- }
64
- }
68
+ const internalData = createInternalData()
65
69
 
66
70
  const refElem = ref() as Ref<HTMLDivElement>
67
71
  const refVirtualWrapper = ref() as Ref<HTMLDivElement>
@@ -322,6 +326,49 @@ export default defineVxeComponent({
322
326
 
323
327
  Object.assign($xeList, listMethods)
324
328
 
329
+ const renderVN = () => {
330
+ const { className, loading } = props
331
+ const { bodyHeight, topSpaceHeight, items } = reactData
332
+ const defaultSlot = slots.default
333
+ const vSize = computeSize.value
334
+ const styles = computeStyles.value
335
+ return h('div', {
336
+ ref: refElem,
337
+ class: ['vxe-list', className ? (XEUtils.isFunction(className) ? className({ $list: $xeList }) : className) : '', {
338
+ [`size--${vSize}`]: vSize,
339
+ 'is--loading': loading
340
+ }]
341
+ }, [
342
+ h('div', {
343
+ ref: refVirtualWrapper,
344
+ class: 'vxe-list--virtual-wrapper',
345
+ style: styles,
346
+ onScroll: scrollEvent
347
+ }, [
348
+ h('div', {
349
+ class: 'vxe-list--y-space',
350
+ style: {
351
+ height: bodyHeight ? `${bodyHeight}px` : ''
352
+ }
353
+ }),
354
+ h('div', {
355
+ ref: refVirtualBody,
356
+ class: 'vxe-list--body',
357
+ style: {
358
+ marginTop: topSpaceHeight ? `${topSpaceHeight}px` : ''
359
+ }
360
+ }, defaultSlot ? defaultSlot({ items, $list: $xeList }) : [])
361
+ ]),
362
+ /**
363
+ * 加载中
364
+ */
365
+ h(VxeLoadingComponent, {
366
+ class: 'vxe-list--loading',
367
+ modelValue: loading
368
+ })
369
+ ])
370
+ }
371
+
325
372
  const dataFlag = ref(0)
326
373
  watch(() => props.data ? props.data.length : -1, () => {
327
374
  dataFlag.value++
@@ -377,51 +424,9 @@ export default defineVxeComponent({
377
424
  resizeObserver.disconnect()
378
425
  }
379
426
  globalEvents.off($xeList, 'resize')
427
+ XEUtils.assign(internalData, createInternalData())
380
428
  })
381
429
 
382
- const renderVN = () => {
383
- const { className, loading } = props
384
- const { bodyHeight, topSpaceHeight, items } = reactData
385
- const defaultSlot = slots.default
386
- const vSize = computeSize.value
387
- const styles = computeStyles.value
388
- return h('div', {
389
- ref: refElem,
390
- class: ['vxe-list', className ? (XEUtils.isFunction(className) ? className({ $list: $xeList }) : className) : '', {
391
- [`size--${vSize}`]: vSize,
392
- 'is--loading': loading
393
- }]
394
- }, [
395
- h('div', {
396
- ref: refVirtualWrapper,
397
- class: 'vxe-list--virtual-wrapper',
398
- style: styles,
399
- onScroll: scrollEvent
400
- }, [
401
- h('div', {
402
- class: 'vxe-list--y-space',
403
- style: {
404
- height: bodyHeight ? `${bodyHeight}px` : ''
405
- }
406
- }),
407
- h('div', {
408
- ref: refVirtualBody,
409
- class: 'vxe-list--body',
410
- style: {
411
- marginTop: topSpaceHeight ? `${topSpaceHeight}px` : ''
412
- }
413
- }, defaultSlot ? defaultSlot({ items, $list: $xeList }) : [])
414
- ]),
415
- /**
416
- * 加载中
417
- */
418
- h(VxeLoadingComponent, {
419
- class: 'vxe-list--loading',
420
- modelValue: loading
421
- })
422
- ])
423
- }
424
-
425
430
  $xeList.renderVN = renderVN
426
431
 
427
432
  return $xeList
@@ -592,7 +592,7 @@ export default defineVxeComponent({
592
592
  const keydownEvent = (evnt: KeyboardEvent & { type: 'keydown' }) => {
593
593
  const { type, exponential, controls } = props
594
594
  const controlOpts = computeControlOpts.value
595
- const { showButton } = controlOpts
595
+ const { isArrow } = controlOpts
596
596
  const inputReadonly = computeInputReadonly.value
597
597
  const isControlKey = hasControlKey(evnt)
598
598
  const isShiftKey = evnt.shiftKey
@@ -609,7 +609,7 @@ export default defineVxeComponent({
609
609
  if (isEsc) {
610
610
  afterCheckValue()
611
611
  } else if (isUpArrow || isDwArrow) {
612
- if (isEnableConf(controlOpts) && (controls === false ? controls : showButton) && !inputReadonly) {
612
+ if (isEnableConf(controlOpts) && (controls === false ? controls : isArrow) && !inputReadonly) {
613
613
  numberKeydownEvent(evnt)
614
614
  }
615
615
  }
@@ -19,6 +19,31 @@ function getOptUniqueId () {
19
19
  return XEUtils.uniqueId('opt_')
20
20
  }
21
21
 
22
+ function createInternalData (): SelectInternalData {
23
+ return {
24
+ synchData: [],
25
+ fullData: [],
26
+ afterVisibleList: [],
27
+ optAddMaps: {},
28
+ optGroupKeyMaps: {},
29
+ optFullValMaps: {},
30
+ remoteValMaps: {},
31
+
32
+ lastScrollLeft: 0,
33
+ lastScrollTop: 0,
34
+ scrollYStore: {
35
+ startIndex: 0,
36
+ endIndex: 0,
37
+ visibleSize: 0,
38
+ offsetSize: 0,
39
+ rowHeight: 0
40
+ },
41
+
42
+ lastScrollTime: 0,
43
+ hpTimeout: undefined
44
+ }
45
+ }
46
+
22
47
  export default defineVxeComponent({
23
48
  name: 'VxeSelect',
24
49
  props: {
@@ -157,28 +182,7 @@ export default defineVxeComponent({
157
182
  isActivated: false
158
183
  })
159
184
 
160
- const internalData: SelectInternalData = {
161
- synchData: [],
162
- fullData: [],
163
- afterVisibleList: [],
164
- optAddMaps: {},
165
- optGroupKeyMaps: {},
166
- optFullValMaps: {},
167
- remoteValMaps: {},
168
-
169
- lastScrollLeft: 0,
170
- lastScrollTop: 0,
171
- scrollYStore: {
172
- startIndex: 0,
173
- endIndex: 0,
174
- visibleSize: 0,
175
- offsetSize: 0,
176
- rowHeight: 0
177
- },
178
-
179
- lastScrollTime: 0,
180
- hpTimeout: undefined
181
- }
185
+ const internalData = createInternalData()
182
186
 
183
187
  const refMaps: SelectPrivateRef = {
184
188
  refElem
@@ -1498,6 +1502,7 @@ export default defineVxeComponent({
1498
1502
  globalEvents.off($xeSelect, 'keydown')
1499
1503
  globalEvents.off($xeSelect, 'blur')
1500
1504
  globalEvents.off($xeSelect, 'resize')
1505
+ XEUtils.assign(internalData, createInternalData())
1501
1506
  })
1502
1507
 
1503
1508
  provide('$xeSelect', $xeSelect)
@@ -17,6 +17,34 @@ function getNodeUniqueId () {
17
17
  return XEUtils.uniqueId('node_')
18
18
  }
19
19
 
20
+ function createInternalData (): TreeInternalData {
21
+ return {
22
+ // initialized: false,
23
+ // lastFilterValue: '',
24
+ treeFullData: [],
25
+ afterTreeList: [],
26
+ afterVisibleList: [],
27
+ nodeMaps: {},
28
+ selectCheckboxMaps: {},
29
+ indeterminateRowMaps: {},
30
+ treeExpandedMaps: {},
31
+ treeExpandLazyLoadedMaps: {},
32
+
33
+ lastScrollLeft: 0,
34
+ lastScrollTop: 0,
35
+ scrollYStore: {
36
+ startIndex: 0,
37
+ endIndex: 0,
38
+ visibleSize: 0,
39
+ offsetSize: 0,
40
+ rowHeight: 0
41
+ },
42
+
43
+ lastScrollTime: 0
44
+ // hpTimeout: undefined
45
+ }
46
+ }
47
+
20
48
  export default defineVxeComponent({
21
49
  name: 'VxeTree',
22
50
  props: {
@@ -170,31 +198,7 @@ export default defineVxeComponent({
170
198
  updateCheckboxFlag: 1
171
199
  })
172
200
 
173
- const internalData: TreeInternalData = {
174
- // initialized: false,
175
- // lastFilterValue: '',
176
- treeFullData: [],
177
- afterTreeList: [],
178
- afterVisibleList: [],
179
- nodeMaps: {},
180
- selectCheckboxMaps: {},
181
- indeterminateRowMaps: {},
182
- treeExpandedMaps: {},
183
- treeExpandLazyLoadedMaps: {},
184
-
185
- lastScrollLeft: 0,
186
- lastScrollTop: 0,
187
- scrollYStore: {
188
- startIndex: 0,
189
- endIndex: 0,
190
- visibleSize: 0,
191
- offsetSize: 0,
192
- rowHeight: 0
193
- },
194
-
195
- lastScrollTime: 0
196
- // hpTimeout: undefined
197
- }
201
+ const internalData = createInternalData()
198
202
 
199
203
  const refMaps: TreePrivateRef = {
200
204
  refElem
@@ -823,10 +827,13 @@ export default defineVxeComponent({
823
827
  return nextTick()
824
828
  }
825
829
 
826
- const loadYData = (evnt: Event) => {
830
+ const loadYData = () => {
827
831
  const { scrollYStore } = internalData
828
832
  const { startIndex, endIndex, visibleSize, offsetSize, rowHeight } = scrollYStore
829
- const scrollBodyElem = evnt.target as HTMLDivElement
833
+ const scrollBodyElem = refVirtualWrapper.value
834
+ if (!scrollBodyElem) {
835
+ return
836
+ }
830
837
  const scrollTop = scrollBodyElem.scrollTop
831
838
  const toVisibleIndex = Math.floor(scrollTop / rowHeight)
832
839
  const offsetStartIndex = Math.max(0, toVisibleIndex - 1 - offsetSize)
@@ -849,7 +856,7 @@ export default defineVxeComponent({
849
856
  internalData.lastScrollTop = scrollTop
850
857
  internalData.lastScrollLeft = scrollLeft
851
858
  if (reactData.scrollYLoad) {
852
- loadYData(evnt)
859
+ loadYData()
853
860
  }
854
861
  internalData.lastScrollTime = Date.now()
855
862
  dispatchEvent('scroll', { scrollLeft, scrollTop, isX, isY }, evnt)
@@ -1483,7 +1490,8 @@ export default defineVxeComponent({
1483
1490
  },
1484
1491
  setAllExpandNode (expanded) {
1485
1492
  const { transform } = props
1486
- const { treeExpandedMaps } = internalData
1493
+ const { scrollYLoad } = reactData
1494
+ const { scrollYStore, treeExpandedMaps } = internalData
1487
1495
  const childrenField = computeChildrenField.value
1488
1496
  const mapChildrenField = computeMapChildrenField.value
1489
1497
  if (expanded) {
@@ -1499,9 +1507,17 @@ export default defineVxeComponent({
1499
1507
  internalData.treeExpandedMaps = {}
1500
1508
  }
1501
1509
  reactData.updateExpandedFlag++
1510
+ reactData.topSpaceHeight = 0
1511
+ scrollYStore.startIndex = 0
1512
+ scrollYStore.endIndex = 1
1502
1513
  handleTreeToList()
1503
1514
  handleData()
1504
- return recalculate()
1515
+ return recalculate().then(() => {
1516
+ if (scrollYLoad) {
1517
+ loadYData()
1518
+ }
1519
+ return recalculate()
1520
+ })
1505
1521
  },
1506
1522
  reloadExpandNode (node) {
1507
1523
  const { lazy } = props
@@ -1955,12 +1971,8 @@ export default defineVxeComponent({
1955
1971
  if (resizeObserver) {
1956
1972
  resizeObserver.disconnect()
1957
1973
  }
1958
-
1959
- internalData.treeExpandedMaps = {}
1960
- internalData.indeterminateRowMaps = {}
1961
- internalData.nodeMaps = {}
1962
-
1963
1974
  globalEvents.off($xeTree, 'resize')
1975
+ XEUtils.assign(internalData, createInternalData())
1964
1976
  })
1965
1977
 
1966
1978
  loadData(props.data || [])
@@ -17,6 +17,14 @@ function getOptUniqueId () {
17
17
  return XEUtils.uniqueId('node_')
18
18
  }
19
19
 
20
+ function createInternalData (): TreeSelectInternalData {
21
+ return {
22
+ // hpTimeout: undefined,
23
+ fullOptionList: [],
24
+ fullNodeMaps: {}
25
+ }
26
+ }
27
+
20
28
  export default defineVxeComponent({
21
29
  name: 'VxeTreeSelect',
22
30
  props: {
@@ -127,11 +135,7 @@ export default defineVxeComponent({
127
135
  isActivated: false
128
136
  })
129
137
 
130
- const internalData: TreeSelectInternalData = {
131
- // hpTimeout: undefined,
132
- fullOptionList: [],
133
- fullNodeMaps: {}
134
- }
138
+ const internalData = createInternalData()
135
139
 
136
140
  const refMaps: TreeSelectPrivateRef = {
137
141
  refElem
@@ -865,6 +869,7 @@ export default defineVxeComponent({
865
869
  globalEvents.off($xeTreeSelect, 'mousedown')
866
870
  globalEvents.off($xeTreeSelect, 'blur')
867
871
  globalEvents.off($xeTreeSelect, 'resize')
872
+ XEUtils.assign(internalData, createInternalData())
868
873
  })
869
874
 
870
875
  provide('$xeTreeSelect', $xeTreeSelect)
@@ -157,6 +157,7 @@ setConfig({
157
157
  formGroup: {},
158
158
  formItem: {},
159
159
  formView: {},
160
+ gantt: {},
160
161
  icon: {},
161
162
  iconPicker: {
162
163
  icons: ['home', 'company', 'comment', 'setting', 'send', 'envelope', 'envelope-open', 'bell', 'search', 'print', 'pc', 'goods', 'chart-line', 'edit', 'delete', 'save', 'folder', 'microphone', 'flag', 'link', 'location', 'sunny', 'rmb', 'usd', 'user', 'add-user', 'add-users', 'star', 'unlock', 'time', 'text', 'feedback', 'calendar', 'association-form', 'cloud-download', 'cloud-upload', 'file', 'subtable', 'chart-bar-x', 'chart-bar-y', 'chart-line', 'chart-pie', 'chart-radar']
@@ -256,7 +257,8 @@ setConfig({
256
257
  enabled: true,
257
258
  layout: 'right',
258
259
  showButton: true,
259
- isWheel: true
260
+ isWheel: true,
261
+ isArrow: true
260
262
  }
261
263
  },
262
264
  optgroup: {},
package/styles/all.scss CHANGED
@@ -30,6 +30,7 @@
30
30
  @use './components/form-gather.scss';
31
31
  @use './components/form-group.scss';
32
32
  @use './components/form-item.scss';
33
+ @use './components/gantt.scss';
33
34
  @use './components/icon.scss';
34
35
  @use './components/icon-picker.scss';
35
36
  @use './components/image.scss';
@@ -351,13 +351,10 @@
351
351
  flex-direction: column;
352
352
  overflow: hidden;
353
353
  .vxe-color-picker--input-wrapper {
354
- & > .vxe-input {
354
+ & > .vxe-number-input {
355
355
  width: 23%;
356
356
  margin-left: 2%;
357
- .vxe-input--control-icon {
358
- min-width: 1.6em;
359
- }
360
- .vxe-input--inner {
357
+ .vxe-number-input--input {
361
358
  padding: 0 0 0 0.15em;
362
359
  }
363
360
  }
File without changes
package/types/all.d.ts CHANGED
@@ -31,6 +31,7 @@ import VxeForm from './components/form'
31
31
  import VxeFormGather from './components/form-gather'
32
32
  import VxeFormGroup from './components/form-group'
33
33
  import VxeFormItem from './components/form-item'
34
+ import VxeGantt from './components/gantt'
34
35
  import VxeIcon from './components/icon'
35
36
  import VxeIconPicker from './components/icon-picker'
36
37
  import VxeImage from './components/image'
@@ -130,6 +131,7 @@ interface AllComponents {
130
131
  VxeFormGather: typeof VxeFormGather
131
132
  VxeFormGroup: typeof VxeFormGroup
132
133
  VxeFormItem: typeof VxeFormItem
134
+ VxeGantt: typeof VxeGantt
133
135
  VxeIcon: typeof VxeIcon
134
136
  VxeIconPicker: typeof VxeIconPicker
135
137
  VxeImage: typeof VxeImage
@@ -238,6 +240,7 @@ export * from './components/form'
238
240
  export * from './components/form-gather'
239
241
  export * from './components/form-group'
240
242
  export * from './components/form-item'
243
+ export * from './components/gantt'
241
244
  export * from './components/icon'
242
245
  export * from './components/icon-picker'
243
246
  export * from './components/image'