vxe-pc-ui 3.4.1 → 3.4.3

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 (80) hide show
  1. package/es/color-picker/src/color-picker.js +2 -2
  2. package/es/date-picker/src/date-picker.js +1 -1
  3. package/es/form/src/form.js +4 -4
  4. package/es/icon/style.css +1 -1
  5. package/es/icon-picker/src/icon-picker.js +1 -1
  6. package/es/input/src/input.js +4 -4
  7. package/es/number-input/src/number-input.js +3 -3
  8. package/es/pulldown/src/pulldown.js +1 -1
  9. package/es/select/src/select.js +64 -12
  10. package/es/select/style.css +17 -0
  11. package/es/select/style.min.css +1 -1
  12. package/es/style.css +1 -1
  13. package/es/style.min.css +1 -1
  14. package/es/table-select/src/table-select.js +1 -1
  15. package/es/tree-select/src/tree-select.js +1 -1
  16. package/es/ui/index.js +2 -1
  17. package/es/ui/src/log.js +1 -1
  18. package/es/vxe-select/style.css +17 -0
  19. package/es/vxe-select/style.min.css +1 -1
  20. package/lib/color-picker/src/color-picker.js +2 -2
  21. package/lib/color-picker/src/color-picker.min.js +1 -1
  22. package/lib/date-picker/src/date-picker.js +1 -1
  23. package/lib/date-picker/src/date-picker.min.js +1 -1
  24. package/lib/form/src/form.js +4 -4
  25. package/lib/form/src/form.min.js +1 -1
  26. package/lib/icon/style/style.css +1 -1
  27. package/lib/icon/style/style.min.css +1 -1
  28. package/lib/icon-picker/src/icon-picker.js +1 -1
  29. package/lib/icon-picker/src/icon-picker.min.js +1 -1
  30. package/lib/index.umd.js +90 -32
  31. package/lib/index.umd.min.js +1 -1
  32. package/lib/input/src/input.js +4 -4
  33. package/lib/input/src/input.min.js +1 -1
  34. package/lib/number-input/src/number-input.js +3 -3
  35. package/lib/number-input/src/number-input.min.js +1 -1
  36. package/lib/pulldown/src/pulldown.js +1 -1
  37. package/lib/pulldown/src/pulldown.min.js +1 -1
  38. package/lib/select/src/select.js +69 -12
  39. package/lib/select/src/select.min.js +1 -1
  40. package/lib/select/style/style.css +17 -0
  41. package/lib/select/style/style.min.css +1 -1
  42. package/lib/style.css +1 -1
  43. package/lib/style.min.css +1 -1
  44. package/lib/table-select/src/table-select.js +1 -1
  45. package/lib/table-select/src/table-select.min.js +1 -1
  46. package/lib/tree-select/src/tree-select.js +1 -1
  47. package/lib/tree-select/src/tree-select.min.js +1 -1
  48. package/lib/ui/index.js +2 -1
  49. package/lib/ui/index.min.js +1 -1
  50. package/lib/ui/src/log.js +1 -1
  51. package/lib/ui/src/log.min.js +1 -1
  52. package/lib/vxe-select/style/style.css +17 -0
  53. package/lib/vxe-select/style/style.min.css +1 -1
  54. package/package.json +1 -1
  55. package/packages/color-picker/src/color-picker.ts +2 -2
  56. package/packages/date-picker/src/date-picker.ts +1 -1
  57. package/packages/form/src/form.ts +4 -4
  58. package/packages/icon-picker/src/icon-picker.ts +1 -1
  59. package/packages/input/src/input.ts +4 -4
  60. package/packages/number-input/src/number-input.ts +3 -3
  61. package/packages/pulldown/src/pulldown.ts +1 -1
  62. package/packages/select/src/select.ts +65 -12
  63. package/packages/table-select/src/table-select.ts +1 -1
  64. package/packages/tree-select/src/tree-select.ts +1 -1
  65. package/packages/ui/index.ts +1 -0
  66. package/styles/components/select.scss +19 -0
  67. package/types/components/select.d.ts +15 -2
  68. package/types/ui/global-icon.d.ts +1 -0
  69. /package/es/icon/{iconfont.1741079786101.ttf → iconfont.1741230044715.ttf} +0 -0
  70. /package/es/icon/{iconfont.1741079786101.woff → iconfont.1741230044715.woff} +0 -0
  71. /package/es/icon/{iconfont.1741079786101.woff2 → iconfont.1741230044715.woff2} +0 -0
  72. /package/es/{iconfont.1741079786101.ttf → iconfont.1741230044715.ttf} +0 -0
  73. /package/es/{iconfont.1741079786101.woff → iconfont.1741230044715.woff} +0 -0
  74. /package/es/{iconfont.1741079786101.woff2 → iconfont.1741230044715.woff2} +0 -0
  75. /package/lib/icon/style/{iconfont.1741079786101.ttf → iconfont.1741230044715.ttf} +0 -0
  76. /package/lib/icon/style/{iconfont.1741079786101.woff → iconfont.1741230044715.woff} +0 -0
  77. /package/lib/icon/style/{iconfont.1741079786101.woff2 → iconfont.1741230044715.woff2} +0 -0
  78. /package/lib/{iconfont.1741079786101.ttf → iconfont.1741230044715.ttf} +0 -0
  79. /package/lib/{iconfont.1741079786101.woff → iconfont.1741230044715.woff} +0 -0
  80. /package/lib/{iconfont.1741079786101.woff2 → iconfont.1741230044715.woff2} +0 -0
