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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# TreeSelect AI 使用
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
先读 [通用接入](../core.md)。公开导出:`TreeSelect, TreeSelectDropdown`;主要模型:v-model、v-model:input-value、v-model:popup-visible、v-model:expanded-keys。完整 Props、Events、Slots、实例方法与服务签名见 [本地 API](./tree-select-api.md),包含本组件族全部子组件和别名。
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# TrendChart 完整公开 API
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
从同版本构建的公开声明、运行时 props/emits 和显式 expose 生成。运行时导入始终使用 `x-next`,声明路径仅作定位。插槽类型未细化时,具体槽名与作用域见本地用法示例。
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# TrendChart AI 使用
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
先读 [通用接入](../core.md)。公开导出:`TrendChart`;主要模型:无。完整 Props、Events、Slots、实例方法与服务签名见 [本地 API](./trend-chart-api.md),包含本组件族全部子组件和别名。
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# Trigger 完整公开 API
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
从同版本构建的公开声明、运行时 props/emits 和显式 expose 生成。运行时导入始终使用 `x-next`,声明路径仅作定位。插槽类型未细化时,具体槽名与作用域见本地用法示例。
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# Trigger AI 使用
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
先读 [通用接入](../core.md)。公开导出:`Trigger`;主要模型:v-model:popup-visible。完整 Props、Events、Slots、实例方法与服务签名见 [本地 API](./trigger-api.md),包含本组件族全部子组件和别名。
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# Upload 完整公开 API
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
从同版本构建的公开声明、运行时 props/emits 和显式 expose 生成。运行时导入始终使用 `x-next`,声明路径仅作定位。插槽类型未细化时,具体槽名与作用域见本地用法示例。
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# Upload AI 使用
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
先读 [通用接入](../core.md)。公开导出:`Upload`;主要模型:v-model:file-list。完整 Props、Events、Slots、实例方法与服务签名见 [本地 API](./upload-api.md),包含本组件族全部子组件和别名。
|
|
7
7
|
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
|
+
# VirtualList 完整公开 API
|
|
3
|
+
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
|
+
|
|
6
|
+
从同版本构建的公开声明、运行时 props/emits 和显式 expose 生成。运行时导入始终使用 `x-next`,声明路径仅作定位。插槽类型未细化时,具体槽名与作用域见本地用法示例。
|
|
7
|
+
|
|
8
|
+
## VirtualList API
|
|
9
|
+
|
|
10
|
+
公开声明:`dist/components/virtual-list-v2/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
|
|
11
|
+
|
|
12
|
+
### Props
|
|
13
|
+
|
|
14
|
+
| 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| height | 视口高度,数字按 px,也支持 CSS 高度 | undefined | string | number | 否 | 200 |
|
|
17
|
+
| data | 完整对象数组 | undefined | Record<string, any>[] | 否 | [] |
|
|
18
|
+
| threshold | 数量小于等于阈值时完整渲染,默认 0 | undefined | number | 否 | 0 |
|
|
19
|
+
| itemKey | 稳定键属性,默认 key | undefined | string | 否 | "key" |
|
|
20
|
+
| fixedSize | 固定高度模式,默认 false | undefined | false | true | 否 | false |
|
|
21
|
+
| estimatedSize | 固定或预估行高,默认 30 | undefined | number | 否 | 30 |
|
|
22
|
+
| buffer | 缓冲行数,窗口约为三倍,默认 10 | undefined | number | 否 | 10 |
|
|
23
|
+
| component | 见场景用法与类型 | undefined | string | { [x: string]: any; } | 否 | "div" |
|
|
24
|
+
| listAttrs | 业务列表层属性 | undefined | { [x: string]: any; } | 否 | 未声明 |
|
|
25
|
+
| contentAttrs | 业务内容层属性 | undefined | { [x: string]: any; } | 否 | 未声明 |
|
|
26
|
+
| paddingPosition | 见场景用法与类型 | undefined | string | 否 | "content" |
|
|
27
|
+
| scrollbar | 使用统一滚动条,默认 false | undefined | false | true | ScrollbarProps | 否 | false |
|
|
28
|
+
| preserveScroll | 数据改变时保持滚动,默认 false | undefined | false | true | 否 | false |
|
|
29
|
+
| pinnedKeys | 固定高度模式中保留挂载的稳定键;应只保留少量 | undefined | VirtualItemKey[] | 否 | undefined |
|
|
30
|
+
|
|
31
|
+
### Events
|
|
32
|
+
|
|
33
|
+
| 事件 | 用途 | 监听器签名(即事件参数) |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| scroll | 实际滚动事件,event.target 为滚动节点 | undefined | (ev: Event) => any |
|
|
36
|
+
| reachBottom | 滚动触底,不自动请求 | undefined | (ev: Event) => any |
|
|
37
|
+
| rangeChange | 窗口 start/end,end 为开区间 | undefined | (range: { start: number; end: number; }) => any |
|
|
38
|
+
|
|
39
|
+
### Slots
|
|
40
|
+
|
|
41
|
+
公开类型未逐项声明插槽;本页场景说明列出实际使用的插槽,不将任意插槽视为已支持。
|
|
42
|
+
|
|
43
|
+
### 实例方法 / 暴露值
|
|
44
|
+
|
|
45
|
+
| 名称 | 公开类型 |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| scrollTo | (options: ScrollOptions) => void |
|
|
48
|
+
| containerRef | any |
|
|
49
|
+
| currentList | Record<string, any>[] |
|
|
50
|
+
|
|
51
|
+
### 关联类型定义
|
|
52
|
+
|
|
53
|
+
以下摘自本组件族声明,供查阅嵌套配置;运行时和值类型均以根入口可导出项为准。
|
|
54
|
+
|
|
55
|
+
```typescript-reference
|
|
56
|
+
type VirtualItemKey = string | number;
|
|
57
|
+
|
|
58
|
+
interface InternalDataItem {
|
|
59
|
+
key: VirtualItemKey;
|
|
60
|
+
index: number;
|
|
61
|
+
item: unknown;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
type ItemSlot = (props: {
|
|
65
|
+
item: unknown;
|
|
66
|
+
index: number;
|
|
67
|
+
}) => VNode[];
|
|
68
|
+
|
|
69
|
+
interface ScrollIntoViewOptions {
|
|
70
|
+
index?: number;
|
|
71
|
+
key?: VirtualItemKey;
|
|
72
|
+
align: 'auto' | 'top' | 'bottom';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface VirtualListProps {
|
|
76
|
+
/**
|
|
77
|
+
* @zh 可视区域高度
|
|
78
|
+
* @en Viewable area height
|
|
79
|
+
*/
|
|
80
|
+
height?: number | string;
|
|
81
|
+
/**
|
|
82
|
+
* @zh 开启虚拟滚动的元素数量阈值,当数据数量小于阈值时不会开启虚拟滚动。
|
|
83
|
+
* @en The threshold of the number of elements to enable virtual scrolling. When the number of data is less than the threshold, virtual scrolling will not be enabled.
|
|
84
|
+
*/
|
|
85
|
+
threshold?: number;
|
|
86
|
+
/**
|
|
87
|
+
* @zh (已废除)元素高度是否是固定的。2.34.1 版本废除,请使用 `fixedSize`
|
|
88
|
+
* @en (Repealed) Is the element height fixed. Version 2.18.0 deprecated, please use `fixedSize`
|
|
89
|
+
*/
|
|
90
|
+
isStaticItemHeight?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* @zh 元素高度是否是固定的。
|
|
93
|
+
* @en Is the element height fixed.
|
|
94
|
+
* @version 2.34.1
|
|
95
|
+
*/
|
|
96
|
+
fixedSize?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* @zh 元素高度不固定时的预估高度。
|
|
99
|
+
* @en Is the element height fixed.
|
|
100
|
+
* @version 2.34.1
|
|
101
|
+
*/
|
|
102
|
+
estimatedSize?: number;
|
|
103
|
+
/**
|
|
104
|
+
* @zh 视口边界外提前挂载的元素数量。
|
|
105
|
+
* @en The number of elements mounted in advance outside the boundary of the viewport.
|
|
106
|
+
* @defaultValue 10
|
|
107
|
+
* @version 2.34.1
|
|
108
|
+
*/
|
|
109
|
+
buffer?: number;
|
|
110
|
+
data?: unknown[];
|
|
111
|
+
itemKey?: string;
|
|
112
|
+
component?: keyof HTMLElementTagNameMap;
|
|
113
|
+
/** 使用库内滚动条;独立 VirtualList 默认 false,Select 会传入自己的配置。 */
|
|
114
|
+
scrollbar?: boolean | ScrollbarProps;
|
|
115
|
+
/** 数据重排/展开时保持像素位置;调用方可按稳定 key 恢复更精确的锚点。 */
|
|
116
|
+
preserveScroll?: boolean;
|
|
117
|
+
/** 仅 fixedSize 生效;传入数组启用定位行,指定键在视口外仍保持同一 DOM。 */
|
|
118
|
+
pinnedKeys?: VirtualItemKey[];
|
|
119
|
+
listAttrs?: Record<string, unknown>;
|
|
120
|
+
contentAttrs?: Record<string, unknown>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
type ScrollOptions = number | {
|
|
124
|
+
index?: number;
|
|
125
|
+
key?: VirtualItemKey;
|
|
126
|
+
align?: 'auto' | 'top' | 'bottom';
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
interface VirtualListRef {
|
|
130
|
+
scrollTo: (options: ScrollOptions) => void;
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
返回 [VirtualList 用法](./virtual-list.md)。
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
|
+
# VirtualList AI 使用
|
|
3
|
+
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
|
+
|
|
6
|
+
先读 [通用接入](../core.md)。公开导出:`VirtualList`;主要模型:无。完整 Props、Events、Slots、实例方法与服务签名见 [本地 API](./virtual-list-api.md),包含本组件族全部子组件和别名。
|
|
7
|
+
|
|
8
|
+
按需样式:`x-next/style/scrollbar-v2`(包含 base.css、scrollbar-v2.css)。代码块未单独引样式时在应用入口加载全量样式,或按实际所有组件加载 JS 入口;不要仅因复制一个组件页就漏掉其中的 Button 等组合依赖。
|
|
9
|
+
|
|
10
|
+
## 场景用法
|
|
11
|
+
|
|
12
|
+
以下示例从本地 `script/ai-usage/pages/virtual-list.md` 显式导入到独立 AI 源,补齐局部注册、状态和样式后进行严格模板检查。上方已核验行为优先;原始 prop 默认值、包装透传和示例业务适配分别查 [完整 API](./virtual-list-api.md) 与场景说明。类型通过不代表所有散文和交互已验证。
|
|
13
|
+
|
|
14
|
+
### 用途与边界
|
|
15
|
+
|
|
16
|
+
用于长列表的有界 DOM 渲染。`data` 为稳定键对象数组,`itemKey` 指定键属性;`#item` 提供 `item` 和完整数据的 `index`。组件不负责树层级、分页请求、权限或拖放业务。
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 固定高度与统一滚动条
|
|
20
|
+
|
|
21
|
+
`height` 为可视区高度;固定行需同时设置 `fixedSize` 与 `estimatedSize`,插槽自行保证行高。`buffer` 控制窗口,设置为至少视口行数的一半,渲染量约为其三倍。`scrollbar` 使用库内滚动条,可传 `{ disableHorizontal: true }`。
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { VirtualList } from 'x-next';
|
|
26
|
+
import 'x-next/style.css';
|
|
27
|
+
const rows = Array.from({ length: 10000 }, (_, index) => ({ key: `row-${index}`, title: `条目 ${index}` }));
|
|
28
|
+
</script>
|
|
29
|
+
<template>
|
|
30
|
+
<VirtualList :data="rows" :height="320" fixed-size :estimated-size="32" :buffer="12" :scrollbar="{ disableHorizontal: true }">
|
|
31
|
+
<template #item="{ item }"><div style="height: 32px">{{ item.title }}</div></template>
|
|
32
|
+
</VirtualList>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 数据更新与拖放组合
|
|
37
|
+
|
|
38
|
+
`preserveScroll` 在数据重排或展开后保留像素位置;默认 false,保持过滤列表回顶的既有行为。`pinnedKeys` 仅 fixedSize 有效,传入空数组即可启用固定位置布局;加入稳定键后,该行即使离开窗口仍保留同一个 DOM,可用于拖放源或当前键盘焦点。未传时保持原来的流式布局。
|
|
39
|
+
|
|
40
|
+
`contentAttrs`/`listAttrs` 分别作用于列表内容层/列表层。可通过业务自己的 id 配合 Draggable 的公开 target;不访问库内部类名。`rangeChange` 返回窗口的 start/end(不含保留行),业务索引必须基于完整 data。
|
|
41
|
+
|
|
42
|
+
```vue
|
|
43
|
+
<script setup lang="ts">
|
|
44
|
+
import { ref } from 'vue';
|
|
45
|
+
import { VirtualList } from 'x-next';
|
|
46
|
+
import type { VirtualListRef } from 'x-next';
|
|
47
|
+
import 'x-next/style.css';
|
|
48
|
+
const list = ref<VirtualListRef>();
|
|
49
|
+
const rows = Array.from({ length: 2000 }, (_, index) => ({ key: `row-${index}`, title: `条目 ${index}` }));
|
|
50
|
+
const pinned = ref<string[]>([]);
|
|
51
|
+
</script>
|
|
52
|
+
<template>
|
|
53
|
+
<button @click="list?.scrollTo({ key: 'row-1500', align: 'auto' })">定位到 1500</button>
|
|
54
|
+
<VirtualList ref="list" :data="rows" :height="320" fixed-size :estimated-size="32" :buffer="12"
|
|
55
|
+
preserve-scroll :pinned-keys="pinned" :scrollbar="true" :content-attrs="{ id: 'business-items', role: 'list' }">
|
|
56
|
+
<template #item="{ item }"><div role="listitem" style="height: 32px">{{ item.title }}</div></template>
|
|
57
|
+
</VirtualList>
|
|
58
|
+
</template>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
返回 [AI 索引](../index.md)。先查本页与 [本地 API](./virtual-list-api.md);需要更深类型时查 [公开组件导航](../catalog.md),不默认上网查找本包用法。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# Watermark 完整公开 API
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
从同版本构建的公开声明、运行时 props/emits 和显式 expose 生成。运行时导入始终使用 `x-next`,声明路径仅作定位。插槽类型未细化时,具体槽名与作用域见本地用法示例。
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# Watermark AI 使用
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
先读 [通用接入](../core.md)。公开导出:`Watermark`;主要模型:无。完整 Props、Events、Slots、实例方法与服务签名见 [本地 API](./watermark-api.md),包含本组件族全部子组件和别名。
|
|
7
7
|
|
package/AI_USAGE/core.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# x-next AI 通用接入
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
```sh
|
|
7
7
|
npm install x-next
|
package/AI_USAGE/index.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# x-next AI 按需入口
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
AI 专用资料,与文档站独立分发。先读 [core.md](./core.md),再只读本任务需要的组件页;各页含场景 SFC,完整 API 位于对应 `*-api.md`。全部公开组件与服务有本地导航,查本包用法优先包内文件,不默认网络搜索。
|
|
7
7
|
|
|
@@ -59,6 +59,7 @@ AI 专用资料,与文档站独立分发。先读 [core.md](./core.md),再
|
|
|
59
59
|
| Popup | [popup](./components/popup.md) | v-model:popup-visible | `x-next/style/popup` |
|
|
60
60
|
| ResizeBox | [resize-box](./components/resize-box.md) | v-model:width、v-model:height | `x-next/style/resize-box` |
|
|
61
61
|
| Scrollbar | [scrollbar](./components/scrollbar.md) | 无 | `x-next/style/scrollbar-v2` |
|
|
62
|
+
| VirtualList | [virtual-list](./components/virtual-list.md) | 无 | `x-next/style/scrollbar-v2` |
|
|
62
63
|
| Skeleton | [skeleton](./components/skeleton.md) | 无 | `x-next/style/skeleton` |
|
|
63
64
|
| Space | [space](./components/space.md) | 无 | `x-next/style/space` |
|
|
64
65
|
| Spin | [spin](./components/spin.md) | 无 | `x-next/style/spin` |
|
|
@@ -76,7 +77,7 @@ AI 专用资料,与文档站独立分发。先读 [core.md](./core.md),再
|
|
|
76
77
|
- [按需表单完整 SFC](./recipes/form-on-demand.md):Input + Textarea + Select + Checkbox + ConfigProvider。
|
|
77
78
|
- 编辑弹窗:读 Dialog、Form、Input、Select;列表查 Table,子组件和服务查 [公开导航](./catalog.md)。
|
|
78
79
|
- [图表选型](./components/charts.md)、[Boxicons](./components/boxicons.md)、[Finicon](./components/finicon.md)。
|
|
79
|
-
- [公开组件/服务导航](./catalog.md):
|
|
80
|
+
- [公开组件/服务导航](./catalog.md):60 个组件族、107 个公共导出,含本地 API 和声明。
|
|
80
81
|
- [完整兼容手册](../AI_USAGE.md):新任务不默认读取全文。
|
|
81
82
|
|
|
82
83
|
本地资料仍须配合严格类型、构建与真实浏览器验证;若查到缺口,反馈当前安装版本和具体 API,不套用其他库用法。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# 按需样式与表单接入
|
|
3
3
|
|
|
4
|
-
适用版本:x-next@1.
|
|
4
|
+
适用版本:x-next@1.19.0;来源指纹:`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
5
5
|
|
|
6
6
|
先读 [通用接入](../core.md),相关组件规则:[config-provider](../components/config-provider.md)、[input](../components/input.md)、[textarea](../components/textarea.md)、[select](../components/select.md)、[checkbox](../components/checkbox.md)。
|
|
7
7
|
|
package/AI_USAGE.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# x-next AI 使用手册
|
|
3
3
|
|
|
4
|
-
适用版本:**x-next@1.
|
|
4
|
+
适用版本:**x-next@1.19.0**。Vue:`^3.5.0`;Node:`>=20.19.0`。
|
|
5
5
|
|
|
6
|
-
来源指纹(AI 行为说明、docs 导入快照、映射、样式依赖、版本、公开类型和 API 参考):`
|
|
6
|
+
来源指纹(AI 行为说明、docs 导入快照、映射、样式依赖、版本、公开类型和 API 参考):`e5b7042cefff2ec3b2745b9e108e701ef2b629f5e959a26f03c1d74515160caa`。
|
|
7
7
|
|
|
8
|
-
覆盖
|
|
8
|
+
覆盖 60 个组件族与 107 个公开组件/服务导出。优先通过 [本地按需索引](./AI_USAGE/index.md) 读取组件页和 API,不为查本包用法默认搜索网络。
|
|
9
9
|
|
|
10
10
|
读取入口:`node_modules/x-next/AI_USAGE.md`;可用 `require.resolve('x-next/AI_USAGE.md')` 定位。消费项目应在自己的指令中明确引用。
|
|
11
11
|
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
| Popup | `Popup` | `<x-popup>` | `v-model:popup-visible` | `x-next/style/popup` | `popover.css`, `trigger.css` | [组件文档](https://x-next.yjmf.com/components/popup) |
|
|
64
64
|
| ResizeBox | `ResizeBox` | `<x-resize-box>` | `v-model:width`, `v-model:height` | `x-next/style/resize-box` | 无独立依赖 | [组件文档](https://x-next.yjmf.com/components/resize-box) |
|
|
65
65
|
| Scrollbar | `Scrollbar` | `<x-scrollbar>` | 无 | `x-next/style/scrollbar-v2` | 无独立依赖 | [组件文档](https://x-next.yjmf.com/components/scrollbar) |
|
|
66
|
+
| VirtualList | `VirtualList` | `<x-virtual-list>` | 无 | `x-next/style/scrollbar-v2` | 无独立依赖 | [组件文档](./AI_USAGE/components/virtual-list.md) |
|
|
66
67
|
| Skeleton | `Skeleton`, `SkeletonLine`, `SkeletonShape` | `<x-skeleton>` | 无 | `x-next/style/skeleton` | 无独立依赖 | [组件文档](https://x-next.yjmf.com/components/skeleton) |
|
|
67
68
|
| Space | `Space` | `<x-space>` | 无 | `x-next/style/space` | 无独立依赖 | [组件文档](https://x-next.yjmf.com/components/space) |
|
|
68
69
|
| Spin | `Spin` | `<x-spin>` | 无 | `x-next/style/spin` | 无独立依赖 | [组件文档](https://x-next.yjmf.com/components/spin) |
|
|
@@ -15860,6 +15861,55 @@ import { Scrollbar } from 'x-next';
|
|
|
15860
15861
|
</template>
|
|
15861
15862
|
```
|
|
15862
15863
|
|
|
15864
|
+
## VirtualList 扩展场景
|
|
15865
|
+
|
|
15866
|
+
### 用途与边界
|
|
15867
|
+
|
|
15868
|
+
用于长列表的有界 DOM 渲染。`data` 为稳定键对象数组,`itemKey` 指定键属性;`#item` 提供 `item` 和完整数据的 `index`。组件不负责树层级、分页请求、权限或拖放业务。
|
|
15869
|
+
|
|
15870
|
+
|
|
15871
|
+
### 固定高度与统一滚动条
|
|
15872
|
+
|
|
15873
|
+
`height` 为可视区高度;固定行需同时设置 `fixedSize` 与 `estimatedSize`,插槽自行保证行高。`buffer` 控制窗口,设置为至少视口行数的一半,渲染量约为其三倍。`scrollbar` 使用库内滚动条,可传 `{ disableHorizontal: true }`。
|
|
15874
|
+
|
|
15875
|
+
```vue
|
|
15876
|
+
<script setup lang="ts">
|
|
15877
|
+
import { VirtualList } from 'x-next';
|
|
15878
|
+
import 'x-next/style.css';
|
|
15879
|
+
const rows = Array.from({ length: 10000 }, (_, index) => ({ key: `row-${index}`, title: `条目 ${index}` }));
|
|
15880
|
+
</script>
|
|
15881
|
+
<template>
|
|
15882
|
+
<VirtualList :data="rows" :height="320" fixed-size :estimated-size="32" :buffer="12" :scrollbar="{ disableHorizontal: true }">
|
|
15883
|
+
<template #item="{ item }"><div style="height: 32px">{{ item.title }}</div></template>
|
|
15884
|
+
</VirtualList>
|
|
15885
|
+
</template>
|
|
15886
|
+
```
|
|
15887
|
+
|
|
15888
|
+
### 数据更新与拖放组合
|
|
15889
|
+
|
|
15890
|
+
`preserveScroll` 在数据重排或展开后保留像素位置;默认 false,保持过滤列表回顶的既有行为。`pinnedKeys` 仅 fixedSize 有效,传入空数组即可启用固定位置布局;加入稳定键后,该行即使离开窗口仍保留同一个 DOM,可用于拖放源或当前键盘焦点。未传时保持原来的流式布局。
|
|
15891
|
+
|
|
15892
|
+
`contentAttrs`/`listAttrs` 分别作用于列表内容层/列表层。可通过业务自己的 id 配合 Draggable 的公开 target;不访问库内部类名。`rangeChange` 返回窗口的 start/end(不含保留行),业务索引必须基于完整 data。
|
|
15893
|
+
|
|
15894
|
+
```vue
|
|
15895
|
+
<script setup lang="ts">
|
|
15896
|
+
import { ref } from 'vue';
|
|
15897
|
+
import { VirtualList } from 'x-next';
|
|
15898
|
+
import type { VirtualListRef } from 'x-next';
|
|
15899
|
+
import 'x-next/style.css';
|
|
15900
|
+
const list = ref<VirtualListRef>();
|
|
15901
|
+
const rows = Array.from({ length: 2000 }, (_, index) => ({ key: `row-${index}`, title: `条目 ${index}` }));
|
|
15902
|
+
const pinned = ref<string[]>([]);
|
|
15903
|
+
</script>
|
|
15904
|
+
<template>
|
|
15905
|
+
<button @click="list?.scrollTo({ key: 'row-1500', align: 'auto' })">定位到 1500</button>
|
|
15906
|
+
<VirtualList ref="list" :data="rows" :height="320" fixed-size :estimated-size="32" :buffer="12"
|
|
15907
|
+
preserve-scroll :pinned-keys="pinned" :scrollbar="true" :content-attrs="{ id: 'business-items', role: 'list' }">
|
|
15908
|
+
<template #item="{ item }"><div role="listitem" style="height: 32px">{{ item.title }}</div></template>
|
|
15909
|
+
</VirtualList>
|
|
15910
|
+
</template>
|
|
15911
|
+
```
|
|
15912
|
+
|
|
15863
15913
|
## Skeleton 扩展场景
|
|
15864
15914
|
|
|
15865
15915
|
### 用途与选型
|
|
@@ -36526,6 +36576,133 @@ interface UploadShowUploadButton {
|
|
|
36526
36576
|
```
|
|
36527
36577
|
|
|
36528
36578
|
|
|
36579
|
+
## VirtualList API
|
|
36580
|
+
|
|
36581
|
+
公开声明:`dist/components/virtual-list-v2/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
|
|
36582
|
+
|
|
36583
|
+
### Props
|
|
36584
|
+
|
|
36585
|
+
| 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
|
|
36586
|
+
| --- | --- | --- | --- | --- |
|
|
36587
|
+
| height | 视口高度,数字按 px,也支持 CSS 高度 | undefined | string | number | 否 | 200 |
|
|
36588
|
+
| data | 完整对象数组 | undefined | Record<string, any>[] | 否 | [] |
|
|
36589
|
+
| threshold | 数量小于等于阈值时完整渲染,默认 0 | undefined | number | 否 | 0 |
|
|
36590
|
+
| itemKey | 稳定键属性,默认 key | undefined | string | 否 | "key" |
|
|
36591
|
+
| fixedSize | 固定高度模式,默认 false | undefined | false | true | 否 | false |
|
|
36592
|
+
| estimatedSize | 固定或预估行高,默认 30 | undefined | number | 否 | 30 |
|
|
36593
|
+
| buffer | 缓冲行数,窗口约为三倍,默认 10 | undefined | number | 否 | 10 |
|
|
36594
|
+
| component | 见场景用法与类型 | undefined | string | { [x: string]: any; } | 否 | "div" |
|
|
36595
|
+
| listAttrs | 业务列表层属性 | undefined | { [x: string]: any; } | 否 | 未声明 |
|
|
36596
|
+
| contentAttrs | 业务内容层属性 | undefined | { [x: string]: any; } | 否 | 未声明 |
|
|
36597
|
+
| paddingPosition | 见场景用法与类型 | undefined | string | 否 | "content" |
|
|
36598
|
+
| scrollbar | 使用统一滚动条,默认 false | undefined | false | true | ScrollbarProps | 否 | false |
|
|
36599
|
+
| preserveScroll | 数据改变时保持滚动,默认 false | undefined | false | true | 否 | false |
|
|
36600
|
+
| pinnedKeys | 固定高度模式中保留挂载的稳定键;应只保留少量 | undefined | VirtualItemKey[] | 否 | undefined |
|
|
36601
|
+
|
|
36602
|
+
### Events
|
|
36603
|
+
|
|
36604
|
+
| 事件 | 用途 | 监听器签名(即事件参数) |
|
|
36605
|
+
| --- | --- | --- |
|
|
36606
|
+
| scroll | 实际滚动事件,event.target 为滚动节点 | undefined | (ev: Event) => any |
|
|
36607
|
+
| reachBottom | 滚动触底,不自动请求 | undefined | (ev: Event) => any |
|
|
36608
|
+
| rangeChange | 窗口 start/end,end 为开区间 | undefined | (range: { start: number; end: number; }) => any |
|
|
36609
|
+
|
|
36610
|
+
### Slots
|
|
36611
|
+
|
|
36612
|
+
公开类型未逐项声明插槽;本页场景说明列出实际使用的插槽,不将任意插槽视为已支持。
|
|
36613
|
+
|
|
36614
|
+
### 实例方法 / 暴露值
|
|
36615
|
+
|
|
36616
|
+
| 名称 | 公开类型 |
|
|
36617
|
+
| --- | --- |
|
|
36618
|
+
| scrollTo | (options: ScrollOptions) => void |
|
|
36619
|
+
| containerRef | any |
|
|
36620
|
+
| currentList | Record<string, any>[] |
|
|
36621
|
+
|
|
36622
|
+
### 关联类型定义
|
|
36623
|
+
|
|
36624
|
+
以下摘自本组件族声明,供查阅嵌套配置;运行时和值类型均以根入口可导出项为准。
|
|
36625
|
+
|
|
36626
|
+
```typescript-reference
|
|
36627
|
+
type VirtualItemKey = string | number;
|
|
36628
|
+
|
|
36629
|
+
interface InternalDataItem {
|
|
36630
|
+
key: VirtualItemKey;
|
|
36631
|
+
index: number;
|
|
36632
|
+
item: unknown;
|
|
36633
|
+
}
|
|
36634
|
+
|
|
36635
|
+
type ItemSlot = (props: {
|
|
36636
|
+
item: unknown;
|
|
36637
|
+
index: number;
|
|
36638
|
+
}) => VNode[];
|
|
36639
|
+
|
|
36640
|
+
interface ScrollIntoViewOptions {
|
|
36641
|
+
index?: number;
|
|
36642
|
+
key?: VirtualItemKey;
|
|
36643
|
+
align: 'auto' | 'top' | 'bottom';
|
|
36644
|
+
}
|
|
36645
|
+
|
|
36646
|
+
interface VirtualListProps {
|
|
36647
|
+
/**
|
|
36648
|
+
* @zh 可视区域高度
|
|
36649
|
+
* @en Viewable area height
|
|
36650
|
+
*/
|
|
36651
|
+
height?: number | string;
|
|
36652
|
+
/**
|
|
36653
|
+
* @zh 开启虚拟滚动的元素数量阈值,当数据数量小于阈值时不会开启虚拟滚动。
|
|
36654
|
+
* @en The threshold of the number of elements to enable virtual scrolling. When the number of data is less than the threshold, virtual scrolling will not be enabled.
|
|
36655
|
+
*/
|
|
36656
|
+
threshold?: number;
|
|
36657
|
+
/**
|
|
36658
|
+
* @zh (已废除)元素高度是否是固定的。2.34.1 版本废除,请使用 `fixedSize`
|
|
36659
|
+
* @en (Repealed) Is the element height fixed. Version 2.18.0 deprecated, please use `fixedSize`
|
|
36660
|
+
*/
|
|
36661
|
+
isStaticItemHeight?: boolean;
|
|
36662
|
+
/**
|
|
36663
|
+
* @zh 元素高度是否是固定的。
|
|
36664
|
+
* @en Is the element height fixed.
|
|
36665
|
+
* @version 2.34.1
|
|
36666
|
+
*/
|
|
36667
|
+
fixedSize?: boolean;
|
|
36668
|
+
/**
|
|
36669
|
+
* @zh 元素高度不固定时的预估高度。
|
|
36670
|
+
* @en Is the element height fixed.
|
|
36671
|
+
* @version 2.34.1
|
|
36672
|
+
*/
|
|
36673
|
+
estimatedSize?: number;
|
|
36674
|
+
/**
|
|
36675
|
+
* @zh 视口边界外提前挂载的元素数量。
|
|
36676
|
+
* @en The number of elements mounted in advance outside the boundary of the viewport.
|
|
36677
|
+
* @defaultValue 10
|
|
36678
|
+
* @version 2.34.1
|
|
36679
|
+
*/
|
|
36680
|
+
buffer?: number;
|
|
36681
|
+
data?: unknown[];
|
|
36682
|
+
itemKey?: string;
|
|
36683
|
+
component?: keyof HTMLElementTagNameMap;
|
|
36684
|
+
/** 使用库内滚动条;独立 VirtualList 默认 false,Select 会传入自己的配置。 */
|
|
36685
|
+
scrollbar?: boolean | ScrollbarProps;
|
|
36686
|
+
/** 数据重排/展开时保持像素位置;调用方可按稳定 key 恢复更精确的锚点。 */
|
|
36687
|
+
preserveScroll?: boolean;
|
|
36688
|
+
/** 仅 fixedSize 生效;传入数组启用定位行,指定键在视口外仍保持同一 DOM。 */
|
|
36689
|
+
pinnedKeys?: VirtualItemKey[];
|
|
36690
|
+
listAttrs?: Record<string, unknown>;
|
|
36691
|
+
contentAttrs?: Record<string, unknown>;
|
|
36692
|
+
}
|
|
36693
|
+
|
|
36694
|
+
type ScrollOptions = number | {
|
|
36695
|
+
index?: number;
|
|
36696
|
+
key?: VirtualItemKey;
|
|
36697
|
+
align?: 'auto' | 'top' | 'bottom';
|
|
36698
|
+
};
|
|
36699
|
+
|
|
36700
|
+
interface VirtualListRef {
|
|
36701
|
+
scrollTo: (options: ScrollOptions) => void;
|
|
36702
|
+
}
|
|
36703
|
+
```
|
|
36704
|
+
|
|
36705
|
+
|
|
36529
36706
|
## Watermark API
|
|
36530
36707
|
|
|
36531
36708
|
公开声明:`dist/components/watermark/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.19.0] - 2026-10-23
|
|
8
|
+
|
|
9
|
+
### 新增
|
|
10
|
+
|
|
11
|
+
- 公开 VirtualList 组件、全局注册和相关类型,支持通过根入口导入,补齐 Volar 与独立 AI 使用说明。
|
|
12
|
+
- VirtualList 新增 `preserveScroll`、固定高度 `pinnedKeys` 保留行和 `rangeChange`,支持数据重排保持滚动、拖动源离开窗口仍保留 DOM,以及按索引或键定位。
|
|
13
|
+
|
|
14
|
+
### 修复
|
|
15
|
+
|
|
16
|
+
- ResizeBox 受控鼠标拖动与键盘使用一致的尺寸起点,避免重复扣除手柄占位;禁用方向时移除残留占位,鼠标抓杆后可继续使用键盘。
|
|
17
|
+
- VirtualList 缺失键定位保持原滚动位置,补齐 `scrollTo` 的底部和自动可见对齐,保留 Table 依赖的实例集成能力。
|
|
18
|
+
|
|
19
|
+
### 维护
|
|
20
|
+
|
|
21
|
+
- AI 文档导入支持独立 AI 源页面,同步生成手册、按需索引与完整 API;继续按现有只读 CI 和预打包策略追踪生成结果。
|
|
22
|
+
- 更新 Vite 和 Vitest 同主版本安全补丁,移除开发工具链的已知可修复漏洞。
|
|
23
|
+
|
|
24
|
+
## [1.18.2] - 2026-10-17
|
|
25
|
+
|
|
26
|
+
### 文档
|
|
27
|
+
|
|
28
|
+
- 重新组织 README,加入品牌 Logo、产品口号、版本徽章与文档导航,突出产品定位与核心能力。
|
|
29
|
+
- 将组件长清单整理为分类导航,移除可选图标集的单独介绍,精简接入与维护细节。
|
|
30
|
+
- 更新按需样式、完整引入和局部主题示例,保留 AI 辅助开发与贡献入口。
|
|
31
|
+
|
|
32
|
+
### 维护
|
|
33
|
+
|
|
34
|
+
- 依据 npmjs 已发布的 1.18.1 产物校准主入口体积预算,运行产物保持一致,保留组件预算和图标泄漏检查。
|
|
35
|
+
|
|
7
36
|
## [1.18.1] - 2026-10-15
|
|
8
37
|
|
|
9
38
|
### 修复
|