x-next 1.18.2 → 1.19.0

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 (153) hide show
  1. package/AI_USAGE/catalog.md +3 -2
  2. package/AI_USAGE/components/alert-api.md +1 -1
  3. package/AI_USAGE/components/alert.md +1 -1
  4. package/AI_USAGE/components/bar-chart-api.md +1 -1
  5. package/AI_USAGE/components/bar-chart.md +1 -1
  6. package/AI_USAGE/components/boxicons.md +1 -1
  7. package/AI_USAGE/components/button-api.md +1 -1
  8. package/AI_USAGE/components/button.md +1 -1
  9. package/AI_USAGE/components/charts.md +1 -1
  10. package/AI_USAGE/components/checkbox-api.md +1 -1
  11. package/AI_USAGE/components/checkbox.md +1 -1
  12. package/AI_USAGE/components/color-picker-api.md +1 -1
  13. package/AI_USAGE/components/color-picker.md +1 -1
  14. package/AI_USAGE/components/config-provider-api.md +1 -1
  15. package/AI_USAGE/components/config-provider.md +1 -1
  16. package/AI_USAGE/components/date-picker-api.md +1 -1
  17. package/AI_USAGE/components/date-picker.md +1 -1
  18. package/AI_USAGE/components/dialog-api.md +1 -1
  19. package/AI_USAGE/components/dialog.md +1 -1
  20. package/AI_USAGE/components/draggable-api.md +1 -1
  21. package/AI_USAGE/components/draggable.md +1 -1
  22. package/AI_USAGE/components/drawer-api.md +1 -1
  23. package/AI_USAGE/components/drawer.md +1 -1
  24. package/AI_USAGE/components/dropdown-api.md +1 -1
  25. package/AI_USAGE/components/dropdown.md +1 -1
  26. package/AI_USAGE/components/empty-api.md +1 -1
  27. package/AI_USAGE/components/empty.md +1 -1
  28. package/AI_USAGE/components/finicon.md +1 -1
  29. package/AI_USAGE/components/form-api.md +1 -1
  30. package/AI_USAGE/components/form.md +1 -1
  31. package/AI_USAGE/components/grid-api.md +1 -1
  32. package/AI_USAGE/components/grid.md +1 -1
  33. package/AI_USAGE/components/heatmap-api.md +1 -1
  34. package/AI_USAGE/components/heatmap.md +1 -1
  35. package/AI_USAGE/components/icon-api.md +1 -1
  36. package/AI_USAGE/components/icon.md +1 -1
  37. package/AI_USAGE/components/image-api.md +1 -1
  38. package/AI_USAGE/components/image.md +1 -1
  39. package/AI_USAGE/components/input-api.md +1 -1
  40. package/AI_USAGE/components/input-number-api.md +1 -1
  41. package/AI_USAGE/components/input-number.md +1 -1
  42. package/AI_USAGE/components/input-tag-api.md +1 -1
  43. package/AI_USAGE/components/input-tag.md +1 -1
  44. package/AI_USAGE/components/input.md +1 -1
  45. package/AI_USAGE/components/layout-api.md +1 -1
  46. package/AI_USAGE/components/layout.md +1 -1
  47. package/AI_USAGE/components/line-chart-api.md +1 -1
  48. package/AI_USAGE/components/line-chart.md +1 -1
  49. package/AI_USAGE/components/link-api.md +1 -1
  50. package/AI_USAGE/components/link.md +1 -1
  51. package/AI_USAGE/components/menu-api.md +1 -1
  52. package/AI_USAGE/components/menu.md +1 -1
  53. package/AI_USAGE/components/message-api.md +1 -1
  54. package/AI_USAGE/components/message-box-api.md +1 -1
  55. package/AI_USAGE/components/message-box.md +1 -1
  56. package/AI_USAGE/components/message.md +1 -1
  57. package/AI_USAGE/components/network-api.md +1 -1
  58. package/AI_USAGE/components/network.md +1 -1
  59. package/AI_USAGE/components/notification-api.md +1 -1
  60. package/AI_USAGE/components/notification.md +1 -1
  61. package/AI_USAGE/components/pagination-api.md +1 -1
  62. package/AI_USAGE/components/pagination.md +1 -1
  63. package/AI_USAGE/components/pie-chart-api.md +1 -1
  64. package/AI_USAGE/components/pie-chart.md +1 -1
  65. package/AI_USAGE/components/popconfirm-api.md +1 -1
  66. package/AI_USAGE/components/popconfirm.md +1 -1
  67. package/AI_USAGE/components/popover-api.md +1 -1
  68. package/AI_USAGE/components/popover.md +1 -1
  69. package/AI_USAGE/components/popup-api.md +1 -1
  70. package/AI_USAGE/components/popup.md +1 -1
  71. package/AI_USAGE/components/progress-api.md +1 -1
  72. package/AI_USAGE/components/progress.md +1 -1
  73. package/AI_USAGE/components/radio-api.md +1 -1
  74. package/AI_USAGE/components/radio.md +1 -1
  75. package/AI_USAGE/components/rate-api.md +1 -1
  76. package/AI_USAGE/components/rate.md +1 -1
  77. package/AI_USAGE/components/resize-box-api.md +1 -1
  78. package/AI_USAGE/components/resize-box.md +1 -1
  79. package/AI_USAGE/components/scrollbar-api.md +1 -1
  80. package/AI_USAGE/components/scrollbar.md +1 -1
  81. package/AI_USAGE/components/select-api.md +1 -1
  82. package/AI_USAGE/components/select.md +1 -1
  83. package/AI_USAGE/components/skeleton-api.md +1 -1
  84. package/AI_USAGE/components/skeleton.md +1 -1
  85. package/AI_USAGE/components/slider-api.md +1 -1
  86. package/AI_USAGE/components/slider.md +1 -1
  87. package/AI_USAGE/components/space-api.md +1 -1
  88. package/AI_USAGE/components/space.md +1 -1
  89. package/AI_USAGE/components/spin-api.md +1 -1
  90. package/AI_USAGE/components/spin.md +1 -1
  91. package/AI_USAGE/components/steps-api.md +1 -1
  92. package/AI_USAGE/components/steps.md +1 -1
  93. package/AI_USAGE/components/switch-api.md +1 -1
  94. package/AI_USAGE/components/switch.md +1 -1
  95. package/AI_USAGE/components/table-api.md +1 -1
  96. package/AI_USAGE/components/table.md +1 -1
  97. package/AI_USAGE/components/tabs-api.md +1 -1
  98. package/AI_USAGE/components/tabs.md +1 -1
  99. package/AI_USAGE/components/tag-api.md +1 -1
  100. package/AI_USAGE/components/tag.md +1 -1
  101. package/AI_USAGE/components/textarea-api.md +1 -1
  102. package/AI_USAGE/components/textarea.md +1 -1
  103. package/AI_USAGE/components/time-picker-api.md +1 -1
  104. package/AI_USAGE/components/time-picker.md +1 -1
  105. package/AI_USAGE/components/time-range-selector-api.md +1 -1
  106. package/AI_USAGE/components/time-range-selector.md +1 -1
  107. package/AI_USAGE/components/timeline-api.md +1 -1
  108. package/AI_USAGE/components/timeline.md +1 -1
  109. package/AI_USAGE/components/tooltip-api.md +1 -1
  110. package/AI_USAGE/components/tooltip.md +1 -1
  111. package/AI_USAGE/components/transfer-api.md +1 -1
  112. package/AI_USAGE/components/transfer.md +1 -1
  113. package/AI_USAGE/components/tree-select-api.md +1 -1
  114. package/AI_USAGE/components/tree-select.md +1 -1
  115. package/AI_USAGE/components/trend-chart-api.md +1 -1
  116. package/AI_USAGE/components/trend-chart.md +1 -1
  117. package/AI_USAGE/components/trigger-api.md +1 -1
  118. package/AI_USAGE/components/trigger.md +1 -1
  119. package/AI_USAGE/components/upload-api.md +1 -1
  120. package/AI_USAGE/components/upload.md +1 -1
  121. package/AI_USAGE/components/virtual-list-api.md +135 -0
  122. package/AI_USAGE/components/virtual-list.md +62 -0
  123. package/AI_USAGE/components/watermark-api.md +1 -1
  124. package/AI_USAGE/components/watermark.md +1 -1
  125. package/AI_USAGE/core.md +1 -1
  126. package/AI_USAGE/index.md +3 -2
  127. package/AI_USAGE/recipes/form-on-demand.md +1 -1
  128. package/AI_USAGE.md +180 -3
  129. package/CHANGELOG.md +17 -0
  130. package/dist/components/form-select/index.d.ts +3 -3
  131. package/dist/components/index.d.ts +1 -0
  132. package/dist/components/pagination/page-options.vue.d.ts +3 -3
  133. package/dist/components/table/index.d.ts +3 -3
  134. package/dist/components/transfer/index.d.ts +3 -3
  135. package/dist/components/tree-select/index.d.ts +3 -3
  136. package/dist/components/virtual-list-v2/index.d.ts +1052 -2
  137. package/dist/components/virtual-list-v2/interface.d.ts +6 -0
  138. package/dist/components/virtual-list-v2/virtual-list.vue.d.ts +32 -1
  139. package/dist/es/components/form-select/Select.js +1 -1
  140. package/dist/es/components/index.js +85 -83
  141. package/dist/es/components/resize-box/ResizeBox.vue2.js +84 -81
  142. package/dist/es/components/table/Table.js +1 -1
  143. package/dist/es/components/transfer/transfer-panel.js +1 -1
  144. package/dist/es/components/tree-select/TreeSelect.js +1 -1
  145. package/dist/es/components/virtual-list-v2/index.js +6 -2
  146. package/dist/es/components/virtual-list-v2/virtual-list.vue.js +18 -17
  147. package/dist/es/components/virtual-list-v2/virtual-list.vue2.js +97 -70
  148. package/dist/es/index.js +55 -53
  149. package/dist/index.cjs +3 -3
  150. package/dist/index.umd.js +3 -3
  151. package/dist/types.d.ts +1 -0
  152. package/package.json +4 -4
  153. package/volar.d.ts +1 -0
