x-next 1.18.1 → 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.
- package/AI_USAGE/catalog.md +3 -2
- package/AI_USAGE/components/alert-api.md +1 -1
- package/AI_USAGE/components/alert.md +1 -1
- package/AI_USAGE/components/bar-chart-api.md +1 -1
- package/AI_USAGE/components/bar-chart.md +1 -1
- package/AI_USAGE/components/boxicons.md +1 -1
- package/AI_USAGE/components/button-api.md +1 -1
- package/AI_USAGE/components/button.md +1 -1
- package/AI_USAGE/components/charts.md +1 -1
- package/AI_USAGE/components/checkbox-api.md +1 -1
- package/AI_USAGE/components/checkbox.md +1 -1
- package/AI_USAGE/components/color-picker-api.md +1 -1
- package/AI_USAGE/components/color-picker.md +1 -1
- package/AI_USAGE/components/config-provider-api.md +1 -1
- package/AI_USAGE/components/config-provider.md +1 -1
- package/AI_USAGE/components/date-picker-api.md +1 -1
- package/AI_USAGE/components/date-picker.md +1 -1
- package/AI_USAGE/components/dialog-api.md +1 -1
- package/AI_USAGE/components/dialog.md +1 -1
- package/AI_USAGE/components/draggable-api.md +1 -1
- package/AI_USAGE/components/draggable.md +1 -1
- package/AI_USAGE/components/drawer-api.md +1 -1
- package/AI_USAGE/components/drawer.md +1 -1
- package/AI_USAGE/components/dropdown-api.md +1 -1
- package/AI_USAGE/components/dropdown.md +1 -1
- package/AI_USAGE/components/empty-api.md +1 -1
- package/AI_USAGE/components/empty.md +1 -1
- package/AI_USAGE/components/finicon.md +1 -1
- package/AI_USAGE/components/form-api.md +1 -1
- package/AI_USAGE/components/form.md +1 -1
- package/AI_USAGE/components/grid-api.md +1 -1
- package/AI_USAGE/components/grid.md +1 -1
- package/AI_USAGE/components/heatmap-api.md +1 -1
- package/AI_USAGE/components/heatmap.md +1 -1
- package/AI_USAGE/components/icon-api.md +1 -1
- package/AI_USAGE/components/icon.md +1 -1
- package/AI_USAGE/components/image-api.md +1 -1
- package/AI_USAGE/components/image.md +1 -1
- package/AI_USAGE/components/input-api.md +1 -1
- package/AI_USAGE/components/input-number-api.md +1 -1
- package/AI_USAGE/components/input-number.md +1 -1
- package/AI_USAGE/components/input-tag-api.md +1 -1
- package/AI_USAGE/components/input-tag.md +1 -1
- package/AI_USAGE/components/input.md +1 -1
- package/AI_USAGE/components/layout-api.md +1 -1
- package/AI_USAGE/components/layout.md +1 -1
- package/AI_USAGE/components/line-chart-api.md +1 -1
- package/AI_USAGE/components/line-chart.md +1 -1
- package/AI_USAGE/components/link-api.md +1 -1
- package/AI_USAGE/components/link.md +1 -1
- package/AI_USAGE/components/menu-api.md +1 -1
- package/AI_USAGE/components/menu.md +1 -1
- package/AI_USAGE/components/message-api.md +1 -1
- package/AI_USAGE/components/message-box-api.md +1 -1
- package/AI_USAGE/components/message-box.md +1 -1
- package/AI_USAGE/components/message.md +1 -1
- package/AI_USAGE/components/network-api.md +1 -1
- package/AI_USAGE/components/network.md +1 -1
- package/AI_USAGE/components/notification-api.md +1 -1
- package/AI_USAGE/components/notification.md +1 -1
- package/AI_USAGE/components/pagination-api.md +1 -1
- package/AI_USAGE/components/pagination.md +1 -1
- package/AI_USAGE/components/pie-chart-api.md +1 -1
- package/AI_USAGE/components/pie-chart.md +1 -1
- package/AI_USAGE/components/popconfirm-api.md +1 -1
- package/AI_USAGE/components/popconfirm.md +1 -1
- package/AI_USAGE/components/popover-api.md +1 -1
- package/AI_USAGE/components/popover.md +1 -1
- package/AI_USAGE/components/popup-api.md +1 -1
- package/AI_USAGE/components/popup.md +1 -1
- package/AI_USAGE/components/progress-api.md +1 -1
- package/AI_USAGE/components/progress.md +1 -1
- package/AI_USAGE/components/radio-api.md +1 -1
- package/AI_USAGE/components/radio.md +1 -1
- package/AI_USAGE/components/rate-api.md +1 -1
- package/AI_USAGE/components/rate.md +1 -1
- package/AI_USAGE/components/resize-box-api.md +1 -1
- package/AI_USAGE/components/resize-box.md +1 -1
- package/AI_USAGE/components/scrollbar-api.md +1 -1
- package/AI_USAGE/components/scrollbar.md +1 -1
- package/AI_USAGE/components/select-api.md +1 -1
- package/AI_USAGE/components/select.md +1 -1
- package/AI_USAGE/components/skeleton-api.md +1 -1
- package/AI_USAGE/components/skeleton.md +1 -1
- package/AI_USAGE/components/slider-api.md +1 -1
- package/AI_USAGE/components/slider.md +1 -1
- package/AI_USAGE/components/space-api.md +1 -1
- package/AI_USAGE/components/space.md +1 -1
- package/AI_USAGE/components/spin-api.md +1 -1
- package/AI_USAGE/components/spin.md +1 -1
- package/AI_USAGE/components/steps-api.md +1 -1
- package/AI_USAGE/components/steps.md +1 -1
- package/AI_USAGE/components/switch-api.md +1 -1
- package/AI_USAGE/components/switch.md +1 -1
- package/AI_USAGE/components/table-api.md +1 -1
- package/AI_USAGE/components/table.md +1 -1
- package/AI_USAGE/components/tabs-api.md +1 -1
- package/AI_USAGE/components/tabs.md +1 -1
- package/AI_USAGE/components/tag-api.md +1 -1
- package/AI_USAGE/components/tag.md +1 -1
- package/AI_USAGE/components/textarea-api.md +1 -1
- package/AI_USAGE/components/textarea.md +1 -1
- package/AI_USAGE/components/time-picker-api.md +1 -1
- package/AI_USAGE/components/time-picker.md +1 -1
- package/AI_USAGE/components/time-range-selector-api.md +1 -1
- package/AI_USAGE/components/time-range-selector.md +1 -1
- package/AI_USAGE/components/timeline-api.md +1 -1
- package/AI_USAGE/components/timeline.md +1 -1
- package/AI_USAGE/components/tooltip-api.md +1 -1
- package/AI_USAGE/components/tooltip.md +1 -1
- package/AI_USAGE/components/transfer-api.md +1 -1
- package/AI_USAGE/components/transfer.md +1 -1
- package/AI_USAGE/components/tree-select-api.md +1 -1
- package/AI_USAGE/components/tree-select.md +1 -1
- package/AI_USAGE/components/trend-chart-api.md +1 -1
- package/AI_USAGE/components/trend-chart.md +1 -1
- package/AI_USAGE/components/trigger-api.md +1 -1
- package/AI_USAGE/components/trigger.md +1 -1
- package/AI_USAGE/components/upload-api.md +1 -1
- package/AI_USAGE/components/upload.md +1 -1
- package/AI_USAGE/components/virtual-list-api.md +135 -0
- package/AI_USAGE/components/virtual-list.md +62 -0
- package/AI_USAGE/components/watermark-api.md +1 -1
- package/AI_USAGE/components/watermark.md +1 -1
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +3 -2
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +180 -3
- package/CHANGELOG.md +29 -0
- package/README.md +108 -212
- package/dist/components/form-select/index.d.ts +3 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/pagination/page-options.vue.d.ts +3 -3
- package/dist/components/table/index.d.ts +3 -3
- package/dist/components/transfer/index.d.ts +3 -3
- package/dist/components/tree-select/index.d.ts +3 -3
- package/dist/components/virtual-list-v2/index.d.ts +1052 -2
- package/dist/components/virtual-list-v2/interface.d.ts +6 -0
- package/dist/components/virtual-list-v2/virtual-list.vue.d.ts +32 -1
- package/dist/es/components/form-select/Select.js +1 -1
- package/dist/es/components/index.js +85 -83
- package/dist/es/components/resize-box/ResizeBox.vue2.js +84 -81
- package/dist/es/components/table/Table.js +1 -1
- package/dist/es/components/transfer/transfer-panel.js +1 -1
- package/dist/es/components/tree-select/TreeSelect.js +1 -1
- package/dist/es/components/virtual-list-v2/index.js +6 -2
- package/dist/es/components/virtual-list-v2/virtual-list.vue.js +18 -17
- package/dist/es/components/virtual-list-v2/virtual-list.vue2.js +97 -70
- package/dist/es/index.js +55 -53
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/types.d.ts +1 -0
- package/package.json +4 -4
- 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/
|
|
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
|
|
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
|
|
16
|
-
import { Slider as
|
|
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
|
|
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
|
|
35
|
-
import { Popover as
|
|
36
|
-
import { Popup as
|
|
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 {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import { default as re } from "./table/table-
|
|
62
|
-
import { default as te } from "./table/table-
|
|
63
|
-
import { default as me } from "./table/table-
|
|
64
|
-
import { default as xe } from "./table/table-
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
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
|
-
|
|
105
|
-
|
|
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
|
-
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
Vo as Popconfirm,
|
|
123
|
+
Zo as Popover,
|
|
124
|
+
Jo as Popup,
|
|
124
125
|
$o as Progress,
|
|
125
|
-
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
|
6
|
-
import { getClassNameMixin as
|
|
7
|
-
const
|
|
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
|
-
|
|
11
|
-
|
|
9
|
+
C,
|
|
10
|
+
W,
|
|
11
|
+
R
|
|
12
12
|
];
|
|
13
|
-
function
|
|
13
|
+
function G(o, a) {
|
|
14
14
|
if (o === 0) return 0;
|
|
15
|
-
const u = o -
|
|
15
|
+
const u = o - a;
|
|
16
16
|
return u <= 0 ? 0 : u;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return [
|
|
18
|
+
function _(o) {
|
|
19
|
+
return [W, R].indexOf(o) > -1;
|
|
20
20
|
}
|
|
21
|
-
const vt =
|
|
21
|
+
const vt = rt({
|
|
22
22
|
name: "ResizeBox",
|
|
23
23
|
components: {
|
|
24
|
-
ResizeTrigger:
|
|
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,
|
|
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:
|
|
127
|
-
const { height:
|
|
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:
|
|
130
|
+
value: q
|
|
131
131
|
})
|
|
132
|
-
), [p,
|
|
132
|
+
), [p, Y] = K(
|
|
133
133
|
null,
|
|
134
134
|
M({
|
|
135
|
-
value:
|
|
135
|
+
value: j
|
|
136
136
|
})
|
|
137
|
-
),
|
|
138
|
-
const { class: t, style: e, ...i } =
|
|
137
|
+
), S = st(), k = M({}), X = ct("resize-box"), Q = d(() => {
|
|
138
|
+
const { class: t, style: e, ...i } = a;
|
|
139
139
|
return i;
|
|
140
|
-
}),
|
|
141
|
-
() => s(
|
|
142
|
-
),
|
|
143
|
-
() => s(p.value) ?
|
|
144
|
-
), L =
|
|
145
|
-
...s(
|
|
146
|
-
...s(
|
|
147
|
-
...
|
|
148
|
-
})),
|
|
149
|
-
() =>
|
|
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
|
-
|
|
165
|
-
|
|
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
|
|
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
|
|
178
|
+
function c() {
|
|
175
179
|
var i;
|
|
176
180
|
const { left: t, right: e } = r.padding;
|
|
177
|
-
return s(
|
|
181
|
+
return s(v.value) ? v.value : G(((i = S.value) == null ? void 0 : i.clientWidth) || 0, t + e);
|
|
178
182
|
}
|
|
179
|
-
function
|
|
183
|
+
function l() {
|
|
180
184
|
var i;
|
|
181
185
|
const { top: t, bottom: e } = r.padding;
|
|
182
|
-
return s(
|
|
186
|
+
return s(y.value) ? y.value : G(((i = S.value) == null ? void 0 : i.clientHeight) || 0, t + e);
|
|
183
187
|
}
|
|
184
|
-
function
|
|
185
|
-
const i =
|
|
186
|
-
|
|
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
|
-
|
|
189
|
-
s(
|
|
190
|
-
}, { immediate: !0 }),
|
|
191
|
-
s(p.value) && s(t) && t !== p.value && (
|
|
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
|
|
194
|
-
const i =
|
|
195
|
-
|
|
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
|
|
198
|
-
|
|
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
|
|
204
|
+
function U(t) {
|
|
201
205
|
if (!r.moving) return;
|
|
202
|
-
const { startPageX: e, startPageY: i, startWidth: n, startHeight:
|
|
203
|
-
let
|
|
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 (
|
|
206
|
-
case _:
|
|
207
|
-
a = W(n - B), m(a, t);
|
|
208
|
-
break;
|
|
209
|
+
switch (ot) {
|
|
209
210
|
case z:
|
|
210
|
-
|
|
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
|
|
213
|
-
|
|
216
|
+
case W:
|
|
217
|
+
x = I(g - F), h(x, t);
|
|
214
218
|
break;
|
|
215
|
-
case
|
|
216
|
-
|
|
219
|
+
case R:
|
|
220
|
+
x = I(g + F), h(x, t);
|
|
217
221
|
break;
|
|
218
222
|
}
|
|
219
223
|
}
|
|
220
|
-
function
|
|
221
|
-
r.moving && (r.moving = !1,
|
|
224
|
+
function H(t) {
|
|
225
|
+
r.moving && (r.moving = !1, $(), u("movingEnd", t));
|
|
222
226
|
}
|
|
223
227
|
function et(t, e) {
|
|
224
|
-
var
|
|
225
|
-
e.preventDefault(), u("movingStart", e), r.moving = !0,
|
|
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 ===
|
|
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
|
-
|
|
236
|
-
|
|
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
|
|
239
|
-
|
|
241
|
+
return dt(() => {
|
|
242
|
+
$();
|
|
240
243
|
}), {
|
|
241
244
|
className: X,
|
|
242
|
-
classNames:
|
|
243
|
-
wrapperAttrs:
|
|
245
|
+
classNames: Z,
|
|
246
|
+
wrapperAttrs: Q,
|
|
244
247
|
styles: L,
|
|
245
|
-
mergedStyles:
|
|
246
|
-
wrapperRef:
|
|
248
|
+
mergedStyles: tt,
|
|
249
|
+
wrapperRef: S,
|
|
247
250
|
onMoveStart: et,
|
|
248
251
|
onTriggerKeydown: it,
|
|
249
|
-
isHorizontal:
|
|
250
|
-
allowDirections:
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
|
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
|
-
|
|
6
|
+
a as VirtualList,
|
|
7
|
+
a as default
|
|
4
8
|
};
|