@robot-admin/naive-ui-components 0.34.0 → 0.36.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/CHANGELOG.md +17 -0
- package/README.md +11 -7
- package/README_EN.md +11 -7
- package/THIRD_PARTY_NOTICES.md +10 -1
- package/dist/C_DataPicker.cjs +1 -1
- package/dist/C_DataPicker.css +63 -48
- package/dist/C_DataPicker.d.cts +3 -2
- package/dist/C_DataPicker.d.ts +3 -2
- package/dist/C_DataPicker.js +1 -1
- package/dist/C_DataPicker2.cjs +1 -0
- package/dist/C_DataPicker2.js +1 -0
- package/dist/C_Date.d.cts +1 -1
- package/dist/C_Date.d.ts +1 -1
- package/dist/C_Form.d.ts +1 -1
- package/dist/C_FormModal.d.ts +1 -1
- package/dist/C_Select.d.cts +1 -1
- package/dist/C_Select.d.ts +1 -1
- package/dist/C_Table.base.css +112 -110
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +112 -110
- package/dist/C_Table.d.cts +2 -2
- package/dist/C_Table.d.ts +6 -3
- package/dist/C_Table.js +1 -1
- package/dist/C_Table2.cjs +4 -4
- package/dist/C_Table2.js +4 -4
- package/dist/C_Tree.d.cts +2 -1
- package/dist/C_Tree.d.ts +5 -2
- package/dist/C_UserPicker.cjs +1 -0
- package/dist/C_UserPicker.css +75 -0
- package/dist/C_UserPicker.d.cts +3 -0
- package/dist/C_UserPicker.d.ts +7 -0
- package/dist/C_UserPicker.js +1 -0
- package/dist/C_WorkFlow.css +635 -355
- package/dist/C_WorkFlow.d.cts +2 -2
- package/dist/C_WorkFlow.d.ts +7 -2
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/NodeConfigModal.cjs +1 -0
- package/dist/NodeConfigModal.js +1 -0
- package/dist/conditions.cjs +1 -0
- package/dist/conditions.js +1 -0
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants3.d.cts +1 -1
- package/dist/constants3.d.ts +1 -1
- package/dist/constants4.d.cts +4 -4
- package/dist/constants4.d.ts +4 -4
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data2.d.cts +5 -5
- package/dist/data2.d.ts +5 -5
- package/dist/editors.d.cts +15 -234
- package/dist/editors.d.ts +15 -234
- package/dist/formField.cjs +1 -1
- package/dist/formField.d.cts +7 -1190
- package/dist/formField.d.ts +7 -1190
- package/dist/formField.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -9
- package/dist/index.d.ts +13 -9
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +4 -4
- package/dist/index.vue.d.ts +4 -4
- package/dist/index10.vue.d.ts +3 -3
- package/dist/index11.vue.d.cts +3 -3
- package/dist/index11.vue.d.ts +3 -3
- package/dist/index12.vue.d.cts +3 -3
- package/dist/index13.vue.d.ts +2 -2
- package/dist/index14.vue.d.cts +2 -2
- package/dist/index16.vue.d.ts +5 -5
- package/dist/index17.vue.d.cts +5 -5
- package/dist/index17.vue.d.ts +6 -6
- package/dist/index18.vue.d.cts +6 -6
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index22.vue.d.cts +2 -2
- package/dist/index24.vue.d.cts +1 -1
- package/dist/index24.vue.d.ts +1 -1
- package/dist/index26.vue.d.cts +1 -1
- package/dist/index26.vue.d.ts +1 -1
- package/dist/index3.vue.d.cts +2 -2
- package/dist/index3.vue.d.ts +2 -2
- package/dist/index31.vue.d.cts +3 -3
- package/dist/index31.vue.d.ts +3 -3
- package/dist/index32.vue.d.cts +2 -2
- package/dist/index32.vue.d.ts +2 -2
- package/dist/index4.vue.d.cts +3 -3
- package/dist/index4.vue.d.ts +3 -3
- package/dist/index8.vue.d.ts +3 -3
- package/dist/index9.vue.d.cts +3 -3
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.d.cts +1 -1
- package/dist/resolver.d.ts +1 -1
- package/dist/resolver.js +1 -1
- package/dist/source.cjs +1 -0
- package/dist/source.d.cts +37 -0
- package/dist/source.d.ts +37 -0
- package/dist/source.js +1 -0
- package/dist/style.css +886 -512
- package/dist/types3.d.ts +1223 -53
- package/dist/types4.d.cts +1223 -53
- package/dist/types4.d.ts +55 -45
- package/dist/types5.d.cts +55 -45
- package/dist/types5.d.ts +50 -0
- package/dist/types6.d.cts +50 -0
- package/dist/types6.d.ts +284 -0
- package/dist/types7.d.cts +284 -0
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +3 -3
- package/dist/useCollapsePanel.d.ts +3 -3
- package/dist/useComponentLocale.cjs +1 -1
- package/dist/useComponentLocale.js +1 -1
- package/dist/useCropperCore.d.cts +6 -6
- package/dist/useCropperCore.d.ts +6 -6
- package/dist/useDynamicFormState.d.cts +1 -1
- package/dist/useDynamicFormState.d.ts +1 -1
- package/dist/useEdgeInteraction.d.cts +2 -2
- package/dist/useEdgeInteraction.d.ts +2 -2
- package/dist/useFullscreen.d.cts +2 -2
- package/dist/useFullscreen.d.ts +2 -2
- package/dist/useInfiniteScroll.d.cts +3 -3
- package/dist/useInfiniteScroll.d.ts +3 -3
- package/dist/useQRCode.d.cts +4 -4
- package/dist/useQRCode.d.ts +4 -4
- package/dist/useSignatureHistory.d.cts +4 -4
- package/dist/useSignatureHistory.d.ts +4 -4
- package/dist/useSplitResize.d.cts +7 -7
- package/dist/useSplitResize.d.ts +7 -7
- package/dist/useWorkflowValidation.d.cts +165 -43
- package/dist/useWorkflowValidation.d.ts +165 -43
- package/dist/verification.d.cts +3 -3
- package/dist/verification.d.ts +3 -3
- package/docs/components.en.md +8 -7
- package/docs/components.md +8 -7
- package/docs/guides/table-density.md +7 -7
- package/docs/guides/user-picker.md +124 -0
- package/docs/guides/workflow-people.md +60 -0
- package/docs/guides/workflow.md +153 -0
- package/docs/people-workflow-review-20261114.md +75 -0
- package/licenses/VueFlow.txt +20 -0
- package/package.json +1 -1
package/dist/constants4.d.cts
CHANGED
|
@@ -198,16 +198,16 @@ type __VLS_Slots = {} & {
|
|
|
198
198
|
area?: (props: typeof __VLS_11) => any;
|
|
199
199
|
};
|
|
200
200
|
declare const __VLS_base: vue.DefineComponent<UploadProps, UploadExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
201
|
-
success: (file: UploadFileItem, response: unknown) => any;
|
|
202
201
|
change: (fileList: UploadFileItem[]) => any;
|
|
202
|
+
success: (file: UploadFileItem, response: unknown) => any;
|
|
203
203
|
error: (file: UploadFileItem, error: Error) => any;
|
|
204
204
|
progress: (file: UploadFileItem, percent: number) => any;
|
|
205
205
|
remove: (file: UploadFileItem) => any;
|
|
206
206
|
finish: (fileList: UploadFileItem[]) => any;
|
|
207
207
|
exceed: (files: File[], fileList: UploadFileItem[]) => any;
|
|
208
208
|
}, string, vue.PublicProps, Readonly<UploadProps> & Readonly<{
|
|
209
|
-
onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
|
|
210
209
|
onChange?: ((fileList: UploadFileItem[]) => any) | undefined;
|
|
210
|
+
onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
|
|
211
211
|
onError?: ((file: UploadFileItem, error: Error) => any) | undefined;
|
|
212
212
|
onProgress?: ((file: UploadFileItem, percent: number) => any) | undefined;
|
|
213
213
|
onRemove?: ((file: UploadFileItem) => any) | undefined;
|
|
@@ -217,13 +217,13 @@ declare const __VLS_base: vue.DefineComponent<UploadProps, UploadExpose, {}, {},
|
|
|
217
217
|
data: Record<string, unknown>;
|
|
218
218
|
disabled: boolean;
|
|
219
219
|
multiple: boolean;
|
|
220
|
-
maxSize: number;
|
|
221
|
-
draggable: boolean;
|
|
222
220
|
action: string;
|
|
223
221
|
headers: Record<string, string>;
|
|
224
222
|
directory: boolean;
|
|
225
223
|
accept: string;
|
|
224
|
+
maxSize: number;
|
|
226
225
|
maxCount: number;
|
|
226
|
+
draggable: boolean;
|
|
227
227
|
pasteable: boolean;
|
|
228
228
|
chunked: boolean;
|
|
229
229
|
chunkSize: number;
|
package/dist/constants4.d.ts
CHANGED
|
@@ -198,16 +198,16 @@ type __VLS_Slots = {} & {
|
|
|
198
198
|
area?: (props: typeof __VLS_11) => any;
|
|
199
199
|
};
|
|
200
200
|
declare const __VLS_base: vue.DefineComponent<UploadProps, UploadExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
201
|
-
success: (file: UploadFileItem, response: unknown) => any;
|
|
202
201
|
change: (fileList: UploadFileItem[]) => any;
|
|
202
|
+
success: (file: UploadFileItem, response: unknown) => any;
|
|
203
203
|
error: (file: UploadFileItem, error: Error) => any;
|
|
204
204
|
progress: (file: UploadFileItem, percent: number) => any;
|
|
205
205
|
remove: (file: UploadFileItem) => any;
|
|
206
206
|
finish: (fileList: UploadFileItem[]) => any;
|
|
207
207
|
exceed: (files: File[], fileList: UploadFileItem[]) => any;
|
|
208
208
|
}, string, vue.PublicProps, Readonly<UploadProps> & Readonly<{
|
|
209
|
-
onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
|
|
210
209
|
onChange?: ((fileList: UploadFileItem[]) => any) | undefined;
|
|
210
|
+
onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
|
|
211
211
|
onError?: ((file: UploadFileItem, error: Error) => any) | undefined;
|
|
212
212
|
onProgress?: ((file: UploadFileItem, percent: number) => any) | undefined;
|
|
213
213
|
onRemove?: ((file: UploadFileItem) => any) | undefined;
|
|
@@ -217,13 +217,13 @@ declare const __VLS_base: vue.DefineComponent<UploadProps, UploadExpose, {}, {},
|
|
|
217
217
|
data: Record<string, unknown>;
|
|
218
218
|
disabled: boolean;
|
|
219
219
|
multiple: boolean;
|
|
220
|
-
maxSize: number;
|
|
221
|
-
draggable: boolean;
|
|
222
220
|
action: string;
|
|
223
221
|
headers: Record<string, string>;
|
|
224
222
|
directory: boolean;
|
|
225
223
|
accept: string;
|
|
224
|
+
maxSize: number;
|
|
226
225
|
maxCount: number;
|
|
226
|
+
draggable: boolean;
|
|
227
227
|
pasteable: boolean;
|
|
228
228
|
chunked: boolean;
|
|
229
229
|
chunkSize: number;
|
package/dist/constants5.d.cts
CHANGED
|
@@ -262,8 +262,8 @@ type PlayerInstance = InstanceType<typeof xgplayer.default>;
|
|
|
262
262
|
//#endregion
|
|
263
263
|
//#region src/components/C_VideoPlayer/index.vue.d.ts
|
|
264
264
|
declare const __VLS_export: vue.DefineComponent<VideoPlayerProps, VideoPlayerExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
265
|
-
error: (error: Error) => any;
|
|
266
265
|
ready: () => any;
|
|
266
|
+
error: (error: Error) => any;
|
|
267
267
|
ended: () => any;
|
|
268
268
|
stateChange: (state: PlayerState) => any;
|
|
269
269
|
qualityChange: (quality: QualityLevel) => any;
|
|
@@ -275,8 +275,8 @@ declare const __VLS_export: vue.DefineComponent<VideoPlayerProps, VideoPlayerExp
|
|
|
275
275
|
quizAnswer: (quizId: string, answer: string | string[], isCorrect: boolean) => any;
|
|
276
276
|
timeUpdate: (currentTime: number, duration: number) => any;
|
|
277
277
|
}, string, vue.PublicProps, Readonly<VideoPlayerProps> & Readonly<{
|
|
278
|
-
onError?: ((error: Error) => any) | undefined;
|
|
279
278
|
onReady?: (() => any) | undefined;
|
|
279
|
+
onError?: ((error: Error) => any) | undefined;
|
|
280
280
|
onEnded?: (() => any) | undefined;
|
|
281
281
|
onStateChange?: ((state: PlayerState) => any) | undefined;
|
|
282
282
|
onQualityChange?: ((quality: QualityLevel) => any) | undefined;
|
package/dist/constants5.d.ts
CHANGED
|
@@ -262,8 +262,8 @@ type PlayerInstance = InstanceType<typeof xgplayer.default>;
|
|
|
262
262
|
//#endregion
|
|
263
263
|
//#region src/components/C_VideoPlayer/index.vue.d.ts
|
|
264
264
|
declare const __VLS_export: vue.DefineComponent<VideoPlayerProps, VideoPlayerExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
265
|
-
error: (error: Error) => any;
|
|
266
265
|
ready: () => any;
|
|
266
|
+
error: (error: Error) => any;
|
|
267
267
|
ended: () => any;
|
|
268
268
|
stateChange: (state: PlayerState) => any;
|
|
269
269
|
qualityChange: (quality: QualityLevel) => any;
|
|
@@ -275,8 +275,8 @@ declare const __VLS_export: vue.DefineComponent<VideoPlayerProps, VideoPlayerExp
|
|
|
275
275
|
quizAnswer: (quizId: string, answer: string | string[], isCorrect: boolean) => any;
|
|
276
276
|
timeUpdate: (currentTime: number, duration: number) => any;
|
|
277
277
|
}, string, vue.PublicProps, Readonly<VideoPlayerProps> & Readonly<{
|
|
278
|
-
onError?: ((error: Error) => any) | undefined;
|
|
279
278
|
onReady?: (() => any) | undefined;
|
|
279
|
+
onError?: ((error: Error) => any) | undefined;
|
|
280
280
|
onEnded?: (() => any) | undefined;
|
|
281
281
|
onStateChange?: ((state: PlayerState) => any) | undefined;
|
|
282
282
|
onQualityChange?: ((quality: QualityLevel) => any) | undefined;
|
package/dist/data2.d.cts
CHANGED
|
@@ -65,26 +65,26 @@ type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_37>]?: (props: typeof _
|
|
|
65
65
|
declare const __VLS_base: vue.DefineComponent<CTabsProps, {
|
|
66
66
|
activeValue: vue.WritableComputedRef<TabsValue | null, TabsValue | null>;
|
|
67
67
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
68
|
-
add: () => any;
|
|
69
68
|
"update:modelValue": (value: TabsValue) => any;
|
|
70
69
|
change: (value: TabsValue, item: TabsItem | undefined) => any;
|
|
70
|
+
add: () => any;
|
|
71
71
|
close: (value: TabsValue) => any;
|
|
72
72
|
}, string, vue.PublicProps, Readonly<CTabsProps> & Readonly<{
|
|
73
|
-
onAdd?: (() => any) | undefined;
|
|
74
73
|
"onUpdate:modelValue"?: ((value: TabsValue) => any) | undefined;
|
|
75
74
|
onChange?: ((value: TabsValue, item: TabsItem | undefined) => any) | undefined;
|
|
75
|
+
onAdd?: (() => any) | undefined;
|
|
76
76
|
onClose?: ((value: TabsValue) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
+
modelValue: TabsValue | null;
|
|
78
79
|
size: TabsSize;
|
|
80
|
+
items: readonly TabsItem[];
|
|
79
81
|
type: TabsType;
|
|
80
|
-
modelValue: TabsValue | null;
|
|
81
82
|
defaultValue: TabsValue | null;
|
|
82
83
|
placement: TabsPlacement;
|
|
83
84
|
displayDirective: TabsDisplayDirective;
|
|
84
|
-
items: readonly TabsItem[];
|
|
85
85
|
animated: boolean;
|
|
86
|
-
justifyContent: TabsJustifyContent;
|
|
87
86
|
closable: boolean;
|
|
87
|
+
justifyContent: TabsJustifyContent;
|
|
88
88
|
addable: boolean;
|
|
89
89
|
tabsOnly: boolean;
|
|
90
90
|
paneClass: string;
|
package/dist/data2.d.ts
CHANGED
|
@@ -65,26 +65,26 @@ type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_37>]?: (props: typeof _
|
|
|
65
65
|
declare const __VLS_base: vue.DefineComponent<CTabsProps, {
|
|
66
66
|
activeValue: vue.WritableComputedRef<TabsValue | null, TabsValue | null>;
|
|
67
67
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
68
|
-
add: () => any;
|
|
69
68
|
"update:modelValue": (value: TabsValue) => any;
|
|
70
69
|
change: (value: TabsValue, item: TabsItem | undefined) => any;
|
|
70
|
+
add: () => any;
|
|
71
71
|
close: (value: TabsValue) => any;
|
|
72
72
|
}, string, vue.PublicProps, Readonly<CTabsProps> & Readonly<{
|
|
73
|
-
onAdd?: (() => any) | undefined;
|
|
74
73
|
"onUpdate:modelValue"?: ((value: TabsValue) => any) | undefined;
|
|
75
74
|
onChange?: ((value: TabsValue, item: TabsItem | undefined) => any) | undefined;
|
|
75
|
+
onAdd?: (() => any) | undefined;
|
|
76
76
|
onClose?: ((value: TabsValue) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
+
modelValue: TabsValue | null;
|
|
78
79
|
size: TabsSize;
|
|
80
|
+
items: readonly TabsItem[];
|
|
79
81
|
type: TabsType;
|
|
80
|
-
modelValue: TabsValue | null;
|
|
81
82
|
defaultValue: TabsValue | null;
|
|
82
83
|
placement: TabsPlacement;
|
|
83
84
|
displayDirective: TabsDisplayDirective;
|
|
84
|
-
items: readonly TabsItem[];
|
|
85
85
|
animated: boolean;
|
|
86
|
-
justifyContent: TabsJustifyContent;
|
|
87
86
|
closable: boolean;
|
|
87
|
+
justifyContent: TabsJustifyContent;
|
|
88
88
|
addable: boolean;
|
|
89
89
|
tabsOnly: boolean;
|
|
90
90
|
paneClass: string;
|
package/dist/editors.d.cts
CHANGED
|
@@ -2,11 +2,12 @@ import { i as OptionValue, r as OptionSource } from "./optionSource.cjs";
|
|
|
2
2
|
import { n as ResolvedComponentDensity, t as ComponentDensity } from "./density.cjs";
|
|
3
3
|
import { n as ComponentLocale, t as ComponentFeedback } from "./contracts.cjs";
|
|
4
4
|
import { n as AutoCompleteProps$1, t as AutoCompleteOptionItem } from "./types2.cjs";
|
|
5
|
-
import { $ as
|
|
6
|
-
import { a as SelectProps$1, o as SelectSelection, r as SelectOptionItem, s as SelectValue, t as SelectModelValue } from "./
|
|
5
|
+
import { $ as SelectionConfig, B as TableRuntimeProps, D as ParentChildLinkMode, E as PaginationConfig, Et as DynamicRowsReturn, F as TableInstance, G as BatchActionsConfig, H as UseTableActionsReturn, J as DisplayConfig, K as ColumnDragConfig, M as StrictTableColumn, N as TableColumn, Q as ResolvedConfig, R as TableRowKey, Tt as DynamicRowsOptions, U as UseTableExpandOptions, V as UseTableActionsOptions, W as UseTableExpandReturn, X as ErrorConfig, Y as EditConfig, Z as ExpandConfig, _t as CrossPageSelectionConfig, b as EditMode, et as SummaryConfig, it as VirtualScrollConfig, j as SimpleTableActions, nt as ToolbarConfig, rt as TreeConfig, st as ExportConfig, tt as TableConfig, ut as FormatterConfig, xt as RowDragConfig, y as DataRecord, z as TableRowKeyIssue } from "./types4.cjs";
|
|
6
|
+
import { a as SelectProps$1, o as SelectSelection, r as SelectOptionItem, s as SelectValue, t as SelectModelValue } from "./types6.cjs";
|
|
7
|
+
import { E as TreeRenderContext, O as TreeSlots, T as TreeProps$1, _ as TreeExpose, f as DropInfo, g as TreeEmits, k as TreeUpdateMeta, p as IconConfig, u as ActionConfig, v as TreeKey, x as TreeNodeData, y as TreeMode } from "./types7.cjs";
|
|
7
8
|
import * as vue from "vue";
|
|
8
9
|
import { App, ComputedRef, MaybeRefOrGetter, Ref, VNodeChild } from "vue";
|
|
9
|
-
import { DataTableColumn, DataTableRowKey, PaginationProps, TreeInst,
|
|
10
|
+
import { DataTableColumn, DataTableRowKey, PaginationProps, TreeInst, TreeProps } from "naive-ui";
|
|
10
11
|
import { HLJSApi } from "highlight.js";
|
|
11
12
|
|
|
12
13
|
//#region src/composables/useComponentLocale.d.ts
|
|
@@ -116,6 +117,12 @@ interface UseTableColumnsOptions {
|
|
|
116
117
|
columnWidth: number;
|
|
117
118
|
/** 区分使用侧显式统一列宽与内部默认值,不把默认值强加给弹性业务列。 */
|
|
118
119
|
columnWidthExplicit?: boolean;
|
|
120
|
+
/** body 可用宽用于分配;外宽用于区分容器变化与滚动条 gutter。 */
|
|
121
|
+
viewportWidth?: Readonly<Ref<{
|
|
122
|
+
width: number;
|
|
123
|
+
outerWidth: number;
|
|
124
|
+
}>>;
|
|
125
|
+
nativeLayout?: () => boolean;
|
|
119
126
|
/** 用户设定的 scrollX */
|
|
120
127
|
scrollX?: number | string;
|
|
121
128
|
/** 行键获取函数 */
|
|
@@ -542,242 +549,16 @@ declare function useHighlight(options?: HighlightPluginOptions): HighlightAPI;
|
|
|
542
549
|
*/
|
|
543
550
|
declare function setupHighlight(app: App, options?: HighlightPluginOptions): HighlightAPI;
|
|
544
551
|
//#endregion
|
|
545
|
-
//#region src/components/C_Tree/types.d.ts
|
|
546
|
-
type TreeKey = string | number;
|
|
547
|
-
type TreeMode = 'menu' | 'file' | 'org' | 'custom';
|
|
548
|
-
type StatusType = 'success' | 'warning' | 'error' | 'info';
|
|
549
|
-
type ButtonType = 'primary' | 'info' | 'warning' | 'error' | 'default';
|
|
550
|
-
/** Custom fields are allowed; keyField/labelField select the actual identity and label. */
|
|
551
|
-
interface TreeOption$1 extends TreeOption {
|
|
552
|
-
id?: TreeKey;
|
|
553
|
-
children?: TreeOption$1[];
|
|
554
|
-
}
|
|
555
|
-
interface TreeNodeData extends TreeOption$1 {
|
|
556
|
-
name?: string;
|
|
557
|
-
type?: string;
|
|
558
|
-
children?: TreeNodeData[];
|
|
559
|
-
}
|
|
560
|
-
interface DropInfo<T extends object = TreeOption$1> {
|
|
561
|
-
node: T;
|
|
562
|
-
dragNode: T;
|
|
563
|
-
dropPosition: 'before' | 'inside' | 'after';
|
|
564
|
-
event: DragEvent;
|
|
565
|
-
}
|
|
566
|
-
interface StatusConfig {
|
|
567
|
-
field: string;
|
|
568
|
-
values: Record<string | number, {
|
|
569
|
-
text: string;
|
|
570
|
-
type: StatusType;
|
|
571
|
-
}>;
|
|
572
|
-
}
|
|
573
|
-
interface ActionConfig<T extends object = TreeNodeData> {
|
|
574
|
-
key: string;
|
|
575
|
-
text: string;
|
|
576
|
-
icon: string;
|
|
577
|
-
type?: ButtonType;
|
|
578
|
-
show?: (node: T) => boolean;
|
|
579
|
-
disabled?: boolean | ((node: T) => boolean);
|
|
580
|
-
loading?: boolean | ((node: T) => boolean);
|
|
581
|
-
confirm?: string;
|
|
582
|
-
}
|
|
583
|
-
interface TreeNodeIcon {
|
|
584
|
-
name: string;
|
|
585
|
-
size?: number | string;
|
|
586
|
-
color?: string;
|
|
587
|
-
}
|
|
588
|
-
interface IconConfig<T extends object = TreeNodeData> {
|
|
589
|
-
default?: string;
|
|
590
|
-
typeMap?: Record<string, string>;
|
|
591
|
-
colorMap?: Record<string, string>;
|
|
592
|
-
/** null 隐藏图标;undefined 继续使用 iconField/typeMap/default。 */
|
|
593
|
-
resolve?: (context: TreeNodeRenderContext<T>) => string | TreeNodeIcon | null | undefined;
|
|
594
|
-
}
|
|
595
|
-
/** 路径按根节点到命中节点排列;路径不代表各级的完整子项列表。 */
|
|
596
|
-
interface TreeSearchSource<T extends object = TreeNodeData> {
|
|
597
|
-
request: (context: {
|
|
598
|
-
search: string;
|
|
599
|
-
signal: AbortSignal;
|
|
600
|
-
limit: number;
|
|
601
|
-
}) => Promise<readonly (readonly T[])[]>;
|
|
602
|
-
/** 根据唯一键恢复一个尚未加载的节点及其祖先。 */
|
|
603
|
-
resolve?: (key: TreeKey, signal: AbortSignal) => Promise<readonly T[] | null>;
|
|
604
|
-
/** 返回该节点的完整直接子项;与搜索补入的部分路径严格区分。 */
|
|
605
|
-
load?: (node: T, context: {
|
|
606
|
-
signal: AbortSignal;
|
|
607
|
-
}) => Promise<readonly T[]>;
|
|
608
|
-
debounce?: number;
|
|
609
|
-
minChars?: number;
|
|
610
|
-
limit?: number;
|
|
611
|
-
/** 身份或业务范围改变时取消旧请求并丢弃远程覆盖层。 */
|
|
612
|
-
scope?: string | number;
|
|
613
|
-
}
|
|
614
|
-
type MaybeArray<T> = T | T[];
|
|
615
|
-
type TreeUpdateHandler<T extends object, A extends TreeUpdateMeta['action']> = (keys: TreeKey[], options: Array<T | null>, meta: TreeUpdateMeta<T, A>) => void;
|
|
616
|
-
type TreeDragHandler<T extends object> = (info: {
|
|
617
|
-
node: T;
|
|
618
|
-
event: DragEvent;
|
|
619
|
-
}) => void;
|
|
620
|
-
/** 原生功能保持透传,涉及节点的回调由数据源推导业务类型。 */
|
|
621
|
-
type TreeNativeProps<T extends object = TreeNodeData> = Omit<TreeProps, 'data' | 'filter' | 'onLoad' | 'getChildren' | 'renderLabel' | 'renderPrefix' | 'renderSuffix' | 'renderSwitcherIcon' | 'nodeProps' | 'allowDrop' | 'checkOnClick' | 'overrideDefaultNodeClickBehavior' | 'onDrop' | 'onDragenter' | 'onDragleave' | 'onDragend' | 'onDragstart' | 'onDragover' | 'onUpdateExpandedKeys' | 'onUpdate:expandedKeys' | 'onUpdateSelectedKeys' | 'onUpdate:selectedKeys' | 'onUpdateCheckedKeys' | 'onUpdate:checkedKeys' | 'onUpdateIndeterminateKeys' | 'onUpdate:indeterminateKeys'> & {
|
|
622
|
-
filter?: (pattern: string, node: T) => boolean;
|
|
623
|
-
onLoad?: (node: T) => Promise<unknown>;
|
|
624
|
-
getChildren?: (node: T) => unknown;
|
|
625
|
-
renderLabel?: (context: TreeNodeRenderContext<T>) => VNodeChild;
|
|
626
|
-
renderPrefix?: (context: TreeNodeRenderContext<T>) => VNodeChild;
|
|
627
|
-
renderSuffix?: (context: TreeNodeRenderContext<T>) => VNodeChild;
|
|
628
|
-
renderSwitcherIcon?: (context: {
|
|
629
|
-
expanded: boolean;
|
|
630
|
-
selected: boolean;
|
|
631
|
-
option: T;
|
|
632
|
-
}) => VNodeChild;
|
|
633
|
-
nodeProps?: (context: {
|
|
634
|
-
option: T;
|
|
635
|
-
}) => ReturnType<NonNullable<TreeProps['nodeProps']>>;
|
|
636
|
-
allowDrop?: (info: {
|
|
637
|
-
dropPosition: DropInfo['dropPosition'];
|
|
638
|
-
node: T;
|
|
639
|
-
phase: 'drag' | 'drop';
|
|
640
|
-
}) => boolean;
|
|
641
|
-
checkOnClick?: boolean | ((node: T) => boolean);
|
|
642
|
-
overrideDefaultNodeClickBehavior?: (info: {
|
|
643
|
-
option: T;
|
|
644
|
-
}) => ReturnType<NonNullable<TreeProps['overrideDefaultNodeClickBehavior']>>;
|
|
645
|
-
onDrop?: MaybeArray<(info: DropInfo<T>) => void>;
|
|
646
|
-
onDragenter?: MaybeArray<TreeDragHandler<T>>;
|
|
647
|
-
onDragleave?: MaybeArray<TreeDragHandler<T>>;
|
|
648
|
-
onDragend?: MaybeArray<TreeDragHandler<T>>;
|
|
649
|
-
onDragstart?: MaybeArray<TreeDragHandler<T>>;
|
|
650
|
-
onDragover?: MaybeArray<TreeDragHandler<T>>;
|
|
651
|
-
onUpdateExpandedKeys?: MaybeArray<TreeUpdateHandler<T, 'expand' | 'collapse' | 'filter'>>;
|
|
652
|
-
'onUpdate:expandedKeys'?: MaybeArray<TreeUpdateHandler<T, 'expand' | 'collapse' | 'filter'>>;
|
|
653
|
-
onUpdateSelectedKeys?: MaybeArray<TreeUpdateHandler<T, 'select' | 'unselect'>>;
|
|
654
|
-
'onUpdate:selectedKeys'?: MaybeArray<TreeUpdateHandler<T, 'select' | 'unselect'>>;
|
|
655
|
-
onUpdateCheckedKeys?: MaybeArray<TreeUpdateHandler<T, 'check' | 'uncheck'>>;
|
|
656
|
-
'onUpdate:checkedKeys'?: MaybeArray<TreeUpdateHandler<T, 'check' | 'uncheck'>>;
|
|
657
|
-
onUpdateIndeterminateKeys?: MaybeArray<(keys: TreeKey[], options: Array<T | null>) => void>;
|
|
658
|
-
'onUpdate:indeterminateKeys'?: MaybeArray<(keys: TreeKey[], options: Array<T | null>) => void>;
|
|
659
|
-
};
|
|
660
|
-
interface TreeRenderContext<T extends object = TreeOption$1> {
|
|
661
|
-
option: T;
|
|
662
|
-
checked: boolean;
|
|
663
|
-
selected: boolean;
|
|
664
|
-
}
|
|
665
|
-
/** 包装层提供的节点状态;旧 TreeRenderContext 的三字段构造继续兼容。 */
|
|
666
|
-
interface TreeNodeRenderContext<T extends object = TreeOption$1> extends TreeRenderContext<T> {
|
|
667
|
-
expanded: boolean;
|
|
668
|
-
isLeaf: boolean;
|
|
669
|
-
loading: boolean;
|
|
670
|
-
}
|
|
671
|
-
interface TreeUpdateMeta<T extends object = TreeOption$1, A extends 'select' | 'unselect' | 'check' | 'uncheck' | 'expand' | 'collapse' | 'filter' = 'select' | 'unselect' | 'check' | 'uncheck' | 'expand' | 'collapse' | 'filter'> {
|
|
672
|
-
node: T | null;
|
|
673
|
-
action: A;
|
|
674
|
-
}
|
|
675
|
-
interface TreeProps$1<T extends object = TreeNodeData> {
|
|
676
|
-
/** Business interfaces need no string index signature; fields are selected by config. */
|
|
677
|
-
data: readonly T[];
|
|
678
|
-
mode?: TreeMode;
|
|
679
|
-
/** Native tree capabilities; explicit wrapper props have priority. */
|
|
680
|
-
treeProps?: TreeNativeProps<T>;
|
|
681
|
-
density?: ComponentDensity;
|
|
682
|
-
keyField?: string;
|
|
683
|
-
labelField?: string;
|
|
684
|
-
childrenField?: string;
|
|
685
|
-
searchPattern?: string;
|
|
686
|
-
searchable?: boolean;
|
|
687
|
-
searchPlaceholder?: string;
|
|
688
|
-
searchSource?: TreeSearchSource<T>;
|
|
689
|
-
/** 常用原生能力可直接配置;未传时继续使用 treeProps 和原生默认值。 */
|
|
690
|
-
checkable?: boolean;
|
|
691
|
-
multiple?: boolean;
|
|
692
|
-
cascade?: boolean;
|
|
693
|
-
checkStrategy?: TreeProps['checkStrategy'];
|
|
694
|
-
selectable?: boolean;
|
|
695
|
-
disabled?: boolean;
|
|
696
|
-
virtualScroll?: boolean;
|
|
697
|
-
accordion?: boolean;
|
|
698
|
-
expandOnClick?: boolean;
|
|
699
|
-
draggable?: boolean;
|
|
700
|
-
showLine?: boolean;
|
|
701
|
-
showToolbar?: boolean;
|
|
702
|
-
addable?: boolean;
|
|
703
|
-
addText?: string;
|
|
704
|
-
refreshable?: boolean;
|
|
705
|
-
iconField?: string;
|
|
706
|
-
typeField?: string;
|
|
707
|
-
iconConfig?: IconConfig<T>;
|
|
708
|
-
statusConfigs?: StatusConfig[];
|
|
709
|
-
actions?: ActionConfig<T>[];
|
|
710
|
-
defaultExpandAll?: boolean;
|
|
711
|
-
defaultExpandedKeys?: TreeKey[];
|
|
712
|
-
defaultSelectedKeys?: TreeKey[];
|
|
713
|
-
defaultCheckedKeys?: TreeKey[];
|
|
714
|
-
expandedKeys?: TreeKey[];
|
|
715
|
-
selectedKeys?: TreeKey[];
|
|
716
|
-
checkedKeys?: TreeKey[];
|
|
717
|
-
}
|
|
718
|
-
interface TreeExpose<T extends object = TreeNodeData> {
|
|
719
|
-
expandAll: () => void;
|
|
720
|
-
collapseAll: () => void;
|
|
721
|
-
selectNode: (key: TreeKey) => void;
|
|
722
|
-
clearSelection: () => void;
|
|
723
|
-
setCheckedKeys: (keys: TreeKey[]) => void;
|
|
724
|
-
clearChecked: () => void;
|
|
725
|
-
getSelectedNode: () => T | null;
|
|
726
|
-
getCheckedData: () => {
|
|
727
|
-
keys: TreeKey[];
|
|
728
|
-
options: Array<T | null>;
|
|
729
|
-
};
|
|
730
|
-
getIndeterminateData: () => {
|
|
731
|
-
keys: TreeKey[];
|
|
732
|
-
options: Array<T | null>;
|
|
733
|
-
};
|
|
734
|
-
scrollTo: TreeInst['scrollTo'];
|
|
735
|
-
/** 展开已知路径,或经 searchSource.resolve 恢复未知节点。 */
|
|
736
|
-
locate: (key: TreeKey) => Promise<boolean>;
|
|
737
|
-
locateMatch: (index: number) => Promise<boolean>;
|
|
738
|
-
nextMatch: () => Promise<boolean>;
|
|
739
|
-
previousMatch: () => Promise<boolean>;
|
|
740
|
-
retrySearch: () => Promise<void>;
|
|
741
|
-
searchLoading: boolean;
|
|
742
|
-
searchError: unknown;
|
|
743
|
-
searchMatchCount: number;
|
|
744
|
-
searchMatchIndex: number;
|
|
745
|
-
/** Vue 公开实例会解包顶层 Ref;这些属性直接读取数组。 */
|
|
746
|
-
expandedKeys: TreeKey[];
|
|
747
|
-
selectedKeys: TreeKey[];
|
|
748
|
-
checkedKeys: TreeKey[];
|
|
749
|
-
}
|
|
750
|
-
interface TreeEmits<T extends object = TreeNodeData> {
|
|
751
|
-
'update:searchPattern': [pattern: string];
|
|
752
|
-
'update:expandedKeys': [keys: TreeKey[], options: Array<T | null>, meta: TreeUpdateMeta<T>];
|
|
753
|
-
'update:selectedKeys': [keys: TreeKey[], options: Array<T | null>, meta: TreeUpdateMeta<T>];
|
|
754
|
-
'update:checkedKeys': [keys: TreeKey[], options: Array<T | null>, meta: TreeUpdateMeta<T>];
|
|
755
|
-
'node-select': [node: T | null, selectedKeys: TreeKey[]];
|
|
756
|
-
'node-action': [action: string, node: T];
|
|
757
|
-
'node-drop': [info: DropInfo<T>];
|
|
758
|
-
'load-error': [error: unknown, node: T];
|
|
759
|
-
'search-error': [error: unknown];
|
|
760
|
-
add: [parentNode?: T];
|
|
761
|
-
refresh: [];
|
|
762
|
-
}
|
|
763
|
-
interface TreeSlots<T extends object = TreeOption$1> {
|
|
764
|
-
'toolbar-actions'?: () => VNodeChild;
|
|
765
|
-
label?: (context: TreeNodeRenderContext<T>) => VNodeChild;
|
|
766
|
-
prefix?: (context: TreeNodeRenderContext<T>) => VNodeChild;
|
|
767
|
-
suffix?: (context: TreeNodeRenderContext<T>) => VNodeChild;
|
|
768
|
-
empty?: () => VNodeChild;
|
|
769
|
-
}
|
|
770
|
-
//#endregion
|
|
771
552
|
//#region src/components/C_Tree/index.vue.d.ts
|
|
772
553
|
declare const __VLS_export: <T extends object = TreeNodeData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
773
554
|
props: vue.PublicProps & __VLS_PrettifyLocal<TreeProps$1<T> & {
|
|
774
|
-
"onUpdate:expandedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
555
|
+
"onUpdate:expandedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
775
556
|
onAdd?: ((parentNode?: T | undefined) => any) | undefined;
|
|
776
557
|
"onLoad-error"?: ((error: unknown, node: T) => any) | undefined;
|
|
777
558
|
onRefresh?: (() => any) | undefined;
|
|
778
559
|
"onUpdate:searchPattern"?: ((pattern: string) => any) | undefined;
|
|
779
|
-
"onUpdate:selectedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
780
|
-
"onUpdate:checkedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
560
|
+
"onUpdate:selectedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
561
|
+
"onUpdate:checkedKeys"?: ((keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => any) | undefined;
|
|
781
562
|
"onNode-select"?: ((node: T | null, selectedKeys: TreeKey[]) => any) | undefined;
|
|
782
563
|
"onNode-action"?: ((action: string, node: T) => any) | undefined;
|
|
783
564
|
"onNode-drop"?: ((info: DropInfo<T>) => any) | undefined;
|
|
@@ -796,7 +577,7 @@ declare const __VLS_export: <T extends object = TreeNodeData>(__VLS_props: NonNu
|
|
|
796
577
|
}>) => void;
|
|
797
578
|
attrs: any;
|
|
798
579
|
slots: TreeSlots<T>;
|
|
799
|
-
emit: ((evt: "update:expandedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "
|
|
580
|
+
emit: ((evt: "update:expandedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => void) & ((evt: "add", parentNode?: T | undefined) => void) & ((evt: "load-error", error: unknown, node: T) => void) & ((evt: "refresh") => void) & ((evt: "update:searchPattern", pattern: string) => void) & ((evt: "update:selectedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => void) & ((evt: "update:checkedKeys", keys: TreeKey[], options: (T | null)[], meta: TreeUpdateMeta<T, "select" | "filter" | "expand" | "collapse" | "unselect" | "check" | "uncheck">) => void) & ((evt: "node-select", node: T | null, selectedKeys: TreeKey[]) => void) & ((evt: "node-action", action: string, node: T) => void) & ((evt: "node-drop", info: DropInfo<T>) => void) & ((evt: "search-error", error: unknown) => void);
|
|
800
581
|
}>) => vue.VNode & {
|
|
801
582
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
802
583
|
};
|
|
@@ -1031,4 +812,4 @@ declare function createTableAutoCompleteEditor<T extends object = object, R exte
|
|
|
1031
812
|
onSelect?: (record: NoInfer<R>, context: TableEditorContext<T, string>) => void;
|
|
1032
813
|
}): NonNullable<TableColumn<T>['editRender']>;
|
|
1033
814
|
//#endregion
|
|
1034
|
-
export {
|
|
815
|
+
export { validateTableRowKeys as A, useTableActions as C, useTableColumns as D, useRowEdit as E, useComponentFeedback as M, useComponentLocale as N, defineTableColumns as O, usePagination as S, useTableManager as T, createHighlight as _, TableQueryResult as a, useModalEdit as b, getItem as c, setItem as d, useTreeOperations as f, HighlightPluginOptions as g, HighlightAPI as h, TableQueryContext as i, _default$1 as j, defineTableConfig as k, removeAllItem as l, _default as m, createTableAutoCompleteEditor as n, UseTableQueryOptions as o, presetConfigs as p, createTableSelectEditor as r, useTableQuery as s, TableEditorContext as t, removeItem as u, setupHighlight as v, useTableExpand as w, useCellEdit as x, useHighlight as y };
|