@robot-admin/naive-ui-components 0.29.2 → 0.30.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 +16 -0
- package/README.md +3 -1
- package/README_EN.md +3 -1
- package/dist/C_ActionBar.css +52 -49
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_DataPicker.cjs +1 -1
- package/dist/C_DataPicker.css +29 -28
- package/dist/C_DataPicker.d.cts +2 -2
- package/dist/C_DataPicker.d.ts +3 -2
- package/dist/C_DataPicker.js +1 -1
- package/dist/C_Density.d.cts +1 -1
- package/dist/C_Density.d.ts +1 -1
- package/dist/C_Editor.d.cts +1 -1
- package/dist/C_Editor.d.ts +1 -1
- package/dist/C_ErrorSummary.d.cts +1 -1
- package/dist/C_ErrorSummary.d.ts +1 -1
- package/dist/C_FilePreview2.js +1 -1
- package/dist/C_Form.d.cts +2 -1
- package/dist/C_Form.d.ts +2 -1
- package/dist/C_FormModal.css +52 -49
- package/dist/C_FormModal.d.cts +1 -1
- package/dist/C_FormModal.d.ts +2 -1
- package/dist/C_FormSearch.css +66 -66
- package/dist/C_Guide.d.cts +1 -1
- package/dist/C_Guide.d.ts +1 -1
- package/dist/C_Icon.d.cts +1 -1
- package/dist/C_Icon.d.ts +1 -1
- package/dist/C_Language.d.cts +1 -1
- package/dist/C_Language.d.ts +1 -1
- package/dist/C_Loading.d.cts +1 -1
- package/dist/C_Loading.d.ts +1 -1
- package/dist/C_Login.d.cts +1 -1
- package/dist/C_Login.d.ts +1 -1
- package/dist/C_Markdown.d.cts +1 -1
- package/dist/C_Markdown.d.ts +1 -1
- package/dist/C_Menu.d.ts +1 -1
- package/dist/C_OrgChart.d.cts +1 -1
- package/dist/C_OrgChart.d.ts +1 -1
- package/dist/C_Progress.d.cts +1 -1
- package/dist/C_Progress.d.ts +1 -1
- package/dist/C_SectionNav.d.cts +1 -1
- package/dist/C_SectionNav.d.ts +1 -1
- package/dist/C_Skeleton.d.cts +1 -1
- package/dist/C_Skeleton.d.ts +1 -1
- package/dist/C_Steps.d.cts +1 -1
- package/dist/C_Steps.d.ts +1 -1
- package/dist/C_Table.base.css +161 -158
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +161 -158
- package/dist/C_Table.d.cts +2 -2
- package/dist/C_Table.d.ts +7 -6
- package/dist/C_Table.js +1 -1
- package/dist/C_Table2.cjs +3 -3
- package/dist/C_Table2.js +3 -3
- package/dist/C_TagsView.d.cts +1 -1
- package/dist/C_TagsView.d.ts +1 -1
- package/dist/C_Theme.d.cts +1 -1
- package/dist/C_Theme.d.ts +1 -1
- package/dist/C_Timeline.d.cts +1 -1
- package/dist/C_Timeline.d.ts +1 -1
- package/dist/C_Transfer.d.cts +1 -1
- package/dist/C_Transfer.d.ts +1 -1
- package/dist/C_Tree.d.ts +6 -5
- 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/data2.d.cts +9 -9
- package/dist/data2.d.ts +9 -9
- package/dist/dateRange.d.cts +10 -2
- package/dist/dateRange.d.ts +10 -2
- package/dist/formField.cjs +1 -0
- package/dist/formField.d.cts +1179 -0
- package/dist/formField.d.ts +1179 -0
- package/dist/formField.js +1 -0
- package/dist/helpers2.cjs +1 -0
- package/dist/helpers2.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +23 -22
- package/dist/index.d.ts +24 -23
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +5 -5
- package/dist/index.vue.d.ts +5 -5
- package/dist/index10.vue.d.cts +3 -3
- package/dist/index10.vue.d.ts +3 -3
- package/dist/index11.vue.d.cts +3 -3
- package/dist/index11.vue.d.ts +13 -1157
- package/dist/index12.vue.d.cts +13 -1157
- package/dist/index12.vue.d.ts +59 -16
- package/dist/index13.vue.d.cts +59 -16
- package/dist/index13.vue.d.ts +17 -57
- package/dist/index14.vue.d.cts +17 -57
- package/dist/index14.vue.d.ts +55 -18
- package/dist/index15.vue.d.cts +55 -18
- package/dist/index15.vue.d.ts +124 -53
- package/dist/index16.vue.d.cts +124 -53
- package/dist/index16.vue.d.ts +51 -123
- package/dist/index17.vue.d.cts +51 -123
- package/dist/index17.vue.d.ts +25 -52
- package/dist/index18.vue.d.cts +25 -52
- package/dist/index18.vue.d.ts +12 -25
- package/dist/index19.vue.d.cts +12 -25
- package/dist/index19.vue.d.ts +129 -13
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +129 -13
- package/dist/index20.vue.d.ts +76 -129
- package/dist/index21.vue.d.cts +76 -129
- package/dist/index21.vue.d.ts +72 -78
- package/dist/index22.vue.d.cts +97 -75
- package/dist/index22.vue.d.ts +96 -68
- package/dist/index23.vue.d.cts +40 -91
- package/dist/index23.vue.d.ts +40 -91
- package/dist/index24.vue.d.cts +23 -49
- package/dist/index24.vue.d.ts +23 -49
- package/dist/index25.vue.d.cts +96 -21
- package/dist/index25.vue.d.ts +96 -21
- package/dist/index26.vue.d.cts +37 -95
- package/dist/index26.vue.d.ts +37 -95
- package/dist/index27.vue.d.cts +8 -34
- package/dist/index27.vue.d.ts +8 -34
- package/dist/index28.vue.d.cts +86 -9
- package/dist/index28.vue.d.ts +86 -9
- package/dist/index29.vue.d.cts +99 -85
- package/dist/index29.vue.d.ts +99 -85
- package/dist/index3.vue.d.cts +6 -6
- package/dist/index3.vue.d.ts +6 -6
- package/dist/index30.vue.d.cts +59 -94
- package/dist/index30.vue.d.ts +59 -94
- package/dist/index9.vue.d.ts +3 -3
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/presets.d.cts +4 -1
- package/dist/presets.d.ts +4 -1
- package/dist/rolldown-runtime.js +1 -0
- package/dist/serializeSearch.cjs +1 -1
- package/dist/serializeSearch.js +1 -1
- package/dist/style.css +256 -252
- 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/useCropperCore.d.cts +4 -4
- package/dist/useCropperCore.d.ts +4 -4
- package/dist/useDynamicFormState.d.cts +5 -67
- package/dist/useDynamicFormState.d.ts +5 -67
- package/dist/useEdgeInteraction.d.cts +2 -2
- package/dist/useEdgeInteraction.d.ts +2 -2
- package/dist/useFormRenderer.d.cts +69 -0
- package/dist/useFormRenderer.d.ts +69 -0
- package/dist/useFullscreen.d.cts +3 -3
- package/dist/useFullscreen.d.ts +3 -3
- package/dist/useGlobalSearch.d.cts +1 -1
- package/dist/useGlobalSearch.d.ts +1 -1
- package/dist/useInfiniteScroll.d.cts +2 -2
- package/dist/useInfiniteScroll.d.ts +2 -2
- package/dist/useQRCode.d.cts +3 -3
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSignatureHistory.d.cts +4 -4
- package/dist/useSignatureHistory.d.ts +4 -4
- package/dist/useSplitResize.d.cts +9 -9
- package/dist/useSplitResize.d.ts +9 -9
- package/dist/useTableQuery.d.cts +9 -9
- package/dist/useTableQuery.d.ts +9 -9
- package/dist/useWorkflowValidation.d.cts +36 -36
- package/dist/useWorkflowValidation.d.ts +36 -36
- package/dist/verification.d.cts +4 -4
- package/dist/verification.d.ts +4 -4
- package/dist/{xlsx.js → xlsx2.js} +1 -1
- package/docs/guides/data-picker.md +30 -11
- package/docs/guides/data-workflows.md +22 -1
- package/docs/guides/search-workflows.md +3 -1
- package/docs/guides/usage.en.md +15 -15
- package/docs/guides/usage.md +15 -15
- package/package.json +1 -1
- package/dist/C_DataPicker2.cjs +0 -1
- package/dist/C_DataPicker2.js +0 -1
- package/dist/index31.vue.d.cts +0 -75
- package/dist/index31.vue.d.ts +0 -75
package/dist/index21.vue.d.ts
CHANGED
|
@@ -1,83 +1,77 @@
|
|
|
1
|
+
import { a as RouteItem, t as MenuAdapterConfig } from "./public.js";
|
|
1
2
|
import * as vue from "vue";
|
|
3
|
+
import { Ref } from "vue";
|
|
4
|
+
import { DropdownProps, MenuInst, MenuOption } from "naive-ui";
|
|
2
5
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
type
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
autoSaveInterval?: number;
|
|
35
|
-
/** 是否为暗色主题(外部传入) */
|
|
36
|
-
isDark?: boolean;
|
|
6
|
+
//#region src/components/C_Menu/types.d.ts
|
|
7
|
+
type MenuKey = string | number;
|
|
8
|
+
type MenuValue = MenuKey | null;
|
|
9
|
+
type OwnMenuKey<Option> = Option extends {
|
|
10
|
+
key?: infer Key;
|
|
11
|
+
} ? Extract<Key, MenuKey> : never;
|
|
12
|
+
/** 已遇到的递归业务类型或原生完整键类型均停止展开,内联配置包含子节点。 */
|
|
13
|
+
type MenuOptionKeys<Option, Seen = never> = Option extends Seen ? OwnMenuKey<Option> : MenuKey extends OwnMenuKey<Option> ? MenuKey : OwnMenuKey<Option> | (Option extends {
|
|
14
|
+
children?: infer Children;
|
|
15
|
+
} ? Children extends readonly unknown[] ? MenuOptionKeys<Children[number], Seen | Option> : never : never);
|
|
16
|
+
type WidenMenuKey<Key> = Key extends string ? string : Key extends number ? number : never;
|
|
17
|
+
type MenuSelectionKey<O extends MenuOption[] | undefined> = O extends MenuOption[] ? [MenuOptionKeys<O[number]>] extends [never] ? MenuKey : WidenMenuKey<MenuOptionKeys<O[number]>> : string;
|
|
18
|
+
interface MenuProps<O extends MenuOption[] | undefined = MenuOption[] | undefined> {
|
|
19
|
+
options?: O;
|
|
20
|
+
routes?: RouteItem[];
|
|
21
|
+
adapterConfig?: MenuAdapterConfig;
|
|
22
|
+
labelFormatter?: (label: string) => string;
|
|
23
|
+
/** @deprecated Use modelValue. */
|
|
24
|
+
value?: MenuValue;
|
|
25
|
+
modelValue?: MenuValue;
|
|
26
|
+
expandedKeys?: MenuKey[];
|
|
27
|
+
defaultExpandedKeys?: MenuKey[];
|
|
28
|
+
mode?: 'vertical' | 'horizontal';
|
|
29
|
+
collapsed?: boolean;
|
|
30
|
+
collapsedWidth?: number;
|
|
31
|
+
collapsedIconSize?: number;
|
|
32
|
+
inverted?: boolean;
|
|
33
|
+
themeOverrides?: Record<string, any>;
|
|
34
|
+
indent?: number;
|
|
35
|
+
rootIndent?: number;
|
|
36
|
+
dropdownProps?: DropdownProps;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
rightToolbar: string;
|
|
75
|
-
maxLength: number;
|
|
76
|
-
showWordCount: boolean;
|
|
77
|
-
autoSave: boolean;
|
|
78
|
-
autoSaveInterval: number;
|
|
79
|
-
isDark: boolean;
|
|
80
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
interface MenuEmits<O extends MenuOption[] | undefined = MenuOption[] | undefined> {
|
|
39
|
+
select: [key: MenuSelectionKey<O>];
|
|
40
|
+
/** 鼠标或键盘聚焦叶子项时触发,可用于无副作用的路由预取。 */
|
|
41
|
+
intent: [key: MenuSelectionKey<O>];
|
|
42
|
+
'update:modelValue': [key: MenuSelectionKey<O> | null];
|
|
43
|
+
/** @deprecated Use update:modelValue. */
|
|
44
|
+
'update:value': [key: MenuSelectionKey<O> | null];
|
|
45
|
+
'update:expandedKeys': [keys: MenuSelectionKey<O>[]];
|
|
46
|
+
}
|
|
47
|
+
interface MenuExpose {
|
|
48
|
+
showOption: (key: MenuKey) => void;
|
|
49
|
+
/** Vue 公开实例会解包顶层 Ref。 */
|
|
50
|
+
menuRef: MenuInst | null;
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/components/C_Menu/index.vue.d.ts
|
|
54
|
+
declare const __VLS_export: <Options extends MenuOption[] | undefined = undefined>(__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<{
|
|
55
|
+
props: vue.PublicProps & __VLS_PrettifyLocal<MenuProps<Options> & {
|
|
56
|
+
"onUpdate:modelValue"?: ((key: MenuSelectionKey<Options> | null) => any) | undefined;
|
|
57
|
+
onSelect?: ((key: MenuSelectionKey<Options>) => any) | undefined;
|
|
58
|
+
onIntent?: ((key: MenuSelectionKey<Options>) => any) | undefined;
|
|
59
|
+
"onUpdate:value"?: ((key: MenuSelectionKey<Options> | null) => any) | undefined;
|
|
60
|
+
"onUpdate:expandedKeys"?: ((keys: MenuSelectionKey<Options>[]) => any) | undefined;
|
|
61
|
+
}> & (typeof globalThis extends {
|
|
62
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
63
|
+
} ? P : {});
|
|
64
|
+
expose: (exposed: vue.ShallowUnwrapRef<{
|
|
65
|
+
showOption: (key: MenuKey) => void | undefined;
|
|
66
|
+
menuRef: Ref<MenuInst | null, MenuInst | null>;
|
|
67
|
+
}>) => void;
|
|
68
|
+
attrs: any;
|
|
69
|
+
slots: {};
|
|
70
|
+
emit: ((evt: "update:modelValue", key: MenuSelectionKey<Options> | null) => void) & ((evt: "select", key: MenuSelectionKey<Options>) => void) & ((evt: "intent", key: MenuSelectionKey<Options>) => void) & ((evt: "update:value", key: MenuSelectionKey<Options> | null) => void) & ((evt: "update:expandedKeys", keys: MenuSelectionKey<Options>[]) => void);
|
|
71
|
+
}>) => vue.VNode & {
|
|
72
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
73
|
+
};
|
|
81
74
|
declare const _default: typeof __VLS_export;
|
|
75
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
82
76
|
//#endregion
|
|
83
|
-
export { _default as t };
|
|
77
|
+
export { MenuProps as a, MenuKey as i, MenuEmits as n, MenuValue as o, MenuExpose as r, _default as t };
|
package/dist/index22.vue.d.cts
CHANGED
|
@@ -1,83 +1,105 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
|
|
3
|
+
//#region src/components/C_OrgChart/types.d.ts
|
|
4
|
+
/** 节点数据 */
|
|
5
|
+
interface OrgChartNode {
|
|
6
|
+
/** 唯一标识 */
|
|
7
|
+
id: string | number;
|
|
8
|
+
/** 节点标题(姓名/部门名) */
|
|
9
|
+
label: string;
|
|
10
|
+
/** 副标题(职位/描述) */
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
/** 头像 URL */
|
|
13
|
+
avatar?: string;
|
|
14
|
+
/** 子节点 */
|
|
15
|
+
children?: OrgChartNode[];
|
|
16
|
+
/** 自定义 CSS 类 */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** 节点是否默认折叠 */
|
|
19
|
+
collapsed?: boolean;
|
|
20
|
+
/** 节点额外数据(透传给插槽/事件) */
|
|
21
|
+
data?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
/** 布局方向 */
|
|
24
|
+
type OrgChartDirection = 'vertical' | 'horizontal';
|
|
25
|
+
/** 连线样式 */
|
|
26
|
+
type OrgChartLineStyle = 'straight' | 'rounded' | 'stepped';
|
|
27
|
+
/** C_OrgChart Props */
|
|
28
|
+
interface OrgChartProps {
|
|
29
|
+
/** 树形数据 */
|
|
30
|
+
data: OrgChartNode;
|
|
31
|
+
/** 布局方向 */
|
|
32
|
+
direction?: OrgChartDirection;
|
|
33
|
+
/** 连线样式 */
|
|
34
|
+
lineStyle?: OrgChartLineStyle;
|
|
35
|
+
/** 连线颜色 */
|
|
36
|
+
lineColor?: string;
|
|
37
|
+
/** 连线宽度(px) */
|
|
38
|
+
lineWidth?: number;
|
|
39
|
+
/** 节点间距(px) */
|
|
40
|
+
nodeSpacing?: number;
|
|
41
|
+
/** 层级间距(px) */
|
|
42
|
+
levelSpacing?: number;
|
|
43
|
+
/** 是否支持缩放 */
|
|
44
|
+
zoomable?: boolean;
|
|
45
|
+
/** 是否支持平移 */
|
|
46
|
+
pannable?: boolean;
|
|
47
|
+
/** 初始缩放比例 */
|
|
48
|
+
initialZoom?: number;
|
|
49
|
+
/** 首次渲染与数据、布局变化时适配完整树形范围。 */
|
|
50
|
+
fitOnInit?: boolean;
|
|
51
|
+
/** 最小缩放 */
|
|
52
|
+
minZoom?: number;
|
|
53
|
+
/** 最大缩放 */
|
|
54
|
+
maxZoom?: number;
|
|
55
|
+
/** 是否可折叠 */
|
|
56
|
+
collapsible?: boolean;
|
|
37
57
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/components/C_OrgChart/index.vue.d.ts
|
|
60
|
+
declare var __VLS_12: {
|
|
61
|
+
node: OrgChartNode;
|
|
62
|
+
isLeaf: boolean;
|
|
63
|
+
isExpanded: boolean;
|
|
64
|
+
};
|
|
65
|
+
type __VLS_Slots = {} & {
|
|
66
|
+
node?: (props: typeof __VLS_12) => any;
|
|
67
|
+
};
|
|
68
|
+
declare const __VLS_base: vue.DefineComponent<OrgChartProps, {
|
|
69
|
+
zoomIn: () => void;
|
|
70
|
+
zoomOut: () => void;
|
|
71
|
+
resetView: () => void;
|
|
72
|
+
fitView: () => Promise<void>;
|
|
73
|
+
zoom: vue.Ref<number, number>;
|
|
43
74
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"auto-save": (text: string) => any;
|
|
52
|
-
"max-length-exceeded": (currentLength: number, maxLength: number) => any;
|
|
53
|
-
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
54
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
55
|
-
onChange?: ((text: string, html: string) => any) | undefined;
|
|
56
|
-
onSave?: ((text: string, html: string) => any) | undefined;
|
|
57
|
-
"onUpload-image"?: ((event: Event, insertImage: InsertImageFunction, files: FileList) => any) | undefined;
|
|
58
|
-
"onFullscreen-change"?: ((isFullscreen: boolean) => any) | undefined;
|
|
59
|
-
"onCopy-code-success"?: ((text: string) => any) | undefined;
|
|
60
|
-
"onWord-count-change"?: ((count: number) => any) | undefined;
|
|
61
|
-
"onAuto-save"?: ((text: string) => any) | undefined;
|
|
62
|
-
"onMax-length-exceeded"?: ((currentLength: number, maxLength: number) => any) | undefined;
|
|
75
|
+
"node-click": (node: OrgChartNode) => any;
|
|
76
|
+
"node-expand": (node: OrgChartNode) => any;
|
|
77
|
+
"node-collapse": (node: OrgChartNode) => any;
|
|
78
|
+
}, string, vue.PublicProps, Readonly<OrgChartProps> & Readonly<{
|
|
79
|
+
"onNode-click"?: ((node: OrgChartNode) => any) | undefined;
|
|
80
|
+
"onNode-expand"?: ((node: OrgChartNode) => any) | undefined;
|
|
81
|
+
"onNode-collapse"?: ((node: OrgChartNode) => any) | undefined;
|
|
63
82
|
}>, {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
autoSave: boolean;
|
|
78
|
-
autoSaveInterval: number;
|
|
79
|
-
isDark: boolean;
|
|
83
|
+
direction: OrgChartDirection;
|
|
84
|
+
lineColor: string;
|
|
85
|
+
lineWidth: number;
|
|
86
|
+
collapsible: boolean;
|
|
87
|
+
lineStyle: OrgChartLineStyle;
|
|
88
|
+
nodeSpacing: number;
|
|
89
|
+
levelSpacing: number;
|
|
90
|
+
zoomable: boolean;
|
|
91
|
+
pannable: boolean;
|
|
92
|
+
initialZoom: number;
|
|
93
|
+
fitOnInit: boolean;
|
|
94
|
+
minZoom: number;
|
|
95
|
+
maxZoom: number;
|
|
80
96
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
97
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
81
98
|
declare const _default: typeof __VLS_export;
|
|
99
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
100
|
+
new (): {
|
|
101
|
+
$slots: S;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
82
104
|
//#endregion
|
|
83
|
-
export { _default as t };
|
|
105
|
+
export { OrgChartProps as a, OrgChartNode as i, OrgChartDirection as n, OrgChartLineStyle as r, _default as t };
|
package/dist/index22.vue.d.ts
CHANGED
|
@@ -1,77 +1,105 @@
|
|
|
1
|
-
import { a as RouteItem, t as MenuAdapterConfig } from "./public.js";
|
|
2
1
|
import * as vue from "vue";
|
|
3
|
-
import { Ref } from "vue";
|
|
4
|
-
import { DropdownProps, MenuInst, MenuOption } from "naive-ui";
|
|
5
2
|
|
|
6
|
-
//#region src/components/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
labelFormatter?: (label: string) => string;
|
|
23
|
-
/** @deprecated Use modelValue. */
|
|
24
|
-
value?: MenuValue;
|
|
25
|
-
modelValue?: MenuValue;
|
|
26
|
-
expandedKeys?: MenuKey[];
|
|
27
|
-
defaultExpandedKeys?: MenuKey[];
|
|
28
|
-
mode?: 'vertical' | 'horizontal';
|
|
3
|
+
//#region src/components/C_OrgChart/types.d.ts
|
|
4
|
+
/** 节点数据 */
|
|
5
|
+
interface OrgChartNode {
|
|
6
|
+
/** 唯一标识 */
|
|
7
|
+
id: string | number;
|
|
8
|
+
/** 节点标题(姓名/部门名) */
|
|
9
|
+
label: string;
|
|
10
|
+
/** 副标题(职位/描述) */
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
/** 头像 URL */
|
|
13
|
+
avatar?: string;
|
|
14
|
+
/** 子节点 */
|
|
15
|
+
children?: OrgChartNode[];
|
|
16
|
+
/** 自定义 CSS 类 */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** 节点是否默认折叠 */
|
|
29
19
|
collapsed?: boolean;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
inverted?: boolean;
|
|
33
|
-
themeOverrides?: Record<string, any>;
|
|
34
|
-
indent?: number;
|
|
35
|
-
rootIndent?: number;
|
|
36
|
-
dropdownProps?: DropdownProps;
|
|
20
|
+
/** 节点额外数据(透传给插槽/事件) */
|
|
21
|
+
data?: Record<string, unknown>;
|
|
37
22
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
23
|
+
/** 布局方向 */
|
|
24
|
+
type OrgChartDirection = 'vertical' | 'horizontal';
|
|
25
|
+
/** 连线样式 */
|
|
26
|
+
type OrgChartLineStyle = 'straight' | 'rounded' | 'stepped';
|
|
27
|
+
/** C_OrgChart Props */
|
|
28
|
+
interface OrgChartProps {
|
|
29
|
+
/** 树形数据 */
|
|
30
|
+
data: OrgChartNode;
|
|
31
|
+
/** 布局方向 */
|
|
32
|
+
direction?: OrgChartDirection;
|
|
33
|
+
/** 连线样式 */
|
|
34
|
+
lineStyle?: OrgChartLineStyle;
|
|
35
|
+
/** 连线颜色 */
|
|
36
|
+
lineColor?: string;
|
|
37
|
+
/** 连线宽度(px) */
|
|
38
|
+
lineWidth?: number;
|
|
39
|
+
/** 节点间距(px) */
|
|
40
|
+
nodeSpacing?: number;
|
|
41
|
+
/** 层级间距(px) */
|
|
42
|
+
levelSpacing?: number;
|
|
43
|
+
/** 是否支持缩放 */
|
|
44
|
+
zoomable?: boolean;
|
|
45
|
+
/** 是否支持平移 */
|
|
46
|
+
pannable?: boolean;
|
|
47
|
+
/** 初始缩放比例 */
|
|
48
|
+
initialZoom?: number;
|
|
49
|
+
/** 首次渲染与数据、布局变化时适配完整树形范围。 */
|
|
50
|
+
fitOnInit?: boolean;
|
|
51
|
+
/** 最小缩放 */
|
|
52
|
+
minZoom?: number;
|
|
53
|
+
/** 最大缩放 */
|
|
54
|
+
maxZoom?: number;
|
|
55
|
+
/** 是否可折叠 */
|
|
56
|
+
collapsible?: boolean;
|
|
51
57
|
}
|
|
52
58
|
//#endregion
|
|
53
|
-
//#region src/components/
|
|
54
|
-
declare
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}> & (typeof globalThis extends {
|
|
62
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
63
|
-
} ? P : {});
|
|
64
|
-
expose: (exposed: vue.ShallowUnwrapRef<{
|
|
65
|
-
showOption: (key: MenuKey) => void | undefined;
|
|
66
|
-
menuRef: Ref<MenuInst | null, MenuInst | null>;
|
|
67
|
-
}>) => void;
|
|
68
|
-
attrs: any;
|
|
69
|
-
slots: {};
|
|
70
|
-
emit: ((evt: "update:modelValue", key: MenuSelectionKey<Options> | null) => void) & ((evt: "select", key: MenuSelectionKey<Options>) => void) & ((evt: "intent", key: MenuSelectionKey<Options>) => void) & ((evt: "update:value", key: MenuSelectionKey<Options> | null) => void) & ((evt: "update:expandedKeys", keys: MenuSelectionKey<Options>[]) => void);
|
|
71
|
-
}>) => vue.VNode & {
|
|
72
|
-
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
59
|
+
//#region src/components/C_OrgChart/index.vue.d.ts
|
|
60
|
+
declare var __VLS_12: {
|
|
61
|
+
node: OrgChartNode;
|
|
62
|
+
isLeaf: boolean;
|
|
63
|
+
isExpanded: boolean;
|
|
64
|
+
};
|
|
65
|
+
type __VLS_Slots = {} & {
|
|
66
|
+
node?: (props: typeof __VLS_12) => any;
|
|
73
67
|
};
|
|
68
|
+
declare const __VLS_base: vue.DefineComponent<OrgChartProps, {
|
|
69
|
+
zoomIn: () => void;
|
|
70
|
+
zoomOut: () => void;
|
|
71
|
+
resetView: () => void;
|
|
72
|
+
fitView: () => Promise<void>;
|
|
73
|
+
zoom: vue.Ref<number, number>;
|
|
74
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
75
|
+
"node-click": (node: OrgChartNode) => any;
|
|
76
|
+
"node-expand": (node: OrgChartNode) => any;
|
|
77
|
+
"node-collapse": (node: OrgChartNode) => any;
|
|
78
|
+
}, string, vue.PublicProps, Readonly<OrgChartProps> & Readonly<{
|
|
79
|
+
"onNode-click"?: ((node: OrgChartNode) => any) | undefined;
|
|
80
|
+
"onNode-expand"?: ((node: OrgChartNode) => any) | undefined;
|
|
81
|
+
"onNode-collapse"?: ((node: OrgChartNode) => any) | undefined;
|
|
82
|
+
}>, {
|
|
83
|
+
direction: OrgChartDirection;
|
|
84
|
+
lineColor: string;
|
|
85
|
+
lineWidth: number;
|
|
86
|
+
collapsible: boolean;
|
|
87
|
+
lineStyle: OrgChartLineStyle;
|
|
88
|
+
nodeSpacing: number;
|
|
89
|
+
levelSpacing: number;
|
|
90
|
+
zoomable: boolean;
|
|
91
|
+
pannable: boolean;
|
|
92
|
+
initialZoom: number;
|
|
93
|
+
fitOnInit: boolean;
|
|
94
|
+
minZoom: number;
|
|
95
|
+
maxZoom: number;
|
|
96
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
97
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
74
98
|
declare const _default: typeof __VLS_export;
|
|
75
|
-
type
|
|
99
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
100
|
+
new (): {
|
|
101
|
+
$slots: S;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
76
104
|
//#endregion
|
|
77
|
-
export {
|
|
105
|
+
export { OrgChartProps as a, OrgChartNode as i, OrgChartDirection as n, OrgChartLineStyle as r, _default as t };
|