@@ -55,6 +55,12 @@ export interface VirtualListProps {
55
55
  component?: keyof HTMLElementTagNameMap;
56
56
  /** 使用库内滚动条;独立 VirtualList 默认 false,Select 会传入自己的配置。 */
57
57
  scrollbar?: boolean | ScrollbarProps;
58
+ /** 数据重排/展开时保持像素位置;调用方可按稳定 key 恢复更精确的锚点。 */
59
+ preserveScroll?: boolean;
60
+ /** 仅 fixedSize 生效;传入数组启用定位行,指定键在视口外仍保持同一 DOM。 */
61
+ pinnedKeys?: VirtualItemKey[];
62
+ listAttrs?: Record<string, unknown>;
63
+ contentAttrs?: Record<string, unknown>;
58
64
  }
59
65
  export type ScrollOptions = number | {
60
66
  index?: number;
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { ScrollOptions } from './interface';
2
+ import { ScrollOptions, VirtualItemKey } from './interface';
3
3
  import { ScrollbarProps } from '../scrollbar-v2';
4
4
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
5
  height: {
@@ -48,6 +48,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
48
48
  type: PropType<boolean | ScrollbarProps>;
49
49
  default: boolean;
50
50
  };
51
+ preserveScroll: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ pinnedKeys: {
56
+ type: PropType<VirtualItemKey[]>;
57
+ default: undefined;
58
+ };
51
59
  }>, {
52
60
  className: {
53
61
  block: string;
@@ -62,6 +70,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
62
70
  contentRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
63
71
  frontPadding: import('vue').ComputedRef<number>;
64
72
  currentList: import('vue').ComputedRef<Record<string, any>[]>;
73
+ positioned: import('vue').ComputedRef<boolean>;
74
+ renderedItems: import('vue').ComputedRef<{
75
+ item: Record<string, any>;
76
+ index: number;
77
+ }[]>;
65
78
  behindPadding: import('vue').ComputedRef<number>;
66
79
  onScroll: (ev: Event) => void;
67
80
  setItemSize: (key: string | number, size: number) => void;
@@ -80,6 +93,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
80
93
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
81
94
  scroll: (ev: Event) => true;
82
95
  reachBottom: (ev: Event) => true;
96
+ rangeChange: (range: {
97
+ start: number;
98
+ end: number;
99
+ }) => true;
83
100
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
84
101
  height: {
85
102
  type: (StringConstructor | NumberConstructor)[];
@@ -127,9 +144,21 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
127
144
  type: PropType<boolean | ScrollbarProps>;
128
145
  default: boolean;
129
146
  };
147
+ preserveScroll: {
148
+ type: BooleanConstructor;
149
+ default: boolean;
150
+ };
151
+ pinnedKeys: {
152
+ type: PropType<VirtualItemKey[]>;
153
+ default: undefined;
154
+ };
130
155
  }>> & Readonly<{
131
156
  onScroll?: ((ev: Event) => any) | undefined;
132
157
  onReachBottom?: ((ev: Event) => any) | undefined;
158
+ onRangeChange?: ((range: {
159
+ start: number;
160
+ end: number;
161
+ }) => any) | undefined;
133
162
  }>, {
134
163
  data: Record<string, any>[];
135
164
  component: string | Record<string, any>;
@@ -141,6 +170,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
141
170
  threshold: number;
142
171
  itemKey: string;
143
172
  paddingPosition: string;
173
+ preserveScroll: boolean;
174
+ pinnedKeys: VirtualItemKey[];
144
175
  }, {}, {
145
176
  VirtualListItem: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
146
177
  hasItemSize: {
@@ -6,7 +6,7 @@ import ne from "../_components/select-view/select-view.js";
6
6
  import ua from "./SelectDropdown.vue.js";
7
7
  import na from "./SelectOption.vue.js";
8
8
  import oa from "./SelectOptionGroup.vue.js";
9
- import ra from "../virtual-list-v2/virtual-list.vue.js";
9
+ import { VirtualList as ra } from "../virtual-list-v2/index.js";
10
10
  import { useSelect as ia } from "./hooks/use-select.js";
11
11
  import { useTrigger as ca } from "../../_hooks/use-trigger.js";
12
12
  import { useFormItem as da } from "../../_hooks/use-form-item.js";
@@ -5,15 +5,15 @@ import { Dialog as n } from "./dialog/index.js";
5
5
  import { Drawer as u } from "./drawer/index.js";
6
6
  import { Dropdown as c, DropdownButton as d, DropdownGroup as T, DropdownOption as S, DropdownSubmenu as P } from "./dropdown/index.js";
7
7
  import { Empty as I } from "./empty/index.js";
8
- import { DatePicker as s, MonthPicker as w, QuarterPicker as L, RangePicker as b, WeekPicker as C, YearPicker as h } from "./date-picker/index.js";
8
+ import { DatePicker as s, MonthPicker as L, QuarterPicker as w, RangePicker as b, WeekPicker as C, YearPicker as h } from "./date-picker/index.js";
9
9
  import { Form as y, FormItem as G } from "./form/index.js";
10
10
  import { Checkbox as B, CheckboxGroup as M } from "./form-checkbox/index.js";
11
11
  import { Input as A, InputGroup as E, InputPassword as _, InputSearch as N } from "./form-input/index.js";
12
12
  import { InputNumber as j } from "./form-input-number/index.js";
13
13
  import { InputTag as H } from "./form-input-tag/index.js";
14
14
  import { Radio as W, RadioGroup as U } from "./form-radio/index.js";
15
- import { Select as Q, SelectDropdown as Y, SelectOption as Z, SelectOptionGroup as q } from "./form-select/index.js";
16
- import { Slider as V } from "./form-slider/index.js";
15
+ import { Select as Q, SelectDropdown as V, SelectOption as Y, SelectOptionGroup as Z } from "./form-select/index.js";
16
+ import { Slider as J } from "./form-slider/index.js";
17
17
  import { Switch as $ } from "./form-switch/index.js";
18
18
  import { Textarea as ro } from "./form-textarea/index.js";
19
19
  import { ColorPicker as to } from "./color-picker/index.js";
@@ -22,7 +22,7 @@ import { Draggable as xo } from "./draggable/index.js";
22
22
  import { Col as no, Grid as io, GridItem as uo, Row as lo } from "./grid/index.js";
23
23
  import { Heatmap as To } from "./heatmap/index.js";
24
24
  import { Image as Po, ImagePreview as go, ImagePreviewAction as Io, ImagePreviewGroup as ko } from "./image/index.js";
25
- import { Layout as wo, LayoutContent as Lo, LayoutFooter as bo, LayoutHeader as Co, LayoutSidebar as ho } from "./layout/index.js";
25
+ import { Layout as Lo, LayoutContent as wo, LayoutFooter as bo, LayoutHeader as Co, LayoutSidebar as ho } from "./layout/index.js";
26
26
  import { LineChart as yo } from "./line-chart/index.js";
27
27
  import { Link as vo } from "./link/index.js";
28
28
  import { Menu as Mo, MenuItem as Ro, MenuItemGroup as Ao, MenuSubMenu as Eo } from "./menu/index.js";
@@ -31,41 +31,42 @@ import { Network as jo } from "./network/index.js";
31
31
  import { Notification as Ho } from "./notification/index.js";
32
32
  import { Pagination as Wo } from "./pagination/index.js";
33
33
  import { PieChart as zo } from "./pie-chart/index.js";
34
- import { Popconfirm as Yo } from "./popconfirm/index.js";
35
- import { Popover as qo } from "./popover/index.js";
36
- import { Popup as Vo } from "./popup/index.js";
34
+ import { Popconfirm as Vo } from "./popconfirm/index.js";
35
+ import { Popover as Zo } from "./popover/index.js";
36
+ import { Popup as Jo } from "./popup/index.js";
37
37
  import { Progress as $o } from "./progress/index.js";
38
38
  import { Rate as rr } from "./rate/index.js";
39
39
  import { ResizeBox as tr } from "./resize-box/index.js";
40
40
  import { Scrollbar as mr } from "./scrollbar-v2/index.js";
41
- import { Skeleton as xr, SkeletonLine as ar, SkeletonShape as nr } from "./skeleton/index.js";
42
- import { Space as ur } from "./space/index.js";
43
- import { Spin as cr } from "./spin/index.js";
44
- import { Step as Tr, Steps as Sr } from "./steps/index.js";
45
- import { Table as gr, TableColumn as Ir } from "./table/index.js";
46
- import { TabPane as sr, Tabs as wr } from "./tabs/index.js";
47
- import { Tag as br } from "./tag/index.js";
48
- import { TimePicker as hr } from "./time-picker/index.js";
49
- import { TimeRangeSelector as yr } from "./time-range-selector/index.js";
50
- import { Timeline as vr } from "./timeline/index.js";
51
- import { TimelineItem as Mr } from "./timeline-item/index.js";
52
- import { Tooltip as Ar } from "./tooltip/index.js";
53
- import { TreeSelect as _r, TreeSelectDropdown as Nr } from "./tree-select/index.js";
54
- import { Transfer as jr } from "./transfer/index.js";
55
- import { TrendChart as Hr } from "./trend-chart/index.js";
56
- import { Trigger as Wr } from "./trigger/index.js";
57
- import { Upload as zr } from "./upload/index.js";
58
- import { Watermark as Yr } from "./watermark/index.js";
59
- import { TABLE_LOCALE_EN_US as qr, TABLE_LOCALE_ZH_CN as Jr, formatLocaleText as Vr } from "./table/locale.js";
60
- import { default as $r } from "./table/table-tbody.js";
61
- import { default as re } from "./table/table-td.js";
62
- import { default as te } from "./table/table-th.js";
63
- import { default as me } from "./table/table-thead.js";
64
- import { default as xe } from "./table/table-tr.js";
65
- import { configProviderInjectionKey as ne } from "./config-provider/context.js";
66
- import { formInjectionKey as ue, formItemInjectionKey as le } from "./form/context.js";
67
- import { vDraggable as de } from "./draggable/directive.js";
68
- import { vWatermark as Se } from "./watermark/directive.js";
41
+ import { VirtualList as xr } from "./virtual-list-v2/index.js";
42
+ import { Skeleton as nr, SkeletonLine as ir, SkeletonShape as ur } from "./skeleton/index.js";
43
+ import { Space as cr } from "./space/index.js";
44
+ import { Spin as Tr } from "./spin/index.js";
45
+ import { Step as Pr, Steps as gr } from "./steps/index.js";
46
+ import { Table as kr, TableColumn as sr } from "./table/index.js";
47
+ import { TabPane as wr, Tabs as br } from "./tabs/index.js";
48
+ import { Tag as hr } from "./tag/index.js";
49
+ import { TimePicker as yr } from "./time-picker/index.js";
50
+ import { TimeRangeSelector as vr } from "./time-range-selector/index.js";
51
+ import { Timeline as Mr } from "./timeline/index.js";
52
+ import { TimelineItem as Ar } from "./timeline-item/index.js";
53
+ import { Tooltip as _r } from "./tooltip/index.js";
54
+ import { TreeSelect as Or, TreeSelectDropdown as jr } from "./tree-select/index.js";
55
+ import { Transfer as Hr } from "./transfer/index.js";
56
+ import { TrendChart as Wr } from "./trend-chart/index.js";
57
+ import { Trigger as zr } from "./trigger/index.js";
58
+ import { Upload as Vr } from "./upload/index.js";
59
+ import { Watermark as Zr } from "./watermark/index.js";
60
+ import { TABLE_LOCALE_EN_US as Jr, TABLE_LOCALE_ZH_CN as Xr, formatLocaleText as $r } from "./table/locale.js";
61
+ import { default as re } from "./table/table-tbody.js";
62
+ import { default as te } from "./table/table-td.js";
63
+ import { default as me } from "./table/table-th.js";
64
+ import { default as xe } from "./table/table-thead.js";
65
+ import { default as ne } from "./table/table-tr.js";
66
+ import { configProviderInjectionKey as ue } from "./config-provider/context.js";
67
+ import { formInjectionKey as ce, formItemInjectionKey as de } from "./form/context.js";
68
+ import { vDraggable as Se } from "./draggable/directive.js";
69
+ import { vWatermark as ge } from "./watermark/directive.js";
69
70
  export {
70
71
  e as Alert,
71
72
  mo as BarChart,
@@ -101,8 +102,8 @@ export {
101
102
  _ as InputPassword,
102
103
  N as InputSearch,
103
104
  H as InputTag,
104
- wo as Layout,
105
- Lo as LayoutContent,
105
+ Lo as Layout,
106
+ wo as LayoutContent,
106
107
  bo as LayoutFooter,
107
108
  Co as LayoutHeader,
108
109
  ho as LayoutSidebar,
@@ -113,16 +114,16 @@ export {
113
114
  Ao as MenuItemGroup,
114
115
  Eo as MenuSubMenu,
115
116
  No as Message,
116
- w as MonthPicker,
117
+ L as MonthPicker,
117
118
  jo as Network,
118
119
  Ho as Notification,
119
120
  Wo as Pagination,
120
121
  zo as PieChart,
121
- Yo as Popconfirm,
122
- qo as Popover,
123
- Vo as Popup,
122
+ Vo as Popconfirm,
123
+ Zo as Popover,
124
+ Jo as Popup,
124
125
  $o as Progress,
125
- L as QuarterPicker,
126
+ w as QuarterPicker,
126
127
  W as Radio,
127
128
  U as RadioGroup,
128
129
  b as RangePicker,
@@ -131,49 +132,50 @@ export {
131
132
  lo as Row,
132
133
  mr as Scrollbar,
133
134
  Q as Select,
134
- Y as SelectDropdown,
135
- Z as SelectOption,
136
- q as SelectOptionGroup,
137
- xr as Skeleton,
138
- ar as SkeletonLine,
139
- nr as SkeletonShape,
140
- V as Slider,
141
- ur as Space,
142
- cr as Spin,
143
- Tr as Step,
144
- Sr as Steps,
135
+ V as SelectDropdown,
136
+ Y as SelectOption,
137
+ Z as SelectOptionGroup,
138
+ nr as Skeleton,
139
+ ir as SkeletonLine,
140
+ ur as SkeletonShape,
141
+ J as Slider,
142
+ cr as Space,
143
+ Tr as Spin,
144
+ Pr as Step,
145
+ gr as Steps,
145
146
  $ as Switch,
146
- qr as TABLE_LOCALE_EN_US,
147
- Jr as TABLE_LOCALE_ZH_CN,
148
- sr as TabPane,
149
- gr as Table,
150
- Ir as TableColumn,
151
- wr as Tabs,
152
- br as Tag,
153
- $r as Tbody,
154
- re as Td,
147
+ Jr as TABLE_LOCALE_EN_US,
148
+ Xr as TABLE_LOCALE_ZH_CN,
149
+ wr as TabPane,
150
+ kr as Table,
151
+ sr as TableColumn,
152
+ br as Tabs,
153
+ hr as Tag,
154
+ re as Tbody,
155
+ te as Td,
155
156
  ro as Textarea,
156
- te as Th,
157
- me as Thead,
158
- hr as TimePicker,
159
- yr as TimeRangeSelector,
160
- vr as Timeline,
161
- Mr as TimelineItem,
162
- Ar as Tooltip,
163
- xe as Tr,
164
- jr as Transfer,
165
- _r as TreeSelect,
166
- Nr as TreeSelectDropdown,
167
- Hr as TrendChart,
168
- Wr as Trigger,
169
- zr as Upload,
170
- Yr as Watermark,
157
+ me as Th,
158
+ xe as Thead,
159
+ yr as TimePicker,
160
+ vr as TimeRangeSelector,
161
+ Mr as Timeline,
162
+ Ar as TimelineItem,
163
+ _r as Tooltip,
164
+ ne as Tr,
165
+ Hr as Transfer,
166
+ Or as TreeSelect,
167
+ jr as TreeSelectDropdown,
168
+ Wr as TrendChart,
169
+ zr as Trigger,
170
+ Vr as Upload,
171
+ xr as VirtualList,
172
+ Zr as Watermark,
171
173
  C as WeekPicker,
172
174
  h as YearPicker,
173
- ne as configProviderInjectionKey,
174
- ue as formInjectionKey,
175
- le as formItemInjectionKey,
176
- Vr as formatLocaleText,
177
- de as vDraggable,
178
- Se as vWatermark
175
+ ue as configProviderInjectionKey,
176
+ ce as formInjectionKey,
177
+ de as formItemInjectionKey,
178
+ $r as formatLocaleText,
179
+ Se as vDraggable,
180
+ ge as vWatermark
179
181
  };
@@ -1,27 +1,27 @@
1
- import { defineComponent as ot, toRefs as rt, reactive as M, ref as ut, computed as l, watch as K, onBeforeUnmount as st } from "vue";
2
- import dt from "../../_container/resize-trigger.vue.js";
3
- import V from "../../_hooks/use-merge-state.js";
1
+ import { defineComponent as rt, toRefs as ut, reactive as M, ref as st, computed as d, watch as D, onBeforeUnmount as dt } from "vue";
2
+ import at from "../../_container/resize-trigger.vue.js";
3
+ import K from "../../_hooks/use-merge-state.js";
4
4
  import { isNumber as s } from "../../_utils/is.js";
5
- import { off as D, on as E } from "../../_utils/dom.js";
6
- import { getClassNameMixin as at } from "../../_utils/config.js";
7
- const _ = "left", z = "right", k = "top", S = "bottom", ct = [
8
- _,
5
+ import { off as E, on as O } from "../../_utils/dom.js";
6
+ import { getClassNameMixin as ct } from "../../_utils/config.js";
7
+ const z = "left", C = "right", W = "top", R = "bottom", V = [
9
8
  z,
10
- k,
11
- S
9
+ C,
10
+ W,
11
+ R
12
12
  ];
13
- function R(o, h) {
13
+ function G(o, a) {
14
14
  if (o === 0) return 0;
15
- const u = o - h;
15
+ const u = o - a;
16
16
  return u <= 0 ? 0 : u;
17
17
  }
18
- function O(o) {
19
- return [k, S].indexOf(o) > -1;
18
+ function _(o) {
19
+ return [W, R].indexOf(o) > -1;
20
20
  }
21
- const vt = ot({
21
+ const vt = rt({
22
22
  name: "ResizeBox",
23
23
  components: {
24
- ResizeTrigger: dt
24
+ ResizeTrigger: at
25
25
  },
26
26
  inheritAttrs: !1,
27
27
  props: {
@@ -103,7 +103,7 @@ const vt = ot({
103
103
  * @param {{ width: number; height: number; }} size
104
104
  * @param {MouseEvent} ev
105
105
  */
106
- moving: (o, h) => !0,
106
+ moving: (o, a) => !0,
107
107
  /**
108
108
  * @zh 拖拽结束时触发
109
109
  * @en Triggered when the drag ends
@@ -123,30 +123,30 @@ const vt = ot({
123
123
  * @slot resize-trigger-icon
124
124
  * @binding {'left' | 'right' | 'top' | 'bottom'} direction
125
125
  */
126
- setup(o, { attrs: h, emit: u }) {
127
- const { height: G, width: j, directions: q } = rt(o), [f, C] = V(
126
+ setup(o, { attrs: a, emit: u }) {
127
+ const { height: j, width: q, directions: J } = ut(o), [m, P] = K(
128
128
  null,
129
129
  M({
130
- value: j
130
+ value: q
131
131
  })
132
- ), [p, P] = V(
132
+ ), [p, Y] = K(
133
133
  null,
134
134
  M({
135
- value: G
135
+ value: j
136
136
  })
137
- ), v = ut(), Y = M({}), X = at("resize-box"), J = l(() => {
138
- const { class: t, style: e, ...i } = h;
137
+ ), S = st(), k = M({}), X = ct("resize-box"), Q = d(() => {
138
+ const { class: t, style: e, ...i } = a;
139
139
  return i;
140
- }), Q = l(() => [X.block, h.class]), y = l(
141
- () => s(f.value) ? W(f.value) : f.value
142
- ), w = l(
143
- () => s(p.value) ? x(p.value) : p.value
144
- ), L = l(() => ({
145
- ...s(y.value) ? { width: `${y.value}px` } : {},
146
- ...s(w.value) ? { height: `${w.value}px` } : {},
147
- ...Y
148
- })), Z = l(() => [h.style, L.value]), tt = l(
149
- () => q.value.filter((t) => ct.includes(t))
140
+ }), Z = d(() => [X.block, a.class]), v = d(
141
+ () => s(m.value) ? N(m.value) : m.value
142
+ ), y = d(
143
+ () => s(p.value) ? I(p.value) : p.value
144
+ ), L = d(() => ({
145
+ ...s(v.value) ? { width: `${v.value}px` } : {},
146
+ ...s(y.value) ? { height: `${y.value}px` } : {},
147
+ ...k
148
+ })), tt = d(() => [a.style, L.value]), A = d(
149
+ () => J.value.filter((t) => V.includes(t))
150
150
  ), r = {
151
151
  direction: "",
152
152
  startPageX: 0,
@@ -161,93 +161,96 @@ const vt = ot({
161
161
  bottom: 0
162
162
  }
163
163
  };
164
- let H, I;
165
- function W(t) {
164
+ D(A, (t) => {
165
+ for (const e of V)
166
+ t.includes(e) || (r.padding[e] = 0, delete k[`padding-${e}`]);
167
+ });
168
+ let w, b;
169
+ function N(t) {
166
170
  return Math.min(o.maxWidth ?? Number.POSITIVE_INFINITY, Math.max(o.minWidth, t));
167
171
  }
168
- function x(t) {
172
+ function I(t) {
169
173
  return Math.min(
170
174
  o.maxHeight ?? Number.POSITIVE_INFINITY,
171
175
  Math.max(o.minHeight, t)
172
176
  );
173
177
  }
174
- function b() {
178
+ function c() {
175
179
  var i;
176
180
  const { left: t, right: e } = r.padding;
177
- return s(y.value) ? y.value : R(((i = v.value) == null ? void 0 : i.clientWidth) || 0, t + e);
181
+ return s(v.value) ? v.value : G(((i = S.value) == null ? void 0 : i.clientWidth) || 0, t + e);
178
182
  }
179
- function N() {
183
+ function l() {
180
184
  var i;
181
185
  const { top: t, bottom: e } = r.padding;
182
- return s(w.value) ? w.value : R(((i = v.value) == null ? void 0 : i.clientHeight) || 0, t + e);
186
+ return s(y.value) ? y.value : G(((i = S.value) == null ? void 0 : i.clientHeight) || 0, t + e);
183
187
  }
184
- function m(t, e) {
185
- const i = W(t);
186
- C(i), u("update:width", i), u("moving", { width: i, height: N() }, e);
188
+ function f(t, e) {
189
+ const i = N(t);
190
+ P(i), u("update:width", i), u("moving", { width: i, height: l() }, e);
187
191
  }
188
- K(y, (t) => {
189
- s(f.value) && s(t) && t !== f.value && (C(t), u("update:width", t));
190
- }, { immediate: !0 }), K(w, (t) => {
191
- s(p.value) && s(t) && t !== p.value && (P(t), u("update:height", t));
192
+ D(v, (t) => {
193
+ s(m.value) && s(t) && t !== m.value && (P(t), u("update:width", t));
194
+ }, { immediate: !0 }), D(y, (t) => {
195
+ s(p.value) && s(t) && t !== p.value && (Y(t), u("update:height", t));
192
196
  }, { immediate: !0 });
193
- function g(t, e) {
194
- const i = x(t);
195
- P(i), u("update:height", i), u("moving", { width: b(), height: i }, e);
197
+ function h(t, e) {
198
+ const i = I(t);
199
+ Y(i), u("update:height", i), u("moving", { width: c(), height: i }, e);
196
200
  }
197
- function U() {
198
- D(window, "mousemove", $), D(window, "mouseup", T), D(window, "contextmenu", T), H !== void 0 && typeof document < "u" && document.body && (document.body.style.cursor = H, H = void 0), I !== void 0 && typeof document < "u" && document.body && (document.body.style.userSelect = I, I = void 0);
201
+ function $() {
202
+ E(window, "mousemove", U), E(window, "mouseup", H), E(window, "contextmenu", H), w !== void 0 && typeof document < "u" && document.body && (document.body.style.cursor = w, w = void 0), b !== void 0 && typeof document < "u" && document.body && (document.body.style.userSelect = b, b = void 0);
199
203
  }
200
- function $(t) {
204
+ function U(t) {
201
205
  if (!r.moving) return;
202
- const { startPageX: e, startPageY: i, startWidth: n, startHeight: d, direction: A } = r;
203
- let a = n, c = d;
206
+ const { startPageX: e, startPageY: i, startWidth: n, startHeight: g, direction: ot } = r;
207
+ let T = n, x = g;
204
208
  const B = t.pageX - e, F = t.pageY - i;
205
- switch (A) {
206
- case _:
207
- a = W(n - B), m(a, t);
208
- break;
209
+ switch (ot) {
209
210
  case z:
210
- a = W(n + B), m(a, t);
211
+ T = N(n - B), f(T, t);
212
+ break;
213
+ case C:
214
+ T = N(n + B), f(T, t);
211
215
  break;
212
- case k:
213
- c = x(d - F), g(c, t);
216
+ case W:
217
+ x = I(g - F), h(x, t);
214
218
  break;
215
- case S:
216
- c = x(d + F), g(c, t);
219
+ case R:
220
+ x = I(g + F), h(x, t);
217
221
  break;
218
222
  }
219
223
  }
220
- function T(t) {
221
- r.moving && (r.moving = !1, U(), u("movingEnd", t));
224
+ function H(t) {
225
+ r.moving && (r.moving = !1, $(), u("movingEnd", t));
222
226
  }
223
227
  function et(t, e) {
224
- var a, c;
225
- e.preventDefault(), u("movingStart", e), r.moving = !0, H = typeof document < "u" ? document.body.style.cursor : "", I = typeof document < "u" ? document.body.style.userSelect : "", r.startPageX = e.pageX, r.startPageY = e.pageY, r.direction = t;
226
- const { top: i, left: n, right: d, bottom: A } = r.padding;
227
- r.startWidth = R(((a = v.value) == null ? void 0 : a.clientWidth) || 0, n + d), r.startHeight = R(((c = v.value) == null ? void 0 : c.clientHeight) || 0, i + A), E(window, "mousemove", $), E(window, "mouseup", T), E(window, "contextmenu", T), document.body.style.cursor = O(t) ? "row-resize" : "col-resize", document.body.style.userSelect = "none";
228
+ var i, n;
229
+ e.preventDefault(), (n = (i = e.currentTarget) == null ? void 0 : i.focus) == null || n.call(i, { preventScroll: !0 }), u("movingStart", e), r.moving = !0, w = typeof document < "u" ? document.body.style.cursor : "", b = typeof document < "u" ? document.body.style.userSelect : "", r.startPageX = e.pageX, r.startPageY = e.pageY, r.direction = t, r.startWidth = c(), r.startHeight = l(), O(window, "mousemove", U), O(window, "mouseup", H), O(window, "contextmenu", H), document.body.style.cursor = _(t) ? "row-resize" : "col-resize", document.body.style.userSelect = "none";
228
230
  }
229
231
  function it(t, e) {
230
232
  const i = e.shiftKey ? 1 : 10;
231
233
  let n = !1;
232
- t === _ ? e.key === "ArrowLeft" ? (m(b() + i, e), n = !0) : e.key === "ArrowRight" && (m(b() - i, e), n = !0) : t === z ? e.key === "ArrowRight" ? (m(b() + i, e), n = !0) : e.key === "ArrowLeft" && (m(b() - i, e), n = !0) : t === k ? e.key === "ArrowUp" ? (g(N() + i, e), n = !0) : e.key === "ArrowDown" && (g(N() - i, e), n = !0) : t === S && (e.key === "ArrowDown" ? (g(N() + i, e), n = !0) : e.key === "ArrowUp" && (g(N() - i, e), n = !0)), n && e.preventDefault();
234
+ t === z ? e.key === "ArrowLeft" ? (f(c() + i, e), n = !0) : e.key === "ArrowRight" && (f(c() - i, e), n = !0) : t === C ? e.key === "ArrowRight" ? (f(c() + i, e), n = !0) : e.key === "ArrowLeft" && (f(c() - i, e), n = !0) : t === W ? e.key === "ArrowUp" ? (h(l() + i, e), n = !0) : e.key === "ArrowDown" && (h(l() - i, e), n = !0) : t === R && (e.key === "ArrowDown" ? (h(l() + i, e), n = !0) : e.key === "ArrowUp" && (h(l() - i, e), n = !0)), n && e.preventDefault();
233
235
  }
234
236
  function nt(t, e) {
235
- const { width: i, height: n } = e.contentRect, d = O(t) ? n : i;
236
- r.padding[t] = d, Y[`padding-${t}`] = `${d}px`;
237
+ if (!A.value.includes(t)) return;
238
+ const { width: i, height: n } = e.contentRect, g = _(t) ? n : i;
239
+ r.padding[t] = g, k[`padding-${t}`] = `${g}px`;
237
240
  }
238
- return st(() => {
239
- U();
241
+ return dt(() => {
242
+ $();
240
243
  }), {
241
244
  className: X,
242
- classNames: Q,
243
- wrapperAttrs: J,
245
+ classNames: Z,
246
+ wrapperAttrs: Q,
244
247
  styles: L,
245
- mergedStyles: Z,
246
- wrapperRef: v,
248
+ mergedStyles: tt,
249
+ wrapperRef: S,
247
250
  onMoveStart: et,
248
251
  onTriggerKeydown: it,
249
- isHorizontal: O,
250
- allowDirections: tt,
252
+ isHorizontal: _,
253
+ allowDirections: A,
251
254
  onTiggerResize: nt
252
255
  };
253
256
  }
@@ -18,7 +18,7 @@ import Oa from "./table-th.js";
18
18
  import we from "./table-td.js";
19
19
  import Ia from "./table-operation-th.js";
20
20
  import Vt from "./table-operation-td.js";
21
- import Ha from "../virtual-list-v2/virtual-list.vue.js";
21
+ import { VirtualList as Ha } from "../virtual-list-v2/index.js";
22
22
  import qt from "../../_container/resize-observer.js";
23
23
  import { omit as Yt } from "../../_utils/omit.js";
24
24
  import { useDrag as ja } from "./hooks/use-drag.js";
@@ -5,7 +5,7 @@ import { Input as re } from "../form-input/index.js";
5
5
  import { Empty as ue } from "../empty/index.js";
6
6
  import { Spin as ie } from "../spin/index.js";
7
7
  import { Pagination as oe } from "../pagination/index.js";
8
- import ce from "../virtual-list-v2/virtual-list.vue.js";
8
+ import { VirtualList as ce } from "../virtual-list-v2/index.js";
9
9
  import { useLocale as se } from "../../locale/index.js";
10
10
  import { transferKey as S } from "./utils.js";
11
11
  function J(a) {
@@ -4,7 +4,7 @@ import { Trigger as _ } from "../trigger/index.js";
4
4
  import $ from "../_components/select-view/select-view.js";
5
5
  import na from "./TreeSelectDropdown.vue.js";
6
6
  import ua from "./TreeNode.vue.js";
7
- import ra from "../virtual-list-v2/virtual-list.vue.js";
7
+ import { VirtualList as ra } from "../virtual-list-v2/index.js";
8
8
  import { useFormItem as da } from "../../_hooks/use-form-item.js";
9
9
  import { useTrigger as ia } from "../../_hooks/use-trigger.js";
10
10
  import { useLocale as ca } from "../../locale/index.js";
@@ -1,4 +1,8 @@
1
- import r from "./virtual-list.vue.js";
1
+ import t from "./virtual-list.vue.js";
2
+ import { generateComponent as o } from "../../_utils/vue-eco.js";
3
+ import { getComponentPrefix as r } from "../../_utils/config.js";
4
+ const a = o(r("VirtualList"), t);
2
5
  export {
3
- r as default
6
+ a as VirtualList,
7
+ a as default
4
8
  };