@@ -481,7 +481,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
481
481
  const internalData = $xeTableSelect.internalData
482
482
 
483
483
  reactData.visiblePanel = false
484
- internalData.hpTimeout = window.setTimeout(() => {
484
+ internalData.hpTimeout = setTimeout(() => {
485
485
  reactData.isAniVisible = false
486
486
  }, 350)
487
487
  },
@@ -453,7 +453,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
453
453
  const internalData = $xeTreeSelect.internalData
454
454
 
455
455
  reactData.visiblePanel = false
456
- internalData.hpTimeout = window.setTimeout(() => {
456
+ internalData.hpTimeout = setTimeout(() => {
457
457
  reactData.isAniVisible = false
458
458
  }, 350)
459
459
  },
@@ -374,6 +374,7 @@ setIcon({
374
374
  SELECT_LOADED: iconPrefix + 'spinner roll',
375
375
  SELECT_OPEN: iconPrefix + 'caret-down rotate180',
376
376
  SELECT_CLOSE: iconPrefix + 'caret-down',
377
+ ADD_OPTION: iconPrefix + 'add',
377
378
 
378
379
  // icon-picker
379
380
  ICON_PICKER_OPEN: iconPrefix + 'caret-down rotate180',
@@ -129,6 +129,7 @@
129
129
  }
130
130
 
131
131
  .vxe-select-option {
132
+ position: relative;
132
133
  padding: 0 0.6em;
133
134
  max-width: 600px;
134
135
  white-space: nowrap;
@@ -137,6 +138,17 @@
137
138
  white-space: nowrap;
138
139
  user-select: none;
139
140
  cursor: pointer;
141
+ &.is--add {
142
+ padding-right: 2em;
143
+ &:hover {
144
+ .vxe-select-option--add-icon {
145
+ color: var(--vxe-ui-font-primary-color);
146
+ }
147
+ }
148
+ .vxe-select-option--add-icon {
149
+ display: block;
150
+ }
151
+ }
140
152
  &.is--selected {
141
153
  color: var(--vxe-ui-font-primary-color);
142
154
  }
@@ -156,6 +168,13 @@
156
168
  cursor: default;
157
169
  }
158
170
 
171
+ .vxe-select-option--add-icon {
172
+ display: none;
173
+ position: absolute;
174
+ top: 0;
175
+ right: 0.6em;
176
+ }
177
+
159
178
  .vxe-select--search-icon {
160
179
  margin-right: 0.5em;
161
180
  }
@@ -36,6 +36,7 @@ export namespace VxeSelectPropTypes {
36
36
  export type Multiple = boolean
37
37
  export type MultiCharOverflow = number | string
38
38
  export type PrefixIcon = string
39
+ export type AllowCreate = boolean
39
40
  export type Placement = 'top' | 'bottom' | ''
40
41
  export type Options = VxeSelectDefines.SelectOptions[]
41
42
  export type OptionProps = {
@@ -100,6 +101,7 @@ export interface VxeSelectProps {
100
101
  multiple?: VxeSelectPropTypes.Multiple
101
102
  multiCharOverflow?: VxeSelectPropTypes.MultiCharOverflow
102
103
  prefixIcon?: VxeSelectPropTypes.PrefixIcon
104
+ allowCreate?: VxeSelectPropTypes.AllowCreate
103
105
  placement?: VxeSelectPropTypes.Placement
104
106
  options?: VxeSelectPropTypes.Options
105
107
  optionProps?: VxeSelectPropTypes.OptionProps
@@ -157,6 +159,7 @@ export interface SelectInternalData {
157
159
  isLoaded?: boolean
158
160
  synchData: any[]
159
161
  fullData: any[]
162
+ optAddMaps: Record<string, any>
160
163
  optGroupKeyMaps: Record<string, any>
161
164
  optFullValMaps: Record<string, VxeSelectDefines.OptCacheItem>
162
165
  remoteValMaps: Record<string, VxeSelectDefines.OptCacheItem>
@@ -234,7 +237,8 @@ export type VxeSelectEmits = [
234
237
  'blur',
235
238
  'focus',
236
239
  'click',
237
- 'scroll'
240
+ 'scroll',
241
+ 'visible-change'
238
242
  ]
239
243
 
240
244
  export namespace VxeSelectDefines {
@@ -283,8 +287,14 @@ export namespace VxeSelectDefines {
283
287
 
284
288
  export interface FocusEventParams extends SelectEventParams { }
285
289
  export interface BlurEventParams extends SelectEventParams { }
286
- export interface ClickEventParams extends SelectEventParams { }
290
+ export interface ClickEventParams extends SelectEventParams {
291
+ triggerButton: boolean
292
+ visible: boolean
293
+ }
287
294
  export interface ScrollEventParams extends SelectEventParams { }
295
+ export interface VisibleChangeEventParams extends SelectEventParams {
296
+ visible: boolean
297
+ }
288
298
  }
289
299
 
290
300
  export type VxeSelectEventProps = {
@@ -294,6 +304,7 @@ export type VxeSelectEventProps = {
294
304
  onBlur?: VxeSelectEvents.Blur
295
305
  onClick?: VxeSelectEvents.Click
296
306
  onScroll?: VxeSelectEvents.Scroll
307
+ onVisibleChange?: VxeSelectEvents.VisibleChange
297
308
  }
298
309
 
299
310
  export interface VxeSelectListeners {
@@ -303,6 +314,7 @@ export interface VxeSelectListeners {
303
314
  blur?: VxeSelectEvents.Blur
304
315
  click?: VxeSelectEvents.Click
305
316
  scroll?: VxeSelectEvents.Scroll
317
+ visibleChange?: VxeSelectEvents.VisibleChange
306
318
  }
307
319
 
308
320
  export namespace VxeSelectEvents {
@@ -312,6 +324,7 @@ export namespace VxeSelectEvents {
312
324
  export type Blur = (params: VxeSelectDefines.BlurEventParams) => void
313
325
  export type Click = (params: VxeSelectDefines.ClickEventParams) => void
314
326
  export type Scroll = (params: VxeSelectDefines.ScrollEventParams) => void
327
+ export type VisibleChange = (params: VxeSelectDefines.VisibleChangeEventParams) => void
315
328
  }
316
329
 
317
330
  export namespace VxeSelectSlotTypes {
@@ -60,6 +60,7 @@ declare module '@vxe-ui/core' {
60
60
  SELECT_LOADED?: string
61
61
  SELECT_OPEN?: string
62
62
  SELECT_CLOSE?: string
63
+ ADD_OPTION?: string
63
64
 
64
65
  // icon-picker
65
66
  ICON_PICKER_OPEN?: string