@robot-admin/naive-ui-components 0.6.1 → 0.6.2
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 +48 -40
- package/dist/C_Breadcrumb.js.map +1 -1
- package/dist/C_Breadcrumb2.js.map +1 -1
- package/dist/C_Menu.js.map +1 -1
- package/dist/C_Menu2.js.map +1 -1
- package/dist/{C_TagsView-DX3LecK1.css.map → C_TagsView-BsutyC3U.css.map} +1 -1
- package/dist/{C_TagsView-DqOTa8bL.css.map → C_TagsView-Crm7yWg9.css.map} +1 -1
- package/dist/C_TagsView.css +36 -36
- package/dist/C_TagsView.js.map +1 -1
- package/dist/C_TagsView2.js +1 -1
- package/dist/C_TagsView2.js.map +1 -1
- package/dist/constants.d.ts +4 -4
- package/dist/constants2.d.ts +4 -4
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.ts +4 -4
- package/dist/constants5.d.ts +2 -2
- package/dist/data.d.ts +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.vue.d.ts +1 -1
- package/dist/index11.vue.d.ts +5 -5
- package/dist/index12.vue.d.ts +2 -2
- package/dist/index13.vue.d.ts +5 -5
- package/dist/index15.vue.d.ts +3 -3
- package/dist/index17.vue.d.ts +1 -1
- package/dist/index19.vue.d.ts +2 -2
- package/dist/index4.vue.d.ts +6 -6
- package/dist/index5.vue.d.ts +2 -2
- package/dist/index6.vue.d.ts +2 -2
- package/dist/index7.vue.d.ts +2 -2
- package/dist/index8.vue.d.ts +1 -1
- package/dist/index9.vue.d.ts +2 -2
- package/dist/menuAdapter.js +1 -1
- package/dist/menuAdapter.js.map +1 -1
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.js.map +1 -1
- package/dist/style.css +37 -37
- package/dist/useCollapsePanel.d.ts +4 -4
- package/dist/useCropperCore.d.ts +4 -4
- package/dist/useDraggableLayout.d.ts +8 -8
- package/dist/useDynamicFormState.d.ts +118 -118
- package/dist/useEdgeInteraction.d.ts +1 -1
- package/dist/useInfiniteScroll.d.ts +3 -3
- package/dist/useModalEdit.d.ts +2 -2
- package/dist/useQRCode.d.ts +2 -2
- package/dist/useSearchState.d.ts +3 -3
- package/dist/useSplitResize.d.ts +6 -6
- package/dist/useTimeSelection.d.ts +1 -1
- package/dist/useTreeOperations.d.ts +5 -5
- package/dist/useWorkflowValidation.d.ts +5 -5
- package/package.json +1 -1
package/dist/index13.vue.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
38
38
|
insertText: (text: string) => void;
|
|
39
39
|
wordCount: vue.ComputedRef<number>;
|
|
40
40
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
41
|
-
"update:modelValue": (value: string) => any;
|
|
42
41
|
change: (text: string, html: string) => any;
|
|
42
|
+
"update:modelValue": (value: string) => any;
|
|
43
43
|
save: (text: string, html: string) => any;
|
|
44
44
|
"upload-image": (event: Event, insertImage: InsertImageFunction, files: FileList) => any;
|
|
45
45
|
"fullscreen-change": (isFullscreen: boolean) => any;
|
|
@@ -48,8 +48,8 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
48
48
|
"auto-save": (text: string) => any;
|
|
49
49
|
"max-length-exceeded": (currentLength: number, maxLength: number) => any;
|
|
50
50
|
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
51
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
52
51
|
onChange?: ((text: string, html: string) => any) | undefined;
|
|
52
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
53
53
|
onSave?: ((text: string, html: string) => any) | undefined;
|
|
54
54
|
"onUpload-image"?: ((event: Event, insertImage: InsertImageFunction, files: FileList) => any) | undefined;
|
|
55
55
|
"onFullscreen-change"?: ((isFullscreen: boolean) => any) | undefined;
|
|
@@ -59,10 +59,11 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
59
59
|
"onMax-length-exceeded"?: ((currentLength: number, maxLength: number) => any) | undefined;
|
|
60
60
|
}>, {
|
|
61
61
|
height: string | number;
|
|
62
|
-
modelValue: string;
|
|
63
62
|
disabled: boolean;
|
|
64
|
-
placeholder: string;
|
|
65
63
|
mode: "edit" | "editable" | "preview";
|
|
64
|
+
placeholder: string;
|
|
65
|
+
modelValue: string;
|
|
66
|
+
autoSave: boolean;
|
|
66
67
|
tocNavPosition: "left" | "right";
|
|
67
68
|
defaultFullscreen: boolean;
|
|
68
69
|
autofocus: boolean;
|
|
@@ -71,7 +72,6 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
71
72
|
rightToolbar: string;
|
|
72
73
|
maxLength: number;
|
|
73
74
|
showWordCount: boolean;
|
|
74
|
-
autoSave: boolean;
|
|
75
75
|
autoSaveInterval: number;
|
|
76
76
|
isDark: boolean;
|
|
77
77
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
package/dist/index15.vue.d.ts
CHANGED
|
@@ -34,13 +34,13 @@ type __VLS_Slots = {} & {
|
|
|
34
34
|
indicator?: (props: typeof __VLS_9) => any;
|
|
35
35
|
};
|
|
36
36
|
declare const __VLS_base: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
37
|
+
strokeWidth: number;
|
|
38
|
+
time: number;
|
|
39
|
+
status: "default" | "success" | "error" | "warning" | "info";
|
|
37
40
|
percentage: number | number[];
|
|
38
41
|
isAnimation: boolean;
|
|
39
|
-
time: number;
|
|
40
42
|
indicatorPlacement: "inside" | "outside";
|
|
41
43
|
showIndicator: boolean;
|
|
42
|
-
status: "default" | "success" | "error" | "warning" | "info";
|
|
43
|
-
strokeWidth: number;
|
|
44
44
|
unit: string;
|
|
45
45
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
46
46
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
package/dist/index17.vue.d.ts
CHANGED
|
@@ -76,10 +76,10 @@ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {
|
|
|
76
76
|
onClose?: ((fallbackPath: string) => any) | undefined;
|
|
77
77
|
onCloseAll?: (() => any) | undefined;
|
|
78
78
|
}>, {
|
|
79
|
-
persistKey: string;
|
|
80
79
|
homePath: string;
|
|
81
80
|
homeTitle: string;
|
|
82
81
|
homeIcon: string;
|
|
82
|
+
persistKey: string;
|
|
83
83
|
contextMenuLabels: ContextMenuLabels;
|
|
84
84
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
85
85
|
declare const _default: typeof __VLS_export;
|
package/dist/index19.vue.d.ts
CHANGED
|
@@ -648,11 +648,11 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
648
648
|
onTaskChange?: ((task: GanttTask, changes: any) => any) | undefined;
|
|
649
649
|
}>, {
|
|
650
650
|
height: string | number;
|
|
651
|
+
theme: "light" | "dark";
|
|
652
|
+
data: GanttTask[];
|
|
651
653
|
title: string;
|
|
652
654
|
options: GanttOptions;
|
|
653
|
-
data: GanttTask[];
|
|
654
655
|
showToolbar: boolean;
|
|
655
|
-
theme: "light" | "dark";
|
|
656
656
|
preset: GanttPreset;
|
|
657
657
|
showFullscreenButton: boolean;
|
|
658
658
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
package/dist/index4.vue.d.ts
CHANGED
|
@@ -18,26 +18,26 @@ declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
|
|
|
18
18
|
reset: () => void;
|
|
19
19
|
show: () => void;
|
|
20
20
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
21
|
-
change: (valid: boolean) => any;
|
|
22
|
-
reset: () => any;
|
|
23
21
|
success: (data: {
|
|
24
22
|
token: string;
|
|
25
23
|
timestamp: number;
|
|
26
24
|
}) => any;
|
|
27
25
|
fail: (error: string) => any;
|
|
26
|
+
change: (valid: boolean) => any;
|
|
27
|
+
reset: () => any;
|
|
28
28
|
}, string, vue.PublicProps, Readonly<CaptchaProps> & Readonly<{
|
|
29
|
-
onChange?: ((valid: boolean) => any) | undefined;
|
|
30
|
-
onReset?: (() => any) | undefined;
|
|
31
29
|
onSuccess?: ((data: {
|
|
32
30
|
token: string;
|
|
33
31
|
timestamp: number;
|
|
34
32
|
}) => any) | undefined;
|
|
35
33
|
onFail?: ((error: string) => any) | undefined;
|
|
34
|
+
onChange?: ((valid: boolean) => any) | undefined;
|
|
35
|
+
onReset?: (() => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
|
-
disabled: boolean;
|
|
38
|
-
theme: "light" | "dark";
|
|
39
37
|
triggerText: string;
|
|
40
38
|
images: string[];
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
theme: "light" | "dark";
|
|
41
41
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
42
42
|
declare const _default: typeof __VLS_export;
|
|
43
43
|
//#endregion
|
package/dist/index5.vue.d.ts
CHANGED
|
@@ -17,11 +17,11 @@ type __VLS_Props = {
|
|
|
17
17
|
modelValue?: CascadeValue;
|
|
18
18
|
};
|
|
19
19
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
20
|
-
"update:modelValue": (value: CascadeValue) => any;
|
|
21
20
|
change: (value: CascadeValue) => any;
|
|
21
|
+
"update:modelValue": (value: CascadeValue) => any;
|
|
22
22
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
-
"onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
|
|
24
23
|
onChange?: ((value: CascadeValue) => any) | undefined;
|
|
24
|
+
"onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
placeholders: string[];
|
|
27
27
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
package/dist/index6.vue.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
trigger?: (props: typeof __VLS_9) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
17
|
-
"update:modelValue": (value: string) => any;
|
|
18
17
|
change: (value: string) => any;
|
|
18
|
+
"update:modelValue": (value: string) => any;
|
|
19
19
|
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
20
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
21
20
|
onChange?: ((value: string) => any) | undefined;
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
23
|
placeholder: string;
|
|
24
24
|
showLetters: boolean;
|
package/dist/index7.vue.d.ts
CHANGED
|
@@ -33,12 +33,12 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
33
33
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
34
34
|
onFullscreen?: ((isFullscreen: boolean) => any) | undefined;
|
|
35
35
|
}>, {
|
|
36
|
+
wordWrap: boolean;
|
|
37
|
+
trim: boolean;
|
|
36
38
|
code: string;
|
|
37
39
|
language: string;
|
|
38
40
|
showHeader: boolean;
|
|
39
41
|
showLineNumbers: boolean;
|
|
40
|
-
wordWrap: boolean;
|
|
41
|
-
trim: boolean;
|
|
42
42
|
showFullscreen: boolean;
|
|
43
43
|
autoLoadLanguage: boolean;
|
|
44
44
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
package/dist/index8.vue.d.ts
CHANGED
|
@@ -40,8 +40,8 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
40
40
|
"onUpdate:smartRange"?: ((value: DateRangeValue) => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
42
|
disabled: boolean;
|
|
43
|
-
placeholder: string;
|
|
44
43
|
mode: DatePickerMode;
|
|
44
|
+
placeholder: string;
|
|
45
45
|
startPlaceholder: string;
|
|
46
46
|
endPlaceholder: string;
|
|
47
47
|
disabledBeforeToday: boolean;
|
package/dist/index9.vue.d.ts
CHANGED
|
@@ -29,11 +29,11 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
29
29
|
"onEditor-change"?: ((html: string) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
31
|
height: number;
|
|
32
|
-
modelValue: string;
|
|
33
32
|
disabled: boolean;
|
|
33
|
+
theme: "light" | "dark";
|
|
34
34
|
placeholder: string;
|
|
35
|
+
modelValue: string;
|
|
35
36
|
readonly: boolean;
|
|
36
|
-
theme: "light" | "dark";
|
|
37
37
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
38
38
|
declare const _default: typeof __VLS_export;
|
|
39
39
|
//#endregion
|
package/dist/menuAdapter.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as e}from"vue";import{Icon as t}from"@iconify/vue";const n=e=>e.startsWith(`/`)?e:`/${e}`,r=e=>e.path?n(e.path):``,i=e=>e.meta?.title||e.name||``,a=e=>!e.meta?.hidden,o=n=>{if(n){if(typeof n==`string`)return()=>e(`span`,{class:`inline-flex items
|
|
1
|
+
import{h as e}from"vue";import{Icon as t}from"@iconify/vue";const n=e=>e.startsWith(`/`)?e:`/${e}`,r=e=>e.path?n(e.path):``,i=e=>e.meta?.title||e.name||``,a=e=>!e.meta?.hidden,o=n=>{if(n){if(typeof n==`string`)return()=>e(`span`,{class:`n-icon`,style:`display: inline-flex; align-items: center;`},[e(t,{icon:n})]);if(typeof n==`function`)return n}};function s(e,t={}){let{labelFormatter:n=e=>e,getKey:s=r,getLabel:c=i,filter:l=a,renderIcon:u=o,recursive:d=!0}=t,f=e=>e.filter(l).map(e=>{let t=e.meta?.icon||e.icon,r=d&&e.children?.length?f(e.children):void 0;return{key:s(e),label:n(c(e)),disabled:e.disabled||!1,icon:u(t),...e.type&&{type:e.type},...r?.length&&{children:r}}});return f(e)}function c(e,t=a){let n=[],r=e=>{for(let i of e)t(i)&&n.push(i),i.children?.length&&r(i.children)};return r(e),n}export{c as n,s as t};
|
|
2
2
|
//# sourceMappingURL=menuAdapter.js.map
|
package/dist/menuAdapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuAdapter.js","names":[],"sources":["../src/components/_shared/menuAdapter.ts"],"sourcesContent":["/**\n * 菜单适配器 — 将路由数据转换为 NMenu 的 MenuOption[]\n *\n * 设计理念:\n * - 开箱即用:`createMenuOptions(routes)` 零配置即可生成菜单\n * - 完全可控:通过 `MenuAdapterConfig` 定制每一步转换逻辑\n * - i18n 解耦:`labelFormatter` 回调注入翻译函数,不绑定任何 i18n 方案\n *\n * @example 基础用法\n * ```ts\n * import { createMenuOptions } from '@robot-admin/naive-ui-components'\n *\n * const menuOptions = createMenuOptions(routes)\n * ```\n *\n * @example 带 i18n + 过滤\n * ```ts\n * const menuOptions = createMenuOptions(routes, {\n * labelFormatter: t, // vue-i18n 的 t 函数\n * filter: route => !route.meta?.hidden,\n * })\n * ```\n *\n * @example 自定义 key 取值\n * ```ts\n * const menuOptions = createMenuOptions(routes, {\n * getKey: route => route.name || route.path,\n * })\n * ```\n */\n\nimport { h, type VNode } from 'vue'\nimport { Icon } from '@iconify/vue'\nimport type { MenuOption } from 'naive-ui/es'\nimport type { RouteItem } from './types'\n\n/**\n * 菜单适配器配置\n */\nexport interface MenuAdapterConfig {\n /**\n * 标签文本格式化函数(用于 i18n)\n * 默认:原样返回 title\n */\n labelFormatter?: (title: string) => string\n\n /**\n * 获取菜单项的唯一 key\n * 默认:`normalizePath(route.path)`\n */\n getKey?: (route: RouteItem) => string\n\n /**\n * 获取显示文本\n * 默认:`route.meta?.title || route.name || ''`\n */\n getLabel?: (route: RouteItem) => string\n\n /**\n * 路由过滤器 — return false 排除该项\n * 默认:排除 `meta.hidden === true`\n */\n filter?: (route: RouteItem) => boolean\n\n /**\n * 自定义图标渲染\n * 默认:字符串 → Iconify Icon;函数 → 直接调用\n */\n renderIcon?: (\n icon: string | (() => VNode) | undefined\n ) => (() => VNode) | undefined\n\n /**\n * 是否递归处理 children\n * 默认:true\n */\n recursive?: boolean\n}\n\n// ====== 内置默认值 ======\n\nconst normalizePath = (path: string): string =>\n path.startsWith('/') ? path : `/${path}`\n\nconst defaultGetKey = (route: RouteItem): string =>\n route.path ? normalizePath(route.path) : ''\n\nconst defaultGetLabel = (route: RouteItem): string =>\n route.meta?.title || route.name || ''\n\nconst defaultFilter = (route: RouteItem): boolean => !route.meta?.hidden\n\nconst defaultRenderIcon = (\n icon: string | (() => VNode) | undefined\n): (() => VNode) | undefined => {\n if (!icon) return undefined\n if (typeof icon === 'string') {\n return () =>\n h('span'
|
|
1
|
+
{"version":3,"file":"menuAdapter.js","names":[],"sources":["../src/components/_shared/menuAdapter.ts"],"sourcesContent":["/**\r\n * 菜单适配器 — 将路由数据转换为 NMenu 的 MenuOption[]\r\n *\r\n * 设计理念:\r\n * - 开箱即用:`createMenuOptions(routes)` 零配置即可生成菜单\r\n * - 完全可控:通过 `MenuAdapterConfig` 定制每一步转换逻辑\r\n * - i18n 解耦:`labelFormatter` 回调注入翻译函数,不绑定任何 i18n 方案\r\n *\r\n * @example 基础用法\r\n * ```ts\r\n * import { createMenuOptions } from '@robot-admin/naive-ui-components'\r\n *\r\n * const menuOptions = createMenuOptions(routes)\r\n * ```\r\n *\r\n * @example 带 i18n + 过滤\r\n * ```ts\r\n * const menuOptions = createMenuOptions(routes, {\r\n * labelFormatter: t, // vue-i18n 的 t 函数\r\n * filter: route => !route.meta?.hidden,\r\n * })\r\n * ```\r\n *\r\n * @example 自定义 key 取值\r\n * ```ts\r\n * const menuOptions = createMenuOptions(routes, {\r\n * getKey: route => route.name || route.path,\r\n * })\r\n * ```\r\n */\r\n\r\nimport { h, type VNode } from 'vue'\r\nimport { Icon } from '@iconify/vue'\r\nimport type { MenuOption } from 'naive-ui/es'\r\nimport type { RouteItem } from './types'\r\n\r\n/**\r\n * 菜单适配器配置\r\n */\r\nexport interface MenuAdapterConfig {\r\n /**\r\n * 标签文本格式化函数(用于 i18n)\r\n * 默认:原样返回 title\r\n */\r\n labelFormatter?: (title: string) => string\r\n\r\n /**\r\n * 获取菜单项的唯一 key\r\n * 默认:`normalizePath(route.path)`\r\n */\r\n getKey?: (route: RouteItem) => string\r\n\r\n /**\r\n * 获取显示文本\r\n * 默认:`route.meta?.title || route.name || ''`\r\n */\r\n getLabel?: (route: RouteItem) => string\r\n\r\n /**\r\n * 路由过滤器 — return false 排除该项\r\n * 默认:排除 `meta.hidden === true`\r\n */\r\n filter?: (route: RouteItem) => boolean\r\n\r\n /**\r\n * 自定义图标渲染\r\n * 默认:字符串 → Iconify Icon;函数 → 直接调用\r\n */\r\n renderIcon?: (\r\n icon: string | (() => VNode) | undefined\r\n ) => (() => VNode) | undefined\r\n\r\n /**\r\n * 是否递归处理 children\r\n * 默认:true\r\n */\r\n recursive?: boolean\r\n}\r\n\r\n// ====== 内置默认值 ======\r\n\r\nconst normalizePath = (path: string): string =>\r\n path.startsWith('/') ? path : `/${path}`\r\n\r\nconst defaultGetKey = (route: RouteItem): string =>\r\n route.path ? normalizePath(route.path) : ''\r\n\r\nconst defaultGetLabel = (route: RouteItem): string =>\r\n route.meta?.title || route.name || ''\r\n\r\nconst defaultFilter = (route: RouteItem): boolean => !route.meta?.hidden\r\n\r\nconst defaultRenderIcon = (\r\n icon: string | (() => VNode) | undefined\r\n): (() => VNode) | undefined => {\r\n if (!icon) return undefined\r\n if (typeof icon === 'string') {\r\n return () =>\r\n h(\r\n 'span',\r\n {\r\n class: 'n-icon',\r\n style: 'display: inline-flex; align-items: center;',\r\n },\r\n [h(Icon, { icon })]\r\n )\r\n }\r\n if (typeof icon === 'function') return icon\r\n return undefined\r\n}\r\n\r\n/**\r\n * 将路由数据转换为 NMenu 的 MenuOption[]\r\n *\r\n * 支持的输入格式:\r\n * 1. **Vue Router RouteRecordRaw** — 直接传 `router.getRoutes()` 或手写路由表\r\n * 2. **后端 JSON 路由表** — `{ path, meta: { title, icon }, children }`\r\n * 3. **自定义格式** — 通过 config 完全自定义 key/label/icon 的取值逻辑\r\n *\r\n * @param routes 路由数据数组\r\n * @param config 适配器配置\r\n * @returns NMenu 可直接使用的 MenuOption[]\r\n */\r\nexport function createMenuOptions(\r\n routes: RouteItem[],\r\n config: MenuAdapterConfig = {}\r\n): MenuOption[] {\r\n const {\r\n labelFormatter = (s: string) => s,\r\n getKey = defaultGetKey,\r\n getLabel = defaultGetLabel,\r\n filter = defaultFilter,\r\n renderIcon = defaultRenderIcon,\r\n recursive = true,\r\n } = config\r\n\r\n const convert = (items: RouteItem[]): MenuOption[] => {\r\n return items.filter(filter).map(item => {\r\n const icon = item.meta?.icon || (item as any).icon\r\n const children =\r\n recursive && item.children?.length ? convert(item.children) : undefined\r\n\r\n return {\r\n key: getKey(item),\r\n label: labelFormatter(getLabel(item)),\r\n disabled: item.disabled || false,\r\n icon: renderIcon(icon),\r\n ...(item.type && { type: item.type }),\r\n ...(children?.length && { children }),\r\n }\r\n }) as MenuOption[]\r\n }\r\n\r\n return convert(routes)\r\n}\r\n\r\n/**\r\n * 将路由树扁平化为一维数组(常用于搜索、快捷导航)\r\n *\r\n * @param routes 路由数据数组\r\n * @param filter 过滤器(默认排除 hidden)\r\n * @returns 扁平化后的路由数组\r\n */\r\nexport function flattenRoutes(\r\n routes: RouteItem[],\r\n filter: (route: RouteItem) => boolean = defaultFilter\r\n): RouteItem[] {\r\n const result: RouteItem[] = []\r\n const walk = (items: RouteItem[]) => {\r\n for (const item of items) {\r\n if (filter(item)) {\r\n result.push(item)\r\n }\r\n if (item.children?.length) {\r\n walk(item.children)\r\n }\r\n }\r\n }\r\n walk(routes)\r\n return result\r\n}\r\n"],"mappings":"4DAiFA,MAAM,EAAiB,GACrB,EAAK,WAAW,IAAI,CAAG,EAAO,IAAI,IAE9B,EAAiB,GACrB,EAAM,KAAO,EAAc,EAAM,KAAK,CAAG,GAErC,EAAmB,GACvB,EAAM,MAAM,OAAS,EAAM,MAAQ,GAE/B,EAAiB,GAA8B,CAAC,EAAM,MAAM,OAE5D,EACJ,GAC8B,CACzB,KACL,IAAI,OAAO,GAAS,SAClB,UACE,EACE,OACA,CACE,MAAO,SACP,MAAO,6CACR,CACD,CAAC,EAAE,EAAM,CAAE,OAAM,CAAC,CAAC,CACpB,CAEL,GAAI,OAAO,GAAS,WAAY,OAAO,IAgBzC,SAAgB,EACd,EACA,EAA4B,EAAE,CAChB,CACd,GAAM,CACJ,iBAAkB,GAAc,EAChC,SAAS,EACT,WAAW,EACX,SAAS,EACT,aAAa,EACb,YAAY,IACV,EAEE,EAAW,GACR,EAAM,OAAO,EAAO,CAAC,IAAI,GAAQ,CACtC,IAAM,EAAO,EAAK,MAAM,MAAS,EAAa,KACxC,EACJ,GAAa,EAAK,UAAU,OAAS,EAAQ,EAAK,SAAS,CAAG,IAAA,GAEhE,MAAO,CACL,IAAK,EAAO,EAAK,CACjB,MAAO,EAAe,EAAS,EAAK,CAAC,CACrC,SAAU,EAAK,UAAY,GAC3B,KAAM,EAAW,EAAK,CACtB,GAAI,EAAK,MAAQ,CAAE,KAAM,EAAK,KAAM,CACpC,GAAI,GAAU,QAAU,CAAE,WAAU,CACrC,EACD,CAGJ,OAAO,EAAQ,EAAO,CAUxB,SAAgB,EACd,EACA,EAAwC,EAC3B,CACb,IAAM,EAAsB,EAAE,CACxB,EAAQ,GAAuB,CACnC,IAAK,IAAM,KAAQ,EACb,EAAO,EAAK,EACd,EAAO,KAAK,EAAK,CAEf,EAAK,UAAU,QACjB,EAAK,EAAK,SAAS,EAKzB,OADA,EAAK,EAAO,CACL"}
|
package/dist/resolver.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.cjs","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["/**\n * @robot-admin/naive-ui-components Resolver\n * 用于 unplugin-vue-components 的自动导入解析器\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import Components from 'unplugin-vue-components/vite'\n * import { RobotNaiveUiResolver } from '@robot-admin/naive-ui-components/resolver'\n *\n * export default defineConfig({\n * plugins: [\n * Components({\n * resolvers: [RobotNaiveUiResolver()]\n * })\n * ]\n * })\n * ```\n */\n\nconst PKG_NAME = '@robot-admin/naive-ui-components'\n\n/** 组件库包含的所有组件名称 */\nexport const componentNames = [\n 'C_ActionBar',\n 'C_AntV',\n 'C_Barcode',\n 'C_Breadcrumb',\n 'C_Captcha',\n 'C_Cascade',\n 'C_City',\n 'C_Code',\n 'C_CollapsePanel',\n 'C_Cron',\n 'C_Date',\n 'C_Draggable',\n 'C_Editor',\n 'C_FilePreview',\n 'C_Form',\n 'C_FormSearch',\n 'C_FormulaEditor',\n 'C_FullCalendar',\n 'C_GlobalSearch',\n 'C_Guide',\n 'C_Icon',\n 'C_ImageCropper',\n 'C_Language',\n 'C_Map',\n 'C_Markdown',\n 'C_Menu',\n 'C_NotificationCenter',\n 'C_Progress',\n 'C_QRCode',\n 'C_Signature',\n 'C_SplitPane',\n 'C_Steps',\n 'C_Table',\n 'C_TagsView',\n 'C_Theme',\n 'C_Time',\n 'C_Tree',\n 'C_Upload',\n 'C_VideoPlayer',\n 'C_VtableGantt',\n 'C_WaterFall',\n 'C_WorkFlow',\n] as const\n\n/** 组件名称类型 */\nexport type ComponentName = (typeof componentNames)[number]\n\n/** 组件名称集合(快速查找) */\nconst componentSet = new Set<string>(componentNames)\n\nexport interface RobotNaiveUiResolverOptions {\n /**\n * 按需导入:从子路径解析单个组件,减少打包体积\n * - false (默认): `import { C_Form } from '@robot-admin/naive-ui-components'`\n * - true: `import { C_Form } from '@robot-admin/naive-ui-components/C_Form'`\n */\n importOnDemand?: boolean\n /**\n * 按需导入组件样式(仅在 importOnDemand 为 true 时生效)\n * - false (默认): 需手动导入 style.css 全量样式\n * - true: 自动导入对应组件的独立样式 `@robot-admin/naive-ui-components/C_Form/style.css`\n */\n importStyle?: boolean\n}\n\n/**\n * @robot-admin/naive-ui-components 组件自动导入解析器\n *\n * 匹配组件库中所有 C_ 前缀的组件,自动解析导入路径。\n * 类似于 NaiveUiResolver、ElementPlusResolver 等成熟解析器的设计。\n */\nexport function RobotNaiveUiResolver(\n options: RobotNaiveUiResolverOptions = {}\n) {\n const { importOnDemand = false, importStyle = false } = options\n\n return {\n type: 'component' as const,\n resolve: (name: string) => {\n if (componentSet.has(name)) {\n const from = importOnDemand ? `${PKG_NAME}/${name}` : PKG_NAME\n const sideEffects =\n importOnDemand && importStyle\n ? `${PKG_NAME}/${name}/style.css`\n : undefined\n return {\n name,\n from,\n sideEffects,\n }\n }\n },\n }\n}\n"],"mappings":"mEAoBA,MAAM,EAAW,mCAGJ,EAAiB,0cA2C7B,CAMK,EAAe,IAAI,IAAY,EAAe,CAuBpD,SAAgB,EACd,EAAuC,EAAE,CACzC,CACA,GAAM,CAAE,iBAAiB,GAAO,cAAc,IAAU,EAExD,MAAO,CACL,KAAM,YACN,QAAU,GAAiB,CACzB,GAAI,EAAa,IAAI,EAAK,CAMxB,MAAO,CACL,OACA,KAPW,EAAiB,GAAG,EAAS,GAAG,IAAS,EAQpD,YANA,GAAkB,EACd,GAAG,EAAS,GAAG,EAAK,YACpB,IAAA,GAKL,EAGN"}
|
|
1
|
+
{"version":3,"file":"resolver.cjs","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["/**\r\n * @robot-admin/naive-ui-components Resolver\r\n * 用于 unplugin-vue-components 的自动导入解析器\r\n *\r\n * @example\r\n * ```ts\r\n * // vite.config.ts\r\n * import Components from 'unplugin-vue-components/vite'\r\n * import { RobotNaiveUiResolver } from '@robot-admin/naive-ui-components/resolver'\r\n *\r\n * export default defineConfig({\r\n * plugins: [\r\n * Components({\r\n * resolvers: [RobotNaiveUiResolver()]\r\n * })\r\n * ]\r\n * })\r\n * ```\r\n */\r\n\r\nconst PKG_NAME = '@robot-admin/naive-ui-components'\r\n\r\n/** 组件库包含的所有组件名称 */\r\nexport const componentNames = [\r\n 'C_ActionBar',\r\n 'C_AntV',\r\n 'C_Barcode',\r\n 'C_Breadcrumb',\r\n 'C_Captcha',\r\n 'C_Cascade',\r\n 'C_City',\r\n 'C_Code',\r\n 'C_CollapsePanel',\r\n 'C_Cron',\r\n 'C_Date',\r\n 'C_Draggable',\r\n 'C_Editor',\r\n 'C_FilePreview',\r\n 'C_Form',\r\n 'C_FormSearch',\r\n 'C_FormulaEditor',\r\n 'C_FullCalendar',\r\n 'C_GlobalSearch',\r\n 'C_Guide',\r\n 'C_Icon',\r\n 'C_ImageCropper',\r\n 'C_Language',\r\n 'C_Map',\r\n 'C_Markdown',\r\n 'C_Menu',\r\n 'C_NotificationCenter',\r\n 'C_Progress',\r\n 'C_QRCode',\r\n 'C_Signature',\r\n 'C_SplitPane',\r\n 'C_Steps',\r\n 'C_Table',\r\n 'C_TagsView',\r\n 'C_Theme',\r\n 'C_Time',\r\n 'C_Tree',\r\n 'C_Upload',\r\n 'C_VideoPlayer',\r\n 'C_VtableGantt',\r\n 'C_WaterFall',\r\n 'C_WorkFlow',\r\n] as const\r\n\r\n/** 组件名称类型 */\r\nexport type ComponentName = (typeof componentNames)[number]\r\n\r\n/** 组件名称集合(快速查找) */\r\nconst componentSet = new Set<string>(componentNames)\r\n\r\nexport interface RobotNaiveUiResolverOptions {\r\n /**\r\n * 按需导入:从子路径解析单个组件,减少打包体积\r\n * - false (默认): `import { C_Form } from '@robot-admin/naive-ui-components'`\r\n * - true: `import { C_Form } from '@robot-admin/naive-ui-components/C_Form'`\r\n */\r\n importOnDemand?: boolean\r\n /**\r\n * 按需导入组件样式(仅在 importOnDemand 为 true 时生效)\r\n * - false (默认): 需手动导入 style.css 全量样式\r\n * - true: 自动导入对应组件的独立样式 `@robot-admin/naive-ui-components/C_Form/style.css`\r\n */\r\n importStyle?: boolean\r\n}\r\n\r\n/**\r\n * @robot-admin/naive-ui-components 组件自动导入解析器\r\n *\r\n * 匹配组件库中所有 C_ 前缀的组件,自动解析导入路径。\r\n * 类似于 NaiveUiResolver、ElementPlusResolver 等成熟解析器的设计。\r\n */\r\nexport function RobotNaiveUiResolver(\r\n options: RobotNaiveUiResolverOptions = {}\r\n) {\r\n const { importOnDemand = false, importStyle = false } = options\r\n\r\n return {\r\n type: 'component' as const,\r\n resolve: (name: string) => {\r\n if (componentSet.has(name)) {\r\n const from = importOnDemand ? `${PKG_NAME}/${name}` : PKG_NAME\r\n const sideEffects =\r\n importOnDemand && importStyle\r\n ? `${PKG_NAME}/${name}/style.css`\r\n : undefined\r\n return {\r\n name,\r\n from,\r\n sideEffects,\r\n }\r\n }\r\n },\r\n }\r\n}\r\n"],"mappings":"mEAoBA,MAAM,EAAW,mCAGJ,EAAiB,0cA2C7B,CAMK,EAAe,IAAI,IAAY,EAAe,CAuBpD,SAAgB,EACd,EAAuC,EAAE,CACzC,CACA,GAAM,CAAE,iBAAiB,GAAO,cAAc,IAAU,EAExD,MAAO,CACL,KAAM,YACN,QAAU,GAAiB,CACzB,GAAI,EAAa,IAAI,EAAK,CAMxB,MAAO,CACL,OACA,KAPW,EAAiB,GAAG,EAAS,GAAG,IAAS,EAQpD,YANA,GAAkB,EACd,GAAG,EAAS,GAAG,EAAK,YACpB,IAAA,GAKL,EAGN"}
|
package/dist/resolver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.js","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["/**\n * @robot-admin/naive-ui-components Resolver\n * 用于 unplugin-vue-components 的自动导入解析器\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import Components from 'unplugin-vue-components/vite'\n * import { RobotNaiveUiResolver } from '@robot-admin/naive-ui-components/resolver'\n *\n * export default defineConfig({\n * plugins: [\n * Components({\n * resolvers: [RobotNaiveUiResolver()]\n * })\n * ]\n * })\n * ```\n */\n\nconst PKG_NAME = '@robot-admin/naive-ui-components'\n\n/** 组件库包含的所有组件名称 */\nexport const componentNames = [\n 'C_ActionBar',\n 'C_AntV',\n 'C_Barcode',\n 'C_Breadcrumb',\n 'C_Captcha',\n 'C_Cascade',\n 'C_City',\n 'C_Code',\n 'C_CollapsePanel',\n 'C_Cron',\n 'C_Date',\n 'C_Draggable',\n 'C_Editor',\n 'C_FilePreview',\n 'C_Form',\n 'C_FormSearch',\n 'C_FormulaEditor',\n 'C_FullCalendar',\n 'C_GlobalSearch',\n 'C_Guide',\n 'C_Icon',\n 'C_ImageCropper',\n 'C_Language',\n 'C_Map',\n 'C_Markdown',\n 'C_Menu',\n 'C_NotificationCenter',\n 'C_Progress',\n 'C_QRCode',\n 'C_Signature',\n 'C_SplitPane',\n 'C_Steps',\n 'C_Table',\n 'C_TagsView',\n 'C_Theme',\n 'C_Time',\n 'C_Tree',\n 'C_Upload',\n 'C_VideoPlayer',\n 'C_VtableGantt',\n 'C_WaterFall',\n 'C_WorkFlow',\n] as const\n\n/** 组件名称类型 */\nexport type ComponentName = (typeof componentNames)[number]\n\n/** 组件名称集合(快速查找) */\nconst componentSet = new Set<string>(componentNames)\n\nexport interface RobotNaiveUiResolverOptions {\n /**\n * 按需导入:从子路径解析单个组件,减少打包体积\n * - false (默认): `import { C_Form } from '@robot-admin/naive-ui-components'`\n * - true: `import { C_Form } from '@robot-admin/naive-ui-components/C_Form'`\n */\n importOnDemand?: boolean\n /**\n * 按需导入组件样式(仅在 importOnDemand 为 true 时生效)\n * - false (默认): 需手动导入 style.css 全量样式\n * - true: 自动导入对应组件的独立样式 `@robot-admin/naive-ui-components/C_Form/style.css`\n */\n importStyle?: boolean\n}\n\n/**\n * @robot-admin/naive-ui-components 组件自动导入解析器\n *\n * 匹配组件库中所有 C_ 前缀的组件,自动解析导入路径。\n * 类似于 NaiveUiResolver、ElementPlusResolver 等成熟解析器的设计。\n */\nexport function RobotNaiveUiResolver(\n options: RobotNaiveUiResolverOptions = {}\n) {\n const { importOnDemand = false, importStyle = false } = options\n\n return {\n type: 'component' as const,\n resolve: (name: string) => {\n if (componentSet.has(name)) {\n const from = importOnDemand ? `${PKG_NAME}/${name}` : PKG_NAME\n const sideEffects =\n importOnDemand && importStyle\n ? `${PKG_NAME}/${name}/style.css`\n : undefined\n return {\n name,\n from,\n sideEffects,\n }\n }\n },\n }\n}\n"],"mappings":"AAoBA,MAAM,EAAW,mCAGJ,EAAiB,0cA2C7B,CAMK,EAAe,IAAI,IAAY,EAAe,CAuBpD,SAAgB,EACd,EAAuC,EAAE,CACzC,CACA,GAAM,CAAE,iBAAiB,GAAO,cAAc,IAAU,EAExD,MAAO,CACL,KAAM,YACN,QAAU,GAAiB,CACzB,GAAI,EAAa,IAAI,EAAK,CAMxB,MAAO,CACL,OACA,KAPW,EAAiB,GAAG,EAAS,GAAG,IAAS,EAQpD,YANA,GAAkB,EACd,GAAG,EAAS,GAAG,EAAK,YACpB,IAAA,GAKL,EAGN"}
|
|
1
|
+
{"version":3,"file":"resolver.js","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["/**\r\n * @robot-admin/naive-ui-components Resolver\r\n * 用于 unplugin-vue-components 的自动导入解析器\r\n *\r\n * @example\r\n * ```ts\r\n * // vite.config.ts\r\n * import Components from 'unplugin-vue-components/vite'\r\n * import { RobotNaiveUiResolver } from '@robot-admin/naive-ui-components/resolver'\r\n *\r\n * export default defineConfig({\r\n * plugins: [\r\n * Components({\r\n * resolvers: [RobotNaiveUiResolver()]\r\n * })\r\n * ]\r\n * })\r\n * ```\r\n */\r\n\r\nconst PKG_NAME = '@robot-admin/naive-ui-components'\r\n\r\n/** 组件库包含的所有组件名称 */\r\nexport const componentNames = [\r\n 'C_ActionBar',\r\n 'C_AntV',\r\n 'C_Barcode',\r\n 'C_Breadcrumb',\r\n 'C_Captcha',\r\n 'C_Cascade',\r\n 'C_City',\r\n 'C_Code',\r\n 'C_CollapsePanel',\r\n 'C_Cron',\r\n 'C_Date',\r\n 'C_Draggable',\r\n 'C_Editor',\r\n 'C_FilePreview',\r\n 'C_Form',\r\n 'C_FormSearch',\r\n 'C_FormulaEditor',\r\n 'C_FullCalendar',\r\n 'C_GlobalSearch',\r\n 'C_Guide',\r\n 'C_Icon',\r\n 'C_ImageCropper',\r\n 'C_Language',\r\n 'C_Map',\r\n 'C_Markdown',\r\n 'C_Menu',\r\n 'C_NotificationCenter',\r\n 'C_Progress',\r\n 'C_QRCode',\r\n 'C_Signature',\r\n 'C_SplitPane',\r\n 'C_Steps',\r\n 'C_Table',\r\n 'C_TagsView',\r\n 'C_Theme',\r\n 'C_Time',\r\n 'C_Tree',\r\n 'C_Upload',\r\n 'C_VideoPlayer',\r\n 'C_VtableGantt',\r\n 'C_WaterFall',\r\n 'C_WorkFlow',\r\n] as const\r\n\r\n/** 组件名称类型 */\r\nexport type ComponentName = (typeof componentNames)[number]\r\n\r\n/** 组件名称集合(快速查找) */\r\nconst componentSet = new Set<string>(componentNames)\r\n\r\nexport interface RobotNaiveUiResolverOptions {\r\n /**\r\n * 按需导入:从子路径解析单个组件,减少打包体积\r\n * - false (默认): `import { C_Form } from '@robot-admin/naive-ui-components'`\r\n * - true: `import { C_Form } from '@robot-admin/naive-ui-components/C_Form'`\r\n */\r\n importOnDemand?: boolean\r\n /**\r\n * 按需导入组件样式(仅在 importOnDemand 为 true 时生效)\r\n * - false (默认): 需手动导入 style.css 全量样式\r\n * - true: 自动导入对应组件的独立样式 `@robot-admin/naive-ui-components/C_Form/style.css`\r\n */\r\n importStyle?: boolean\r\n}\r\n\r\n/**\r\n * @robot-admin/naive-ui-components 组件自动导入解析器\r\n *\r\n * 匹配组件库中所有 C_ 前缀的组件,自动解析导入路径。\r\n * 类似于 NaiveUiResolver、ElementPlusResolver 等成熟解析器的设计。\r\n */\r\nexport function RobotNaiveUiResolver(\r\n options: RobotNaiveUiResolverOptions = {}\r\n) {\r\n const { importOnDemand = false, importStyle = false } = options\r\n\r\n return {\r\n type: 'component' as const,\r\n resolve: (name: string) => {\r\n if (componentSet.has(name)) {\r\n const from = importOnDemand ? `${PKG_NAME}/${name}` : PKG_NAME\r\n const sideEffects =\r\n importOnDemand && importStyle\r\n ? `${PKG_NAME}/${name}/style.css`\r\n : undefined\r\n return {\r\n name,\r\n from,\r\n sideEffects,\r\n }\r\n }\r\n },\r\n }\r\n}\r\n"],"mappings":"AAoBA,MAAM,EAAW,mCAGJ,EAAiB,0cA2C7B,CAMK,EAAe,IAAI,IAAY,EAAe,CAuBpD,SAAgB,EACd,EAAuC,EAAE,CACzC,CACA,GAAM,CAAE,iBAAiB,GAAO,cAAc,IAAU,EAExD,MAAO,CACL,KAAM,YACN,QAAU,GAAiB,CACzB,GAAI,EAAa,IAAI,EAAK,CAMxB,MAAO,CACL,OACA,KAPW,EAAiB,GAAG,EAAS,GAAG,IAAS,EAQpD,YANA,GAAkB,EACd,GAAG,EAAS,GAAG,EAAK,YACpB,IAAA,GAKL,EAGN"}
|
package/dist/style.css
CHANGED
|
@@ -6229,12 +6229,12 @@ to {
|
|
|
6229
6229
|
|
|
6230
6230
|
/*# sourceMappingURL=C_Table-vZlcgH6x.css.map*/
|
|
6231
6231
|
|
|
6232
|
-
/* --- C_TagsView-
|
|
6232
|
+
/* --- C_TagsView-BsutyC3U.css --- */
|
|
6233
6233
|
/* unplugin-vue-components disabled *//* ===========================================
|
|
6234
6234
|
* 标签组件样式 - 精简版
|
|
6235
6235
|
* =========================================== */
|
|
6236
6236
|
/* --------- 标签视图容器 --------- */
|
|
6237
|
-
.tags-view-container[data-v-
|
|
6237
|
+
.tags-view-container[data-v-6da69cfa] {
|
|
6238
6238
|
border-bottom: 1px solid var(--color-border);
|
|
6239
6239
|
padding: 8px 16px 0;
|
|
6240
6240
|
position: relative;
|
|
@@ -6242,14 +6242,14 @@ to {
|
|
|
6242
6242
|
}
|
|
6243
6243
|
|
|
6244
6244
|
/* --------- 滚动轨道容器 --------- */
|
|
6245
|
-
.tags-track[data-v-
|
|
6245
|
+
.tags-track[data-v-6da69cfa] {
|
|
6246
6246
|
width: 100%;
|
|
6247
6247
|
overflow: hidden;
|
|
6248
6248
|
position: relative;
|
|
6249
6249
|
}
|
|
6250
6250
|
|
|
6251
6251
|
/* --------- 滚动容器 --------- */
|
|
6252
|
-
.tags-container[data-v-
|
|
6252
|
+
.tags-container[data-v-6da69cfa] {
|
|
6253
6253
|
display: flex;
|
|
6254
6254
|
overflow-x: auto;
|
|
6255
6255
|
overflow-y: hidden;
|
|
@@ -6259,12 +6259,12 @@ to {
|
|
|
6259
6259
|
align-items: center;
|
|
6260
6260
|
min-height: 40px;
|
|
6261
6261
|
}
|
|
6262
|
-
.tags-container[data-v-
|
|
6262
|
+
.tags-container[data-v-6da69cfa]::-webkit-scrollbar {
|
|
6263
6263
|
display: none;
|
|
6264
6264
|
}
|
|
6265
6265
|
|
|
6266
6266
|
/* --------- 现代化标签样式 --------- */
|
|
6267
|
-
.n-tag[data-v-
|
|
6267
|
+
.n-tag[data-v-6da69cfa] {
|
|
6268
6268
|
position: relative;
|
|
6269
6269
|
display: inline-flex;
|
|
6270
6270
|
align-items: center;
|
|
@@ -6284,7 +6284,7 @@ to {
|
|
|
6284
6284
|
/* --------- 激活状态 --------- */
|
|
6285
6285
|
/* --------- 关闭按钮 --------- */
|
|
6286
6286
|
}
|
|
6287
|
-
.n-tag[data-v-
|
|
6287
|
+
.n-tag[data-v-6da69cfa]::before {
|
|
6288
6288
|
content: "";
|
|
6289
6289
|
position: absolute;
|
|
6290
6290
|
top: 1px;
|
|
@@ -6296,58 +6296,58 @@ to {
|
|
|
6296
6296
|
opacity: 0.5;
|
|
6297
6297
|
transition: opacity 0.22s ease;
|
|
6298
6298
|
}
|
|
6299
|
-
.n-tag[data-v-
|
|
6299
|
+
.n-tag[data-v-6da69cfa]:hover:not([type=primary]) {
|
|
6300
6300
|
color: var(--color-primary) !important;
|
|
6301
6301
|
border-color: var(--color-primary);
|
|
6302
6302
|
transform: scale(1.02);
|
|
6303
6303
|
}
|
|
6304
|
-
.n-tag[data-v-
|
|
6304
|
+
.n-tag[data-v-6da69cfa]:hover:not([type=primary])::before {
|
|
6305
6305
|
opacity: 0.8;
|
|
6306
6306
|
}
|
|
6307
|
-
.n-tag[data-v-
|
|
6308
|
-
.n-tag[data-v-
|
|
6307
|
+
.n-tag[data-v-6da69cfa]:hover:not([type=primary]) .c-icon,
|
|
6308
|
+
.n-tag[data-v-6da69cfa]:hover:not([type=primary]) [class*="c-icon"] {
|
|
6309
6309
|
color: var(--color-primary) !important;
|
|
6310
6310
|
}
|
|
6311
|
-
.n-tag:hover:not([type=primary]) i[data-v-
|
|
6312
|
-
.n-tag:hover:not([type=primary]) .icon[data-v-
|
|
6311
|
+
.n-tag:hover:not([type=primary]) i[data-v-6da69cfa],
|
|
6312
|
+
.n-tag:hover:not([type=primary]) .icon[data-v-6da69cfa] {
|
|
6313
6313
|
color: var(--color-primary) !important;
|
|
6314
6314
|
}
|
|
6315
|
-
.n-tag[data-v-
|
|
6315
|
+
.n-tag[data-v-6da69cfa]:hover:not([type=primary]) .n-tag__close {
|
|
6316
6316
|
color: var(--color-primary) !important;
|
|
6317
6317
|
opacity: 0.8;
|
|
6318
6318
|
transform: scale(1.05);
|
|
6319
6319
|
}
|
|
6320
|
-
.n-tag[type=primary][data-v-
|
|
6320
|
+
.n-tag[type=primary][data-v-6da69cfa] {
|
|
6321
6321
|
background: var(--tag-active-bg, rgba(32, 128, 240, 0.08)) !important;
|
|
6322
6322
|
color: var(--color-primary) !important;
|
|
6323
6323
|
border-color: var(--color-primary) !important;
|
|
6324
6324
|
font-weight: 600;
|
|
6325
6325
|
transform: scale(1.02);
|
|
6326
6326
|
}
|
|
6327
|
-
.n-tag[type=primary][data-v-
|
|
6327
|
+
.n-tag[type=primary][data-v-6da69cfa]::before {
|
|
6328
6328
|
opacity: 0.6;
|
|
6329
6329
|
}
|
|
6330
|
-
.n-tag[type=primary][data-v-
|
|
6331
|
-
.n-tag[type=primary][data-v-
|
|
6330
|
+
.n-tag[type=primary][data-v-6da69cfa] .n-tag__content,
|
|
6331
|
+
.n-tag[type=primary][data-v-6da69cfa] *:not(.n-tag__close) {
|
|
6332
6332
|
color: var(--color-primary) !important;
|
|
6333
6333
|
}
|
|
6334
|
-
.n-tag[type=primary][data-v-
|
|
6335
|
-
.n-tag[type=primary][data-v-
|
|
6334
|
+
.n-tag[type=primary][data-v-6da69cfa] .c-icon,
|
|
6335
|
+
.n-tag[type=primary][data-v-6da69cfa] [class*="c-icon"] {
|
|
6336
6336
|
color: var(--color-primary) !important;
|
|
6337
6337
|
}
|
|
6338
|
-
.n-tag[type=primary] i[data-v-
|
|
6339
|
-
.n-tag[type=primary] .icon[data-v-
|
|
6338
|
+
.n-tag[type=primary] i[data-v-6da69cfa],
|
|
6339
|
+
.n-tag[type=primary] .icon[data-v-6da69cfa] {
|
|
6340
6340
|
color: var(--color-primary) !important;
|
|
6341
6341
|
}
|
|
6342
|
-
.n-tag[type=primary][data-v-
|
|
6342
|
+
.n-tag[type=primary][data-v-6da69cfa]:hover {
|
|
6343
6343
|
background: var(--tag-active-hover-bg, rgba(32, 128, 240, 0.12)) !important;
|
|
6344
6344
|
transform: scale(1.03);
|
|
6345
6345
|
}
|
|
6346
|
-
.n-tag[type=primary][data-v-
|
|
6346
|
+
.n-tag[type=primary][data-v-6da69cfa] .n-tag__close {
|
|
6347
6347
|
color: var(--color-primary) !important;
|
|
6348
6348
|
opacity: 0.8;
|
|
6349
6349
|
}
|
|
6350
|
-
.n-tag[data-v-
|
|
6350
|
+
.n-tag[data-v-6da69cfa] .n-tag__close {
|
|
6351
6351
|
width: 16px !important;
|
|
6352
6352
|
height: 16px !important;
|
|
6353
6353
|
border-radius: 8px !important;
|
|
@@ -6362,10 +6362,10 @@ to {
|
|
|
6362
6362
|
background: rgba(0, 0, 0, 0.02) !important;
|
|
6363
6363
|
border: 1px solid transparent;
|
|
6364
6364
|
}
|
|
6365
|
-
.n-tag[data-v-
|
|
6365
|
+
.n-tag[data-v-6da69cfa] .n-tag__close:not(:hover) {
|
|
6366
6366
|
transform: scale(0.9);
|
|
6367
6367
|
}
|
|
6368
|
-
.n-tag[data-v-
|
|
6368
|
+
.n-tag[data-v-6da69cfa] .n-tag__close:hover {
|
|
6369
6369
|
background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), rgba(239, 68, 68, 0.08)) !important;
|
|
6370
6370
|
border-color: rgba(239, 68, 68, 0.15) !important;
|
|
6371
6371
|
color: #ef4444 !important;
|
|
@@ -6373,13 +6373,13 @@ to {
|
|
|
6373
6373
|
transform: scale(0.6) !important;
|
|
6374
6374
|
box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2) !important;
|
|
6375
6375
|
}
|
|
6376
|
-
.n-tag[data-v-
|
|
6376
|
+
.n-tag[data-v-6da69cfa] .n-tag__close:active {
|
|
6377
6377
|
transform: scale(0.95) !important;
|
|
6378
6378
|
transition-duration: 0.1s !important;
|
|
6379
6379
|
}
|
|
6380
6380
|
|
|
6381
6381
|
/* --------- C_Icon --------- */
|
|
6382
|
-
[data-v-
|
|
6382
|
+
[data-v-6da69cfa] .c-icon {
|
|
6383
6383
|
margin-right: 4px;
|
|
6384
6384
|
font-size: 12px;
|
|
6385
6385
|
transition: color 0.22s ease;
|
|
@@ -6389,41 +6389,41 @@ to {
|
|
|
6389
6389
|
|
|
6390
6390
|
/* --------- 响应式 --------- */
|
|
6391
6391
|
@media (max-width: 768px) {
|
|
6392
|
-
.tags-view-container[data-v-
|
|
6392
|
+
.tags-view-container[data-v-6da69cfa] {
|
|
6393
6393
|
padding: 6px 12px 0;
|
|
6394
6394
|
}
|
|
6395
|
-
.n-tag[data-v-
|
|
6395
|
+
.n-tag[data-v-6da69cfa] {
|
|
6396
6396
|
height: 26px;
|
|
6397
6397
|
padding: 0 10px;
|
|
6398
6398
|
font-size: 11px;
|
|
6399
6399
|
margin-right: 3px;
|
|
6400
6400
|
border-radius: 13px;
|
|
6401
6401
|
}
|
|
6402
|
-
.n-tag[data-v-
|
|
6402
|
+
.n-tag[data-v-6da69cfa] .n-tag__close {
|
|
6403
6403
|
width: 14px;
|
|
6404
6404
|
height: 14px;
|
|
6405
6405
|
font-size: 11px;
|
|
6406
6406
|
margin-left: 4px;
|
|
6407
6407
|
}
|
|
6408
|
-
.tags-container[data-v-
|
|
6408
|
+
.tags-container[data-v-6da69cfa] {
|
|
6409
6409
|
padding: 0 12px;
|
|
6410
6410
|
min-height: 36px;
|
|
6411
6411
|
}
|
|
6412
|
-
[data-v-
|
|
6412
|
+
[data-v-6da69cfa] .c-icon {
|
|
6413
6413
|
font-size: 11px;
|
|
6414
6414
|
margin-right: 3px;
|
|
6415
6415
|
}
|
|
6416
6416
|
}
|
|
6417
6417
|
/* --------- 暗色主题 --------- */
|
|
6418
|
-
[data-theme=dark] .n-tag[data-v-
|
|
6418
|
+
[data-theme=dark] .n-tag[data-v-6da69cfa] .n-tag__close {
|
|
6419
6419
|
background: rgba(255, 255, 255, 0.03) !important;
|
|
6420
6420
|
}
|
|
6421
|
-
[data-theme=dark] .n-tag[data-v-
|
|
6421
|
+
[data-theme=dark] .n-tag[data-v-6da69cfa] .n-tag__close:hover {
|
|
6422
6422
|
background: linear-gradient(135deg, rgba(248, 113, 113, 0.12), rgba(239, 68, 68, 0.1)) !important;
|
|
6423
6423
|
box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
|
|
6424
6424
|
}
|
|
6425
6425
|
|
|
6426
|
-
/*# sourceMappingURL=C_TagsView-
|
|
6426
|
+
/*# sourceMappingURL=C_TagsView-BsutyC3U.css.map*/
|
|
6427
6427
|
|
|
6428
6428
|
/* --- C_Time-Bd_e1YDN.css --- */
|
|
6429
6429
|
/* unplugin-vue-components disabled *//* 时间选择器组件样式 */
|
|
@@ -69,22 +69,22 @@ declare var __VLS_7: `header-${string}`, __VLS_8: {
|
|
|
69
69
|
type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any } & { [K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any } & { [K in NonNullable<typeof __VLS_31>]?: (props: typeof __VLS_32) => any };
|
|
70
70
|
declare const __VLS_base: vue.DefineComponent<Props, CollapsePanelExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
71
71
|
change: (activeKeys: string[]) => any;
|
|
72
|
+
collapse: (key: string) => any;
|
|
72
73
|
"update:activeKeys": (keys: string[]) => any;
|
|
73
74
|
expand: (key: string) => any;
|
|
74
|
-
collapse: (key: string) => any;
|
|
75
75
|
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
76
76
|
onChange?: ((activeKeys: string[]) => any) | undefined;
|
|
77
|
+
onCollapse?: ((key: string) => any) | undefined;
|
|
77
78
|
"onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
|
|
78
79
|
onExpand?: ((key: string) => any) | undefined;
|
|
79
|
-
onCollapse?: ((key: string) => any) | undefined;
|
|
80
80
|
}>, {
|
|
81
|
+
bordered: boolean;
|
|
82
|
+
persistKey: string;
|
|
81
83
|
activeKeys: string[];
|
|
82
84
|
defaultActiveKeys: string[];
|
|
83
85
|
accordion: boolean;
|
|
84
86
|
variant: CollapsePanelVariant;
|
|
85
87
|
expandIconPosition: ExpandIconPosition;
|
|
86
|
-
bordered: boolean;
|
|
87
|
-
persistKey: string;
|
|
88
88
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
89
89
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
90
90
|
declare const _default: typeof __VLS_export;
|
package/dist/useCropperCore.d.ts
CHANGED
|
@@ -52,23 +52,23 @@ interface ImageCropperEmits {
|
|
|
52
52
|
//#region src/components/C_ImageCropper/index.vue.d.ts
|
|
53
53
|
declare const __VLS_export: vue.DefineComponent<ImageCropperProps, ImageCropperExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
54
54
|
error: (error: Event) => any;
|
|
55
|
+
cancel: () => any;
|
|
55
56
|
ready: () => any;
|
|
56
57
|
crop: (result: any) => any;
|
|
57
58
|
confirm: (result: any) => any;
|
|
58
|
-
cancel: () => any;
|
|
59
59
|
}, string, vue.PublicProps, Readonly<ImageCropperProps> & Readonly<{
|
|
60
60
|
onError?: ((error: Event) => any) | undefined;
|
|
61
|
+
onCancel?: (() => any) | undefined;
|
|
61
62
|
onReady?: (() => any) | undefined;
|
|
62
63
|
onCrop?: ((result: any) => any) | undefined;
|
|
63
64
|
onConfirm?: ((result: any) => any) | undefined;
|
|
64
|
-
onCancel?: (() => any) | undefined;
|
|
65
65
|
}>, {
|
|
66
66
|
height: string | number;
|
|
67
67
|
disabled: boolean;
|
|
68
|
-
|
|
68
|
+
aspectRatio: number;
|
|
69
69
|
showPreview: boolean;
|
|
70
|
+
showToolbar: boolean;
|
|
70
71
|
src: string;
|
|
71
|
-
aspectRatio: number;
|
|
72
72
|
outputFormat: CropOutputFormat;
|
|
73
73
|
outputQuality: number;
|
|
74
74
|
maxOutputWidth: number;
|
|
@@ -117,10 +117,17 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
|
|
|
117
117
|
"onList-change"?: ((list: DraggableItem[]) => any) | undefined;
|
|
118
118
|
}>, {
|
|
119
119
|
sort: boolean;
|
|
120
|
-
modelValue: DraggableItem[];
|
|
121
120
|
disabled: boolean;
|
|
121
|
+
modelValue: DraggableItem[];
|
|
122
|
+
layout: LayoutMode;
|
|
122
123
|
group: string | GroupOptions;
|
|
124
|
+
alignItems: AlignItems;
|
|
125
|
+
direction: "vertical" | "horizontal";
|
|
126
|
+
flexWrap: boolean;
|
|
127
|
+
justifyContent: JustifyContent;
|
|
123
128
|
animation: number;
|
|
129
|
+
gap: string | number;
|
|
130
|
+
itemClass: string;
|
|
124
131
|
delay: number;
|
|
125
132
|
handle: string;
|
|
126
133
|
showHandle: boolean;
|
|
@@ -129,19 +136,12 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
|
|
|
129
136
|
dragClass: string;
|
|
130
137
|
wrapperClass: string;
|
|
131
138
|
listClass: string;
|
|
132
|
-
itemClass: string;
|
|
133
139
|
showEmptyState: boolean;
|
|
134
140
|
emptyText: string;
|
|
135
141
|
swapThreshold: number;
|
|
136
142
|
invertSwap: boolean;
|
|
137
|
-
direction: "vertical" | "horizontal";
|
|
138
|
-
layout: LayoutMode;
|
|
139
143
|
gridColumns: number;
|
|
140
144
|
gridRows: number;
|
|
141
|
-
gap: string | number;
|
|
142
|
-
flexWrap: boolean;
|
|
143
|
-
justifyContent: JustifyContent;
|
|
144
|
-
alignItems: AlignItems;
|
|
145
145
|
customStyles: Record<string, string | number>;
|
|
146
146
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
147
147
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|