@veltra/desktop 1.2.31 → 1.2.33
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/dist/components/action/action-group.vue.d.ts +1 -1
- package/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/auto-complete/auto-complete.vue.d.ts +1 -1
- package/dist/components/batch-edit/batch-edit.vue.d.ts +8 -8
- package/dist/components/batch-edit/use-handlers.js +3 -1
- package/dist/components/batch-edit/use-handlers.js.map +1 -1
- package/dist/components/cascade/cascade.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-button.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox.vue.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
- package/dist/components/code-editor/code-editor.vue.d.ts +1 -1
- package/dist/components/code-editor/lang-loaders.js +3 -1
- package/dist/components/code-editor/lang-loaders.js.map +1 -1
- package/dist/components/code-editor/langs/bash/index.js +11 -0
- package/dist/components/code-editor/langs/bash/index.js.map +1 -0
- package/dist/components/code-editor/langs/powershell/index.js +11 -0
- package/dist/components/code-editor/langs/powershell/index.js.map +1 -0
- package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +2 -2
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +2 -2
- package/dist/components/dual-nav/dual-nav-app.js +17 -4
- package/dist/components/dual-nav/dual-nav-app.js.map +1 -1
- package/dist/components/dual-nav/dual-nav.js +5 -2
- package/dist/components/dual-nav/dual-nav.js.map +1 -1
- package/dist/components/dual-nav/dual-nav.vue.d.ts +4 -3
- package/dist/components/dual-nav/style2.css +22 -0
- package/dist/components/group-nav/group-nav-item.js +40 -0
- package/dist/components/group-nav/group-nav-item.js.map +1 -0
- package/dist/components/group-nav/group-nav.js +47 -0
- package/dist/components/group-nav/group-nav.js.map +1 -0
- package/dist/components/group-nav/group-nav.vue.d.ts +13 -0
- package/dist/components/group-nav/index.d.ts +1 -0
- package/dist/components/group-nav/style.d.ts +1 -0
- package/dist/components/group-nav/style.js +3 -0
- package/dist/components/group-nav/style2.css +119 -0
- package/dist/components/index.d.ts +20 -19
- package/dist/components/index.js +22 -20
- package/dist/components/index.js.map +1 -1
- package/dist/components/input/input.vue.d.ts +1 -1
- package/dist/components/multi-select/multi-select.vue.d.ts +1 -1
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +1 -1
- package/dist/components/number-input/number-input.vue.d.ts +1 -1
- package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
- package/dist/components/palette/palette.vue.d.ts +1 -1
- package/dist/components/password-input/password-input.vue.d.ts +1 -1
- package/dist/components/pop-confirm/pop-confirm.vue.d.ts +1 -1
- package/dist/components/radio-group/radio-group.vue.d.ts +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
- package/dist/components/select/select.vue.d.ts +1 -1
- package/dist/components/steps/steps.vue.d.ts +3 -3
- package/dist/components/switch/switch.vue.d.ts +1 -1
- package/dist/components/textarea/textarea.vue.d.ts +2 -2
- package/dist/components/tip/tip.vue.d.ts +1 -1
- package/dist/components/tree-select/tree-select.vue.d.ts +1 -1
- package/dist/index.d.ts +50 -48
- package/dist/index.js +46 -45
- package/dist/node_modules/.bun/@codemirror_legacy-modes@6.5.3/node_modules/@codemirror/legacy-modes/mode/powershell.js +303 -0
- package/dist/node_modules/.bun/@codemirror_legacy-modes@6.5.3/node_modules/@codemirror/legacy-modes/mode/powershell.js.map +1 -0
- package/dist/node_modules/.bun/@codemirror_legacy-modes@6.5.3/node_modules/@codemirror/legacy-modes/mode/shell.js +225 -0
- package/dist/node_modules/.bun/@codemirror_legacy-modes@6.5.3/node_modules/@codemirror/legacy-modes/mode/shell.js.map +1 -0
- package/dist/style.js +1 -0
- package/dist/types/batch-edit.d.ts +5 -1
- package/dist/types/code-editor.d.ts +1 -1
- package/dist/types/dual-nav.d.ts +9 -1
- package/dist/types/group-nav.d.ts +22 -0
- package/dist/types/index.d.ts +3 -2
- package/package.json +7 -6
- package/src/components/batch-edit/use-handlers.ts +4 -1
- package/src/components/code-editor/lang-loaders.ts +3 -1
- package/src/components/code-editor/langs/bash/index.ts +7 -0
- package/src/components/code-editor/langs/powershell/index.ts +7 -0
- package/src/components/dual-nav/dual-nav-app.vue +22 -3
- package/src/components/dual-nav/dual-nav.vue +3 -2
- package/src/components/dual-nav/style.scss +30 -1
- package/src/components/group-nav/group-nav-item.vue +32 -0
- package/src/components/group-nav/group-nav.vue +36 -0
- package/src/components/group-nav/index.ts +1 -0
- package/src/components/group-nav/style.scss +121 -0
- package/src/components/group-nav/style.ts +3 -0
- package/src/components/index.ts +2 -0
- package/src/style.ts +1 -0
- package/src/types/batch-edit.ts +5 -1
- package/src/types/code-editor.ts +1 -1
- package/src/types/dual-nav.ts +9 -0
- package/src/types/group-nav.ts +20 -0
- package/src/types/index.ts +1 -0
|
@@ -6,8 +6,8 @@ type __VLS_Slots = {
|
|
|
6
6
|
default?: () => VNode[];
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<ActionGroupProps, _ActionGroupExposed, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionGroupProps> & Readonly<{}>, {
|
|
9
|
-
type: import("@veltra/utils").ColorType;
|
|
10
9
|
size: "small" | "default" | "large";
|
|
10
|
+
type: import("@veltra/utils").ColorType;
|
|
11
11
|
text: boolean;
|
|
12
12
|
max: number;
|
|
13
13
|
circle: boolean;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_base: import("vue").DefineComponent<ActionProps, {}, {}, {},
|
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<ActionProps> & Readonly<{
|
|
13
13
|
onRun?: (() => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
|
-
type: ButtonType;
|
|
16
15
|
size: import("@veltra/utils").ComponentSize;
|
|
16
|
+
type: ButtonType;
|
|
17
17
|
text: boolean;
|
|
18
18
|
circle: boolean;
|
|
19
19
|
loading: boolean;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, _Auto
|
|
|
22
22
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
23
|
onSelect?: ((value: string) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
-
readonly: boolean;
|
|
26
25
|
disabled: boolean;
|
|
26
|
+
readonly: boolean;
|
|
27
27
|
placeholder: string;
|
|
28
28
|
clearable: boolean;
|
|
29
29
|
allowCustom: boolean;
|
|
@@ -6,28 +6,28 @@ declare const __VLS_base: import("vue").DefineComponent<BatchEditProps, {}, {},
|
|
|
6
6
|
"update:selected": (value: Record<string, any> | undefined) => any;
|
|
7
7
|
"update:checked": (value: Record<string, any>[]) => any;
|
|
8
8
|
"update:current": (row?: TableRow | undefined) => any;
|
|
9
|
-
"update:rows": (rows: TableRow[]) => any;
|
|
10
|
-
"update:forest": (rows?: import("@cat-kit/core").Forest<Record<string, unknown>, any> | undefined) => any;
|
|
11
|
-
"cell-click": (row: TableRow, column: TableColumn, ev: MouseEvent) => any;
|
|
12
|
-
"row-click": (row: TableRow, ev: MouseEvent) => any;
|
|
13
9
|
create: () => any;
|
|
14
10
|
"update:data": (value: Record<string, any>[]) => any;
|
|
15
11
|
"create-prev": (row: TableRow) => any;
|
|
16
12
|
"create-next": (row: TableRow) => any;
|
|
17
13
|
"create-child": (row: TableRow) => any;
|
|
14
|
+
"update:rows": (rows: TableRow[]) => any;
|
|
15
|
+
"update:forest": (rows?: import("@cat-kit/core").Forest<Record<string, unknown>, any> | undefined) => any;
|
|
16
|
+
"cell-click": (row: TableRow, column: TableColumn, ev: MouseEvent) => any;
|
|
17
|
+
"row-click": (row: TableRow, ev: MouseEvent) => any;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<BatchEditProps> & Readonly<{
|
|
19
19
|
"onUpdate:selected"?: ((value: Record<string, any> | undefined) => any) | undefined;
|
|
20
20
|
"onUpdate:checked"?: ((value: Record<string, any>[]) => any) | undefined;
|
|
21
21
|
"onUpdate:current"?: ((row?: TableRow | undefined) => any) | undefined;
|
|
22
|
-
"onUpdate:rows"?: ((rows: TableRow[]) => any) | undefined;
|
|
23
|
-
"onUpdate:forest"?: ((rows?: import("@cat-kit/core").Forest<Record<string, unknown>, any> | undefined) => any) | undefined;
|
|
24
|
-
"onCell-click"?: ((row: TableRow, column: TableColumn, ev: MouseEvent) => any) | undefined;
|
|
25
|
-
"onRow-click"?: ((row: TableRow, ev: MouseEvent) => any) | undefined;
|
|
26
22
|
onCreate?: (() => any) | undefined;
|
|
27
23
|
"onUpdate:data"?: ((value: Record<string, any>[]) => any) | undefined;
|
|
28
24
|
"onCreate-prev"?: ((row: TableRow) => any) | undefined;
|
|
29
25
|
"onCreate-next"?: ((row: TableRow) => any) | undefined;
|
|
30
26
|
"onCreate-child"?: ((row: TableRow) => any) | undefined;
|
|
27
|
+
"onUpdate:rows"?: ((rows: TableRow[]) => any) | undefined;
|
|
28
|
+
"onUpdate:forest"?: ((rows?: import("@cat-kit/core").Forest<Record<string, unknown>, any> | undefined) => any) | undefined;
|
|
29
|
+
"onCell-click"?: ((row: TableRow, column: TableColumn, ev: MouseEvent) => any) | undefined;
|
|
30
|
+
"onRow-click"?: ((row: TableRow, ev: MouseEvent) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
cols: string | [string, string];
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -125,7 +125,9 @@ function useHandlers(options) {
|
|
|
125
125
|
});
|
|
126
126
|
const handleDelete = runWithLoading(async (row) => {
|
|
127
127
|
const { deleteMethod } = props;
|
|
128
|
-
if (deleteMethod)
|
|
128
|
+
if (deleteMethod) {
|
|
129
|
+
if (await deleteMethod([row.data]) === false) return;
|
|
130
|
+
}
|
|
129
131
|
const data = [...props.data ?? []];
|
|
130
132
|
const parent = visitDataByIndexPath(data, row.indexes.slice(0, -1), childrenKey.value);
|
|
131
133
|
if (parent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-handlers.js","names":[],"sources":["../../../src/components/batch-edit/use-handlers.ts"],"sourcesContent":["import { last, o } from '@cat-kit/core'\nimport { computed, nextTick, type ShallowRef } from 'vue'\n\nimport type {\n TableRow,\n BatchEditEmits,\n BatchEditProps,\n BatchEditStates,\n FormExposed\n} from '../../types'\n\n/** 按索引路径在原始数据树中定位节点(等价于历史 Forest.visit 路径访问) */\nfunction visitDataByIndexPath<T extends Record<string, unknown>>(\n roots: T[],\n indexPath: number[],\n childrenKey: string\n): T | undefined {\n if (!indexPath.length) return undefined\n let currentList: T[] | undefined = roots\n let node: T | undefined\n for (let i = 0; i < indexPath.length; i++) {\n const idx = indexPath[i]!\n if (!currentList) return undefined\n node = currentList[idx]\n if (node === undefined) return undefined\n if (i < indexPath.length - 1) {\n const next = node[childrenKey]\n currentList = Array.isArray(next) ? (next as T[]) : undefined\n }\n }\n return node\n}\n\ninterface Options {\n props: BatchEditProps\n emit: BatchEditEmits\n state: BatchEditStates\n formRef: ShallowRef<FormExposed | null>\n resetState: () => void\n}\n\nexport interface EditReturned {\n handleSave: () => Promise<void>\n handleClose: () => void\n handleCreate: () => void\n handleDelete: (row: TableRow) => Promise<void>\n handleInsertToNext: (row: TableRow) => void\n handleInsertToPrev: (row: TableRow) => void\n handleInsertChild: (row: TableRow) => void\n}\n\nexport function useHandlers(options: Options): EditReturned {\n const { props, emit, state, resetState, formRef } = options\n\n const childrenKey = computed(() => {\n return typeof props.tree === 'string' ? props.tree : 'children'\n })\n\n function getInsertData(): Record<string, any> {\n return o(props.model ?? {}).copy()\n }\n\n /**\n * 插入数据\n * @param item 数据\n */\n function insert(item: Record<string, any>) {\n const data = [...(props.data ?? [])]\n\n const parent = visitDataByIndexPath(data ?? [], state.indexPath.slice(0, -1), childrenKey.value)\n\n if (parent) {\n const children = parent[childrenKey.value]\n if (!children) {\n parent[childrenKey.value] = [item]\n } else {\n children.splice(last(state.indexPath), 0, item)\n }\n } else {\n data.splice(last(state.indexPath), 0, item)\n }\n\n emit('update:data', data)\n\n return item\n }\n\n /**\n * 点击新增按钮\n */\n function handleCreate() {\n const { data } = props\n\n resetState()\n\n nextTick(() => {\n state.formActionType = 'create'\n state.formVisible = true\n state.depth = 1\n state.indexPath = [data?.length ?? 0]\n emit('create')\n })\n }\n\n function handleInsertToPrev(row: TableRow) {\n resetState()\n state.formActionType = 'create'\n state.formVisible = true\n state.parentRow = row.parent\n state.depth = row.depth\n state.indexPath = [...row.indexes]\n emit('create-prev', row)\n }\n\n function handleInsertToNext(row: TableRow) {\n resetState()\n state.formActionType = 'create'\n state.formVisible = true\n state.parentRow = row.parent\n state.depth = row.depth\n state.indexPath = [...row.indexes.slice(0, -1), row.index + 1]\n emit('create-next', row)\n }\n\n function handleInsertChild(row: TableRow) {\n resetState()\n state.formActionType = 'createChild'\n state.formVisible = true\n state.parentRow = row\n state.depth = row.depth + 1\n row.expanded = true\n state.indexPath = [...row.indexes, row.children?.length ?? 0]\n emit('create-child', row)\n }\n\n function runWithLoading<Arg extends any[]>(fn: (...args: Arg) => Promise<void> | void) {\n return async (...args: Arg) => {\n state.loading = true\n if (state.row) {\n state.row.operating = true\n }\n try {\n await fn.apply(null, args)\n } catch (error) {\n console.error(error)\n }\n state.loading = false\n if (state.row) {\n state.row.operating = false\n }\n }\n }\n\n /** 保存 */\n const handleSave = runWithLoading(async () => {\n const { model, saveMethod } = props\n const valid = await formRef.value?.validate()\n if (!model || !valid) return\n\n let item = getInsertData()\n\n // 新增\n if (state.formActionType === 'create' || state.formActionType === 'createChild') {\n await props.beforeCreate?.(item, state.parentRow?.data)\n if (saveMethod) {\n const result = await saveMethod(item, state.formActionType, state.parentRow?.data)\n if (result) {\n item = result\n }\n }\n insert(item)\n\n // 推进插入点,便于连续新增;并重置表单到初始默认值\n const next = last(state.indexPath) + 1\n state.indexPath = [...state.indexPath.slice(0, -1), next]\n formRef.value?.reset()\n return\n }\n\n // 普通模式下的编辑\n if (saveMethod) {\n const result = await saveMethod(item, state.formActionType, state.parentRow?.data)\n if (result) {\n item = result\n }\n }\n\n const { row } = state\n row &&\n Object.keys(item).forEach((key) => {\n o(row.data).set(key, o(item).get(key))\n })\n })\n\n const handleDelete = runWithLoading(async (row: TableRow) => {\n const { deleteMethod } = props\n\n if (deleteMethod) {\n await deleteMethod([row.data])\n }\n\n const data = [...(props.data ?? [])]\n\n const parent = visitDataByIndexPath(data, row.indexes.slice(0, -1), childrenKey.value)\n\n if (parent) {\n const children = parent[childrenKey.value]\n if (children) {\n children.splice(row.index, 1)\n } else {\n console.error('行路径不正确')\n }\n } else {\n data.splice(row.index, 1)\n }\n\n if (state.row === row) {\n resetState()\n }\n\n emit('update:data', data)\n })\n\n function handleClose() {\n resetState()\n }\n\n return {\n handleDelete,\n handleInsertChild,\n handleInsertToNext,\n handleInsertToPrev,\n handleCreate,\n handleClose,\n handleSave\n }\n}\n"],"mappings":";;;;AAYA,SAAS,qBACP,OACA,WACA,aACe;CACf,IAAI,CAAC,UAAU,QAAQ,OAAO,KAAA;CAC9B,IAAI,cAA+B;CACnC,IAAI;CACJ,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;EACzC,MAAM,MAAM,UAAU;EACtB,IAAI,CAAC,aAAa,OAAO,KAAA;EACzB,OAAO,YAAY;EACnB,IAAI,SAAS,KAAA,GAAW,OAAO,KAAA;EAC/B,IAAI,IAAI,UAAU,SAAS,GAAG;GAC5B,MAAM,OAAO,KAAK;GAClB,cAAc,MAAM,QAAQ,IAAI,IAAK,OAAe,KAAA;EACtD;CACF;CACA,OAAO;AACT;AAoBA,SAAgB,YAAY,SAAgC;CAC1D,MAAM,EAAE,OAAO,MAAM,OAAO,YAAY,YAAY;CAEpD,MAAM,cAAc,eAAe;EACjC,OAAO,OAAO,MAAM,SAAS,WAAW,MAAM,OAAO;CACvD,CAAC;CAED,SAAS,gBAAq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C,IAAI,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC;EACvC,CAAC;CACL,CAAC;CAED,MAAM,eAAe,eAAe,OAAO,QAAkB;EAC3D,MAAM,EAAE,iBAAiB;EAEzB,IAAI,
|
|
1
|
+
{"version":3,"file":"use-handlers.js","names":[],"sources":["../../../src/components/batch-edit/use-handlers.ts"],"sourcesContent":["import { last, o } from '@cat-kit/core'\nimport { computed, nextTick, type ShallowRef } from 'vue'\n\nimport type {\n TableRow,\n BatchEditEmits,\n BatchEditProps,\n BatchEditStates,\n FormExposed\n} from '../../types'\n\n/** 按索引路径在原始数据树中定位节点(等价于历史 Forest.visit 路径访问) */\nfunction visitDataByIndexPath<T extends Record<string, unknown>>(\n roots: T[],\n indexPath: number[],\n childrenKey: string\n): T | undefined {\n if (!indexPath.length) return undefined\n let currentList: T[] | undefined = roots\n let node: T | undefined\n for (let i = 0; i < indexPath.length; i++) {\n const idx = indexPath[i]!\n if (!currentList) return undefined\n node = currentList[idx]\n if (node === undefined) return undefined\n if (i < indexPath.length - 1) {\n const next = node[childrenKey]\n currentList = Array.isArray(next) ? (next as T[]) : undefined\n }\n }\n return node\n}\n\ninterface Options {\n props: BatchEditProps\n emit: BatchEditEmits\n state: BatchEditStates\n formRef: ShallowRef<FormExposed | null>\n resetState: () => void\n}\n\nexport interface EditReturned {\n handleSave: () => Promise<void>\n handleClose: () => void\n handleCreate: () => void\n handleDelete: (row: TableRow) => Promise<void>\n handleInsertToNext: (row: TableRow) => void\n handleInsertToPrev: (row: TableRow) => void\n handleInsertChild: (row: TableRow) => void\n}\n\nexport function useHandlers(options: Options): EditReturned {\n const { props, emit, state, resetState, formRef } = options\n\n const childrenKey = computed(() => {\n return typeof props.tree === 'string' ? props.tree : 'children'\n })\n\n function getInsertData(): Record<string, any> {\n return o(props.model ?? {}).copy()\n }\n\n /**\n * 插入数据\n * @param item 数据\n */\n function insert(item: Record<string, any>) {\n const data = [...(props.data ?? [])]\n\n const parent = visitDataByIndexPath(data ?? [], state.indexPath.slice(0, -1), childrenKey.value)\n\n if (parent) {\n const children = parent[childrenKey.value]\n if (!children) {\n parent[childrenKey.value] = [item]\n } else {\n children.splice(last(state.indexPath), 0, item)\n }\n } else {\n data.splice(last(state.indexPath), 0, item)\n }\n\n emit('update:data', data)\n\n return item\n }\n\n /**\n * 点击新增按钮\n */\n function handleCreate() {\n const { data } = props\n\n resetState()\n\n nextTick(() => {\n state.formActionType = 'create'\n state.formVisible = true\n state.depth = 1\n state.indexPath = [data?.length ?? 0]\n emit('create')\n })\n }\n\n function handleInsertToPrev(row: TableRow) {\n resetState()\n state.formActionType = 'create'\n state.formVisible = true\n state.parentRow = row.parent\n state.depth = row.depth\n state.indexPath = [...row.indexes]\n emit('create-prev', row)\n }\n\n function handleInsertToNext(row: TableRow) {\n resetState()\n state.formActionType = 'create'\n state.formVisible = true\n state.parentRow = row.parent\n state.depth = row.depth\n state.indexPath = [...row.indexes.slice(0, -1), row.index + 1]\n emit('create-next', row)\n }\n\n function handleInsertChild(row: TableRow) {\n resetState()\n state.formActionType = 'createChild'\n state.formVisible = true\n state.parentRow = row\n state.depth = row.depth + 1\n row.expanded = true\n state.indexPath = [...row.indexes, row.children?.length ?? 0]\n emit('create-child', row)\n }\n\n function runWithLoading<Arg extends any[]>(fn: (...args: Arg) => Promise<void> | void) {\n return async (...args: Arg) => {\n state.loading = true\n if (state.row) {\n state.row.operating = true\n }\n try {\n await fn.apply(null, args)\n } catch (error) {\n console.error(error)\n }\n state.loading = false\n if (state.row) {\n state.row.operating = false\n }\n }\n }\n\n /** 保存 */\n const handleSave = runWithLoading(async () => {\n const { model, saveMethod } = props\n const valid = await formRef.value?.validate()\n if (!model || !valid) return\n\n let item = getInsertData()\n\n // 新增\n if (state.formActionType === 'create' || state.formActionType === 'createChild') {\n await props.beforeCreate?.(item, state.parentRow?.data)\n if (saveMethod) {\n const result = await saveMethod(item, state.formActionType, state.parentRow?.data)\n if (result) {\n item = result\n }\n }\n insert(item)\n\n // 推进插入点,便于连续新增;并重置表单到初始默认值\n const next = last(state.indexPath) + 1\n state.indexPath = [...state.indexPath.slice(0, -1), next]\n formRef.value?.reset()\n return\n }\n\n // 普通模式下的编辑\n if (saveMethod) {\n const result = await saveMethod(item, state.formActionType, state.parentRow?.data)\n if (result) {\n item = result\n }\n }\n\n const { row } = state\n row &&\n Object.keys(item).forEach((key) => {\n o(row.data).set(key, o(item).get(key))\n })\n })\n\n const handleDelete = runWithLoading(async (row: TableRow) => {\n const { deleteMethod } = props\n\n if (deleteMethod) {\n const result = await deleteMethod([row.data])\n if (result === false) {\n return\n }\n }\n\n const data = [...(props.data ?? [])]\n\n const parent = visitDataByIndexPath(data, row.indexes.slice(0, -1), childrenKey.value)\n\n if (parent) {\n const children = parent[childrenKey.value]\n if (children) {\n children.splice(row.index, 1)\n } else {\n console.error('行路径不正确')\n }\n } else {\n data.splice(row.index, 1)\n }\n\n if (state.row === row) {\n resetState()\n }\n\n emit('update:data', data)\n })\n\n function handleClose() {\n resetState()\n }\n\n return {\n handleDelete,\n handleInsertChild,\n handleInsertToNext,\n handleInsertToPrev,\n handleCreate,\n handleClose,\n handleSave\n }\n}\n"],"mappings":";;;;AAYA,SAAS,qBACP,OACA,WACA,aACe;CACf,IAAI,CAAC,UAAU,QAAQ,OAAO,KAAA;CAC9B,IAAI,cAA+B;CACnC,IAAI;CACJ,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;EACzC,MAAM,MAAM,UAAU;EACtB,IAAI,CAAC,aAAa,OAAO,KAAA;EACzB,OAAO,YAAY;EACnB,IAAI,SAAS,KAAA,GAAW,OAAO,KAAA;EAC/B,IAAI,IAAI,UAAU,SAAS,GAAG;GAC5B,MAAM,OAAO,KAAK;GAClB,cAAc,MAAM,QAAQ,IAAI,IAAK,OAAe,KAAA;EACtD;CACF;CACA,OAAO;AACT;AAoBA,SAAgB,YAAY,SAAgC;CAC1D,MAAM,EAAE,OAAO,MAAM,OAAO,YAAY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A,MAAM,EAAE,QAAQ;EAChB,OACE,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,QAAQ;GACjC,EAAE,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC;EACvC,CAAC;CACL,CAAC;CAED,MAAM,eAAe,eAAe,OAAO,QAAkB;EAC3D,MAAM,EAAE,iBAAiB;EAEzB,IAAI;OAEE,MADiB,aAAa,CAAC,IAAI,IAAI,CAAC,MAC7B,OACb;EAAA;EAIJ,MAAM,OAAO,CAAC,GAAI,MAAM,QAAQ,CAAC,CAAE;EAEnC,MAAM,SAAS,qBAAqB,MAAM,IAAI,QAAQ,MAAM,GAAG,EAAE,GAAG,YAAY,KAAK;EAErF,IAAI,QAAQ;GACV,MAAM,WAAW,OAAO,YAAY;GACpC,IAAI,UACF,SAAS,OAAO,IAAI,OAAO,CAAC;QAE5B,QAAQ,MAAM,QAAQ;EAE1B,OACE,KAAK,OAAO,IAAI,OAAO,CAAC;EAG1B,IAAI,MAAM,QAAQ,KAChB,WAAW;EAGb,KAAK,eAAe,IAAI;CAC1B,CAAC;CAED,SAAS,cAAc;EACrB,WAAW;CACb;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -11,8 +11,8 @@ declare const __VLS_export: import("vue").DefineComponent<CascadeProps, {}, {},
|
|
|
11
11
|
onChange?: ((...args: [item?: Record<string, any> | undefined] | [items: Record<string, any>[]]) => any) | undefined;
|
|
12
12
|
"onUpdate:label"?: ((label?: string | string[] | undefined) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
readonly: boolean;
|
|
15
14
|
disabled: boolean;
|
|
15
|
+
readonly: boolean;
|
|
16
16
|
labelKey: string;
|
|
17
17
|
valueKey: string;
|
|
18
18
|
childrenKey: string;
|
|
@@ -20,8 +20,8 @@ declare const __VLS_export: import("vue").DefineComponent<CascadeProps, {}, {},
|
|
|
20
20
|
placeholder: string;
|
|
21
21
|
clearable: boolean;
|
|
22
22
|
filterable: boolean;
|
|
23
|
-
visibilityLimit: number;
|
|
24
23
|
separator: string;
|
|
24
|
+
visibilityLimit: number;
|
|
25
25
|
showFullPath: boolean;
|
|
26
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const _default: typeof __VLS_export;
|
|
@@ -17,9 +17,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
17
17
|
"onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
|
|
18
18
|
onChange?: ((checked: boolean) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
type: import("@veltra/utils").ColorType;
|
|
21
|
-
readonly: boolean;
|
|
22
20
|
disabled: boolean;
|
|
21
|
+
readonly: boolean;
|
|
22
|
+
type: import("@veltra/utils").ColorType;
|
|
23
23
|
round: boolean;
|
|
24
24
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -18,8 +18,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
18
18
|
"onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
|
|
19
19
|
onChange?: ((checked: boolean, e: MouseEvent) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
|
-
readonly: boolean;
|
|
22
21
|
disabled: boolean;
|
|
22
|
+
readonly: boolean;
|
|
23
23
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
25
|
declare const _default: typeof __VLS_export;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
13
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
|
-
readonly: boolean;
|
|
16
15
|
disabled: boolean;
|
|
16
|
+
readonly: boolean;
|
|
17
17
|
labelKey: string;
|
|
18
18
|
valueKey: string;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
18
18
|
onChange?: ((value: string) => any) | undefined;
|
|
19
19
|
"onUpdate:lang"?: ((value: CodeEditorLang | undefined) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
|
-
readonly: boolean;
|
|
22
21
|
disabled: boolean;
|
|
22
|
+
readonly: boolean;
|
|
23
23
|
dark: boolean;
|
|
24
24
|
defaultLines: number;
|
|
25
25
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -5,7 +5,9 @@ const LANG_LOADERS = {
|
|
|
5
5
|
sql: () => import("../../node_modules/.bun/@codemirror_lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js").then((m) => m.sql()),
|
|
6
6
|
java: () => import("../../node_modules/.bun/@codemirror_lang-java@6.0.2/node_modules/@codemirror/lang-java/dist/index.js").then((m) => m.java()),
|
|
7
7
|
json: () => import("../../node_modules/.bun/@codemirror_lang-json@6.0.2/node_modules/@codemirror/lang-json/dist/index.js").then((m) => m.json()),
|
|
8
|
-
spel: () => import("./langs/spel/index.js").then((m) => m.spel())
|
|
8
|
+
spel: () => import("./langs/spel/index.js").then((m) => m.spel()),
|
|
9
|
+
bash: () => import("./langs/bash/index.js").then((m) => m.bash()),
|
|
10
|
+
powershell: () => import("./langs/powershell/index.js").then((m) => m.powershell())
|
|
9
11
|
};
|
|
10
12
|
/** 按需加载语言扩展;模块缓存由运行时保证,重复切换同一语言不会重复下载 */
|
|
11
13
|
function loadLanguage(lang) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lang-loaders.js","names":[],"sources":["../../../src/components/code-editor/lang-loaders.ts"],"sourcesContent":["import type { Extension } from '@codemirror/state'\n\nimport type { CodeEditorLang } from '../../types'\n\n/** 语言包动态加载器,新增语言只需在此注册一条 */\nconst LANG_LOADERS: Record<CodeEditorLang, () => Promise<Extension>> = {\n js: () => import('@codemirror/lang-javascript').then((m) => m.javascript({ typescript: true })),\n sql: () => import('@codemirror/lang-sql').then((m) => m.sql()),\n java: () => import('@codemirror/lang-java').then((m) => m.java()),\n json: () => import('@codemirror/lang-json').then((m) => m.json()),\n spel: () => import('./langs/spel').then((m) => m.spel())\n}\n\n/** 按需加载语言扩展;模块缓存由运行时保证,重复切换同一语言不会重复下载 */\nexport function loadLanguage(lang: CodeEditorLang): Promise<Extension> {\n return LANG_LOADERS[lang]()\n}\n"],"mappings":";;AAKA,MAAM,eAAiE;CACrE,UAAU,OAAO,mHAA8B,CAAC,MAAM,MAAM,EAAE,WAAW,EAAE,YAAY,KAAK,CAAC,CAAC;CAC9F,WAAW,OAAO,sGAAuB,CAAC,MAAM,MAAM,EAAE,IAAI,CAAC;CAC7D,YAAY,OAAO,uGAAwB,CAAC,MAAM,MAAM,EAAE,KAAK,CAAC;CAChE,YAAY,OAAO,uGAAwB,CAAC,MAAM,MAAM,EAAE,KAAK,CAAC;CAChE,YAAY,OAAO,wBAAe,CAAC,MAAM,MAAM,EAAE,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"lang-loaders.js","names":[],"sources":["../../../src/components/code-editor/lang-loaders.ts"],"sourcesContent":["import type { Extension } from '@codemirror/state'\n\nimport type { CodeEditorLang } from '../../types'\n\n/** 语言包动态加载器,新增语言只需在此注册一条 */\nconst LANG_LOADERS: Record<CodeEditorLang, () => Promise<Extension>> = {\n js: () => import('@codemirror/lang-javascript').then((m) => m.javascript({ typescript: true })),\n sql: () => import('@codemirror/lang-sql').then((m) => m.sql()),\n java: () => import('@codemirror/lang-java').then((m) => m.java()),\n json: () => import('@codemirror/lang-json').then((m) => m.json()),\n spel: () => import('./langs/spel').then((m) => m.spel()),\n bash: () => import('./langs/bash').then((m) => m.bash()),\n powershell: () => import('./langs/powershell').then((m) => m.powershell())\n}\n\n/** 按需加载语言扩展;模块缓存由运行时保证,重复切换同一语言不会重复下载 */\nexport function loadLanguage(lang: CodeEditorLang): Promise<Extension> {\n return LANG_LOADERS[lang]()\n}\n"],"mappings":";;AAKA,MAAM,eAAiE;CACrE,UAAU,OAAO,mHAA8B,CAAC,MAAM,MAAM,EAAE,WAAW,EAAE,YAAY,KAAK,CAAC,CAAC;CAC9F,WAAW,OAAO,sGAAuB,CAAC,MAAM,MAAM,EAAE,IAAI,CAAC;CAC7D,YAAY,OAAO,uGAAwB,CAAC,MAAM,MAAM,EAAE,KAAK,CAAC;CAChE,YAAY,OAAO,uGAAwB,CAAC,MAAM,MAAM,EAAE,KAAK,CAAC;CAChE,YAAY,OAAO,wBAAe,CAAC,MAAM,MAAM,EAAE,KAAK,CAAC;CACvD,YAAY,OAAO,wBAAe,CAAC,MAAM,MAAM,EAAE,KAAK,CAAC;CACvD,kBAAkB,OAAO,8BAAqB,CAAC,MAAM,MAAM,EAAE,WAAW,CAAC;AAC3E;;AAGA,SAAgB,aAAa,MAA0C;CACrE,OAAO,aAAa,KAAK,CAAC;AAC5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LanguageSupport, StreamLanguage } from "../../../../node_modules/.bun/@codemirror_language@6.12.4/node_modules/@codemirror/language/dist/index.js";
|
|
2
|
+
import { shell } from "../../../../node_modules/.bun/@codemirror_legacy-modes@6.5.3/node_modules/@codemirror/legacy-modes/mode/shell.js";
|
|
3
|
+
//#region src/components/code-editor/langs/bash/index.ts
|
|
4
|
+
/** Bash / shell 脚本语言支持(基于 CodeMirror legacy shell mode) */
|
|
5
|
+
function bash() {
|
|
6
|
+
return new LanguageSupport(StreamLanguage.define(shell));
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { bash };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/code-editor/langs/bash/index.ts"],"sourcesContent":["import { LanguageSupport, StreamLanguage } from '@codemirror/language'\nimport { shell } from '@codemirror/legacy-modes/mode/shell'\n\n/** Bash / shell 脚本语言支持(基于 CodeMirror legacy shell mode) */\nexport function bash(): LanguageSupport {\n return new LanguageSupport(StreamLanguage.define(shell))\n}\n"],"mappings":";;;;AAIA,SAAgB,OAAwB;CACtC,OAAO,IAAI,gBAAgB,eAAe,OAAO,KAAK,CAAC;AACzD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LanguageSupport, StreamLanguage } from "../../../../node_modules/.bun/@codemirror_language@6.12.4/node_modules/@codemirror/language/dist/index.js";
|
|
2
|
+
import { powerShell } from "../../../../node_modules/.bun/@codemirror_legacy-modes@6.5.3/node_modules/@codemirror/legacy-modes/mode/powershell.js";
|
|
3
|
+
//#region src/components/code-editor/langs/powershell/index.ts
|
|
4
|
+
/** PowerShell 语言支持(基于 CodeMirror legacy powershell mode) */
|
|
5
|
+
function powershell() {
|
|
6
|
+
return new LanguageSupport(StreamLanguage.define(powerShell));
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { powershell };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/code-editor/langs/powershell/index.ts"],"sourcesContent":["import { LanguageSupport, StreamLanguage } from '@codemirror/language'\nimport { powerShell } from '@codemirror/legacy-modes/mode/powershell'\n\n/** PowerShell 语言支持(基于 CodeMirror legacy powershell mode) */\nexport function powershell(): LanguageSupport {\n return new LanguageSupport(StreamLanguage.define(powerShell))\n}\n"],"mappings":";;;;AAIA,SAAgB,aAA8B;CAC5C,OAAO,IAAI,gBAAgB,eAAe,OAAO,UAAU,CAAC;AAC9D"}
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: import("vue").DefineComponent<DatePanelProps, {}, {}
|
|
|
7
7
|
"onSelect:range-date"?: ((rangeDate?: [import("@cat-kit/core").Dater, import("@cat-kit/core").Dater] | undefined) => any) | undefined;
|
|
8
8
|
"onSelect:date"?: ((date: import("@cat-kit/core").Dater) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
-
type: "date" | "month" | "year";
|
|
11
10
|
size: import("@veltra/utils").ComponentSize;
|
|
11
|
+
type: "date" | "month" | "year";
|
|
12
12
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
14
14
|
//#endregion
|
|
@@ -5,9 +5,9 @@ declare const __VLS_export: import("vue").DefineComponent<DatePickerProps, {}, {
|
|
|
5
5
|
}, string, import("vue").PublicProps, Readonly<DatePickerProps> & Readonly<{
|
|
6
6
|
"onUpdate:modelValue"?: ((value?: string | number | Date | undefined) => any) | undefined;
|
|
7
7
|
}>, {
|
|
8
|
-
type: "date" | "month" | "year";
|
|
9
|
-
readonly: boolean;
|
|
10
8
|
disabled: boolean;
|
|
9
|
+
readonly: boolean;
|
|
10
|
+
type: "date" | "month" | "year";
|
|
11
11
|
placeholder: string;
|
|
12
12
|
clearable: boolean;
|
|
13
13
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -5,9 +5,9 @@ declare const __VLS_export: import("vue").DefineComponent<DateRangePickerProps,
|
|
|
5
5
|
}, string, import("vue").PublicProps, Readonly<DateRangePickerProps> & Readonly<{
|
|
6
6
|
"onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
|
|
7
7
|
}>, {
|
|
8
|
-
type: "date" | "month" | "year";
|
|
9
|
-
readonly: boolean;
|
|
10
8
|
disabled: boolean;
|
|
9
|
+
readonly: boolean;
|
|
10
|
+
type: "date" | "month" | "year";
|
|
11
11
|
placeholder: [string, string];
|
|
12
12
|
clearable: boolean;
|
|
13
13
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
import _sfc_main$1 from "../tip/tip.js";
|
|
2
2
|
import _sfc_main$2 from "../nav/nav-icon.js";
|
|
3
|
-
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, shallowRef, toDisplayString, unref, withCtx, withDirectives } from "vue";
|
|
3
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, shallowRef, toDisplayString, unref, withCtx, withDirectives } from "vue";
|
|
4
4
|
import { bem } from "@veltra/utils";
|
|
5
5
|
import { vRipple } from "@veltra/directives";
|
|
6
6
|
//#region src/components/dual-nav/dual-nav-app.vue
|
|
7
7
|
const _hoisted_1 = ["disabled"];
|
|
8
|
+
const LABEL_MAX_LENGTH = 4;
|
|
8
9
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
9
10
|
name: "UDualNavApp",
|
|
10
11
|
__name: "dual-nav-app",
|
|
11
12
|
props: {
|
|
12
13
|
app: {},
|
|
13
14
|
active: { type: Boolean },
|
|
14
|
-
selected: { type: Boolean }
|
|
15
|
+
selected: { type: Boolean },
|
|
16
|
+
labeled: { type: Boolean }
|
|
15
17
|
},
|
|
16
18
|
emits: ["click"],
|
|
17
19
|
setup(__props, { emit: __emit }) {
|
|
18
20
|
const cls = bem("dual-nav");
|
|
21
|
+
/** 左轨菜单名称最多展示字数 */
|
|
22
|
+
const props = __props;
|
|
19
23
|
const emit = __emit;
|
|
20
24
|
const tipVisible = shallowRef(false);
|
|
21
25
|
/** 点击后暂时禁用 hover 弹出,移出触发区后恢复 */
|
|
22
26
|
const tipSuppressed = shallowRef(false);
|
|
27
|
+
const displayTitle = computed(() => props.app.title.slice(0, LABEL_MAX_LENGTH));
|
|
28
|
+
/** labeled 且标题未截断、无描述时,tooltip 无额外信息 */
|
|
29
|
+
const tipUnnecessary = computed(() => {
|
|
30
|
+
return !!props.labeled && props.app.title.length <= LABEL_MAX_LENGTH && !props.app.description;
|
|
31
|
+
});
|
|
32
|
+
const tipDisabled = computed(() => tipSuppressed.value || tipUnnecessary.value);
|
|
23
33
|
function handleClick() {
|
|
24
34
|
tipSuppressed.value = true;
|
|
25
35
|
tipVisible.value = false;
|
|
@@ -34,7 +44,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
34
44
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => tipVisible.value = $event),
|
|
35
45
|
direction: "right",
|
|
36
46
|
"hide-arrow": "",
|
|
37
|
-
disabled:
|
|
47
|
+
disabled: tipDisabled.value
|
|
38
48
|
}, {
|
|
39
49
|
content: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(cls).e("app-tip")) }, [createElementVNode("div", { class: normalizeClass(unref(cls).e("app-tip-title")) }, toDisplayString(__props.app.title), 3), __props.app.description ? (openBlock(), createElementBlock("p", {
|
|
40
50
|
key: 0,
|
|
@@ -58,7 +68,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
58
68
|
}, null, 8, ["icon", "class"])) : (openBlock(), createElementBlock("span", {
|
|
59
69
|
key: 1,
|
|
60
70
|
class: normalizeClass(unref(cls).e("app-fallback"))
|
|
61
|
-
}, toDisplayString(__props.app.title[0]), 3))
|
|
71
|
+
}, toDisplayString(__props.app.title[0]), 3)), __props.labeled ? (openBlock(), createElementBlock("span", {
|
|
72
|
+
key: 2,
|
|
73
|
+
class: normalizeClass(unref(cls).e("app-label"))
|
|
74
|
+
}, toDisplayString(displayTitle.value), 3)) : createCommentVNode("v-if", true)], 42, _hoisted_1)), [[unref(vRipple), !__props.app.disabled]])]),
|
|
62
75
|
_: 1
|
|
63
76
|
}, 8, ["visible", "disabled"]);
|
|
64
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dual-nav-app.js","names":[],"sources":["../../../src/components/dual-nav/dual-nav-app.vue"],"sourcesContent":["<template>\n <u-tip v-model:visible=\"tipVisible\" direction=\"right\" hide-arrow :disabled=\"
|
|
1
|
+
{"version":3,"file":"dual-nav-app.js","names":[],"sources":["../../../src/components/dual-nav/dual-nav-app.vue"],"sourcesContent":["<template>\n <u-tip v-model:visible=\"tipVisible\" direction=\"right\" hide-arrow :disabled=\"tipDisabled\">\n <button\n type=\"button\"\n v-ripple=\"!app.disabled\"\n :class=\"[\n cls.e('app'),\n bem.is('active', active),\n bem.is('selected', selected),\n bem.is('disabled', app.disabled ?? false)\n ]\"\n :disabled=\"app.disabled\"\n @click=\"handleClick\"\n @mouseleave=\"handleMouseleave\"\n >\n <UNavIcon v-if=\"app.icon\" :icon=\"app.icon\" :class=\"cls.e('app-icon')\" />\n <span v-else :class=\"cls.e('app-fallback')\">{{ app.title[0] }}</span>\n <span v-if=\"labeled\" :class=\"cls.e('app-label')\">{{ displayTitle }}</span>\n </button>\n\n <template #content>\n <div :class=\"cls.e('app-tip')\">\n <div :class=\"cls.e('app-tip-title')\">{{ app.title }}</div>\n <p v-if=\"app.description\" :class=\"cls.e('app-tip-description')\">\n {{ app.description }}\n </p>\n </div>\n </template>\n </u-tip>\n</template>\n\n<script setup lang=\"ts\">\nimport { vRipple } from '@veltra/directives'\nimport { bem } from '@veltra/utils'\nimport { computed, shallowRef } from 'vue'\n\nimport type { DualNavRootItem } from '../../types'\nimport UNavIcon from '../nav/nav-icon.vue'\nimport { UTip } from '../tip'\n\ndefineOptions({ name: 'UDualNavApp' })\n\nconst cls = bem('dual-nav')\n\n/** 左轨菜单名称最多展示字数 */\nconst LABEL_MAX_LENGTH = 4\n\nconst props = defineProps<{\n app: DualNavRootItem\n active: boolean\n selected: boolean\n /** 是否在图标下方显示菜单名称 */\n labeled?: boolean\n}>()\n\nconst emit = defineEmits<{ click: [] }>()\n\nconst tipVisible = shallowRef(false)\n/** 点击后暂时禁用 hover 弹出,移出触发区后恢复 */\nconst tipSuppressed = shallowRef(false)\n\nconst displayTitle = computed(() => props.app.title.slice(0, LABEL_MAX_LENGTH))\n\n/** labeled 且标题未截断、无描述时,tooltip 无额外信息 */\nconst tipUnnecessary = computed(() => {\n return !!props.labeled && props.app.title.length <= LABEL_MAX_LENGTH && !props.app.description\n})\n\nconst tipDisabled = computed(() => tipSuppressed.value || tipUnnecessary.value)\n\nfunction handleClick() {\n tipSuppressed.value = true\n tipVisible.value = false\n emit('click')\n}\n\nfunction handleMouseleave() {\n tipSuppressed.value = false\n}\n</script>\n"],"mappings":";;;;;;;AA6CA,MAAM,mBAAmB;;;;;;;;;;;;EAHzB,MAAM,MAAM,IAAI,UAAU;;EAK1B,MAAM,QAAQ;EAQd,MAAM,OAAO;EAEb,MAAM,aAAa,WAAW,KAAK;;EAEnC,MAAM,gBAAgB,WAAW,KAAK;EAEtC,MAAM,eAAe,eAAe,MAAM,IAAI,MAAM,MAAM,GAAG,gBAAgB,CAAC;;EAG9E,MAAM,iBAAiB,eAAe;GACpC,OAAO,CAAC,CAAC,MAAM,WAAW,MAAM,IAAI,MAAM,UAAU,oBAAoB,CAAC,MAAM,IAAI;EACrF,CAAC;EAED,MAAM,cAAc,eAAe,cAAc,SAAS,eAAe,KAAK;EAE9E,SAAS,cAAc;GACrB,cAAc,QAAQ;GACtB,WAAW,QAAQ;GACnB,KAAK,OAAO;EACd;EAEA,SAAS,mBAAmB;GAC1B,cAAc,QAAQ;EACxB;;uBA7EE,YA2BQ,MAAA,WAAA,GAAA;IA3BO,SAAS,WAAA;8DAAA,WAAU,QAAA;IAAE,WAAU;IAAQ,cAAA;IAAY,UAAU,YAAA;;IAmB/D,SAAO,cAMV,CALN,mBAKM,OAAA,EALA,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,SAAA,CAAA,EAAA,GAAA,CAChB,mBAA0D,OAAA,EAApD,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,eAAA,CAAA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
|
15
15
|
props: {
|
|
16
16
|
currentPath: {},
|
|
17
|
-
menus: {}
|
|
17
|
+
menus: {},
|
|
18
|
+
railVariant: { default: "icon" }
|
|
18
19
|
},
|
|
19
20
|
emits: ["item-click"],
|
|
20
21
|
setup(__props, { emit: __emit }) {
|
|
@@ -76,18 +77,20 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
76
77
|
allExpanded.value = true;
|
|
77
78
|
}
|
|
78
79
|
return (_ctx, _cache) => {
|
|
79
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cls).b) }, [
|
|
80
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass([unref(cls).b, __props.railVariant === "labeled" && unref(cls).m("labeled")]) }, [
|
|
80
81
|
createElementVNode("div", { class: normalizeClass(unref(cls).e("rail")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.menus, (app) => {
|
|
81
82
|
return openBlock(), createBlock(_sfc_main$4, {
|
|
82
83
|
key: app.path,
|
|
83
84
|
app,
|
|
84
85
|
active: isAppActive(app),
|
|
85
86
|
selected: isAppSelected(app),
|
|
87
|
+
labeled: __props.railVariant === "labeled",
|
|
86
88
|
onClick: ($event) => handleAppClick(app)
|
|
87
89
|
}, null, 8, [
|
|
88
90
|
"app",
|
|
89
91
|
"active",
|
|
90
92
|
"selected",
|
|
93
|
+
"labeled",
|
|
91
94
|
"onClick"
|
|
92
95
|
]);
|
|
93
96
|
}), 128))], 2),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dual-nav.js","names":[],"sources":["../../../src/components/dual-nav/dual-nav.vue"],"sourcesContent":["<template>\n <div :class=\"cls.b\">\n <div :class=\"cls.e('rail')\">\n <DualNavApp\n v-for=\"app in menus\"\n :key=\"app.path\"\n :app=\"app\"\n :active=\"isAppActive(app)\"\n :selected=\"isAppSelected(app)\"\n @click=\"handleAppClick(app)\"\n />\n </div>\n\n <!-- <div :class=\"cls.e('divider')\" aria-hidden=\"true\" /> -->\n\n <div :class=\"cls.e('panel')\">\n <template v-if=\"panelApp\">\n <div :class=\"cls.e('panel-header')\">\n <div :class=\"cls.e('panel-header-main')\">\n <h3 :class=\"cls.e('panel-title')\">{{ panelApp.title }}</h3>\n <p v-if=\"panelApp.description\" :class=\"cls.e('description')\">\n {{ panelApp.description }}\n </p>\n </div>\n\n <u-tip\n v-if=\"hasExpandableMenus\"\n :content=\"allExpanded ? '折叠全部' : '展开全部'\"\n hide-arrow\n >\n <button\n type=\"button\"\n :class=\"cls.e('toggle-expand')\"\n :aria-label=\"allExpanded ? '折叠全部' : '展开全部'\"\n @click=\"handleToggleExpandAll\"\n >\n <u-icon>\n <FolderOpened v-if=\"!allExpanded\" />\n <Folder v-else />\n </u-icon>\n </button>\n </u-tip>\n </div>\n\n <div :class=\"cls.e('panel-body')\">\n <UNav\n ref=\"navRef\"\n :menus=\"panelMenus\"\n :current-path=\"currentPath\"\n :collapsed=\"false\"\n @item-click=\"emit('item-click', $event)\"\n />\n </div>\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Folder, FolderOpened } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, ref, useTemplateRef, watch } from 'vue'\n\nimport type { DualNavEmits, DualNavProps, DualNavRootItem } from '../../types/dual-nav'\nimport type { NavExposed, NavItem } from '../../types/nav'\nimport { UIcon } from '../icon'\nimport { UNav } from '../nav'\nimport { collectNavBranchPaths } from '../nav/helper'\nimport { UTip } from '../tip'\nimport DualNavApp from './dual-nav-app.vue'\nimport { findFirstLeaf, findRootApp } from './helper'\n\ndefineOptions({ name: 'UDualNav' })\n\nconst props = defineProps<DualNavProps>()\nconst emit = defineEmits<DualNavEmits>()\n\nconst cls = bem('dual-nav')\nconst navRef = useTemplateRef<NavExposed>('navRef')\n\n/** 右栏当前展示的应用(点击左轨或 currentPath 同步) */\nconst panelAppPath = ref<string>()\nconst allExpanded = ref(false)\n\nfunction syncPanelAppFromCurrentPath(currentPath?: string) {\n const rootApp = findRootApp(props.menus, currentPath)\n if (rootApp) {\n panelAppPath.value = rootApp.path\n return\n }\n\n if (!panelAppPath.value && props.menus?.length) {\n panelAppPath.value = props.menus[0]!.path\n }\n}\n\nwatch(\n () => [props.currentPath, props.menus] as const,\n ([currentPath]) => {\n syncPanelAppFromCurrentPath(currentPath)\n },\n { immediate: true }\n)\n\nconst panelApp = computed<DualNavRootItem | undefined>(() => {\n if (!panelAppPath.value || !props.menus?.length) return undefined\n return props.menus.find((app) => app.path === panelAppPath.value)\n})\n\n/** 右栏菜单:有子级时展示子级,单层时展示根项自身 */\nconst panelMenus = computed<NavItem[] | undefined>(() => {\n const app = panelApp.value\n if (!app) return undefined\n if (app.children?.length) return app.children\n return [app]\n})\n\nconst hasExpandableMenus = computed(() => {\n return collectNavBranchPaths(panelMenus.value).length > 0\n})\n\nwatch(panelAppPath, () => {\n allExpanded.value = false\n})\n\n/** 左轨高亮:currentPath 落在该应用下时为激活态 */\nfunction isAppActive(app: NavItem): boolean {\n return findRootApp(props.menus, props.currentPath)?.path === app.path\n}\n\n/** 左轨选中:已切换右栏但尚未导航到该应用下任一菜单时,使用 hover 风格 */\nfunction isAppSelected(app: NavItem): boolean {\n return panelAppPath.value === app.path && !isAppActive(app)\n}\n\nfunction handleAppClick(app: NavItem) {\n if (app.disabled) return\n\n panelAppPath.value = app.path\n\n emit('item-click', findFirstLeaf(app))\n}\n\nfunction handleToggleExpandAll() {\n if (allExpanded.value) {\n navRef.value?.collapseAll()\n allExpanded.value = false\n return\n }\n\n navRef.value?.expandAll()\n allExpanded.value = true\n}\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dual-nav.js","names":[],"sources":["../../../src/components/dual-nav/dual-nav.vue"],"sourcesContent":["<template>\n <div :class=\"[cls.b, railVariant === 'labeled' && cls.m('labeled')]\">\n <div :class=\"cls.e('rail')\">\n <DualNavApp\n v-for=\"app in menus\"\n :key=\"app.path\"\n :app=\"app\"\n :active=\"isAppActive(app)\"\n :selected=\"isAppSelected(app)\"\n :labeled=\"railVariant === 'labeled'\"\n @click=\"handleAppClick(app)\"\n />\n </div>\n\n <!-- <div :class=\"cls.e('divider')\" aria-hidden=\"true\" /> -->\n\n <div :class=\"cls.e('panel')\">\n <template v-if=\"panelApp\">\n <div :class=\"cls.e('panel-header')\">\n <div :class=\"cls.e('panel-header-main')\">\n <h3 :class=\"cls.e('panel-title')\">{{ panelApp.title }}</h3>\n <p v-if=\"panelApp.description\" :class=\"cls.e('description')\">\n {{ panelApp.description }}\n </p>\n </div>\n\n <u-tip\n v-if=\"hasExpandableMenus\"\n :content=\"allExpanded ? '折叠全部' : '展开全部'\"\n hide-arrow\n >\n <button\n type=\"button\"\n :class=\"cls.e('toggle-expand')\"\n :aria-label=\"allExpanded ? '折叠全部' : '展开全部'\"\n @click=\"handleToggleExpandAll\"\n >\n <u-icon>\n <FolderOpened v-if=\"!allExpanded\" />\n <Folder v-else />\n </u-icon>\n </button>\n </u-tip>\n </div>\n\n <div :class=\"cls.e('panel-body')\">\n <UNav\n ref=\"navRef\"\n :menus=\"panelMenus\"\n :current-path=\"currentPath\"\n :collapsed=\"false\"\n @item-click=\"emit('item-click', $event)\"\n />\n </div>\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Folder, FolderOpened } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, ref, useTemplateRef, watch } from 'vue'\n\nimport type { DualNavEmits, DualNavProps, DualNavRootItem } from '../../types/dual-nav'\nimport type { NavExposed, NavItem } from '../../types/nav'\nimport { UIcon } from '../icon'\nimport { UNav } from '../nav'\nimport { collectNavBranchPaths } from '../nav/helper'\nimport { UTip } from '../tip'\nimport DualNavApp from './dual-nav-app.vue'\nimport { findFirstLeaf, findRootApp } from './helper'\n\ndefineOptions({ name: 'UDualNav' })\n\nconst props = withDefaults(defineProps<DualNavProps>(), { railVariant: 'icon' })\nconst emit = defineEmits<DualNavEmits>()\n\nconst cls = bem('dual-nav')\nconst navRef = useTemplateRef<NavExposed>('navRef')\n\n/** 右栏当前展示的应用(点击左轨或 currentPath 同步) */\nconst panelAppPath = ref<string>()\nconst allExpanded = ref(false)\n\nfunction syncPanelAppFromCurrentPath(currentPath?: string) {\n const rootApp = findRootApp(props.menus, currentPath)\n if (rootApp) {\n panelAppPath.value = rootApp.path\n return\n }\n\n if (!panelAppPath.value && props.menus?.length) {\n panelAppPath.value = props.menus[0]!.path\n }\n}\n\nwatch(\n () => [props.currentPath, props.menus] as const,\n ([currentPath]) => {\n syncPanelAppFromCurrentPath(currentPath)\n },\n { immediate: true }\n)\n\nconst panelApp = computed<DualNavRootItem | undefined>(() => {\n if (!panelAppPath.value || !props.menus?.length) return undefined\n return props.menus.find((app) => app.path === panelAppPath.value)\n})\n\n/** 右栏菜单:有子级时展示子级,单层时展示根项自身 */\nconst panelMenus = computed<NavItem[] | undefined>(() => {\n const app = panelApp.value\n if (!app) return undefined\n if (app.children?.length) return app.children\n return [app]\n})\n\nconst hasExpandableMenus = computed(() => {\n return collectNavBranchPaths(panelMenus.value).length > 0\n})\n\nwatch(panelAppPath, () => {\n allExpanded.value = false\n})\n\n/** 左轨高亮:currentPath 落在该应用下时为激活态 */\nfunction isAppActive(app: NavItem): boolean {\n return findRootApp(props.menus, props.currentPath)?.path === app.path\n}\n\n/** 左轨选中:已切换右栏但尚未导航到该应用下任一菜单时,使用 hover 风格 */\nfunction isAppSelected(app: NavItem): boolean {\n return panelAppPath.value === app.path && !isAppActive(app)\n}\n\nfunction handleAppClick(app: NavItem) {\n if (app.disabled) return\n\n panelAppPath.value = app.path\n\n emit('item-click', findFirstLeaf(app))\n}\n\nfunction handleToggleExpandAll() {\n if (allExpanded.value) {\n navRef.value?.collapseAll()\n allExpanded.value = false\n return\n }\n\n navRef.value?.expandAll()\n allExpanded.value = true\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EA2EA,MAAM,QAAQ;EACd,MAAM,OAAO;EAEb,MAAM,MAAM,IAA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AAA,MAAS,WAAW,GAAA,CAAA,KAAA,mBAAA,QAAA,IAAA,CAAA,GAAA,CAAA,GAKnB,mBAAA,SAAA,UAAA,GADR,YAgBQ,MAAA,WAAA,GAAA;;KAdL,SAAS,YAAA,QAAW,SAAA;KACrB,cAAA;;4BAYS,CAVT,mBAUS,UAAA;MATP,MAAK;MACJ,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,eAAA,CAAA;MACZ,cAAY,YAAA,QAAW,SAAA;MACvB,SAAO;SAER,YAGS,MAAA,WAAA,GAAA,MAAA;6BAF6B,CAAA,CAAf,YAAA,SAAA,UAAA,GAArB,YAAoC,MAAA,YAAA,GAAA,EAAA,KAAA,EAAA,CAAA,MAAA,UAAA,GACpC,YAAiB,MAAA,MAAA,GAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA;;;;iEAMzB,mBAQM,OAAA,EARA,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,YAAA,CAAA,EAAA,GAAA,CAChB,YAME,MAAA,WAAA,GAAA;cALI;KAAJ,KAAI;KACH,OAAO,WAAA;KACP,gBAAc,QAAA;KACd,WAAW;KACX,aAAU,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,cAAe,MAAM"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { NavItem } from "../../types/nav.js";
|
|
2
|
-
import { DualNavProps } from "../../types/dual-nav.js";
|
|
3
|
-
|
|
2
|
+
import { DualNavProps, DualNavRailVariant } from "../../types/dual-nav.js";
|
|
4
3
|
//#region src/components/dual-nav/dual-nav.vue.d.ts
|
|
5
4
|
declare const __VLS_export: import("vue").DefineComponent<DualNavProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
5
|
"item-click": (item: NavItem) => any;
|
|
7
6
|
}, string, import("vue").PublicProps, Readonly<DualNavProps> & Readonly<{
|
|
8
7
|
"onItem-click"?: ((item: NavItem) => any) | undefined;
|
|
9
|
-
}>, {
|
|
8
|
+
}>, {
|
|
9
|
+
railVariant: DualNavRailVariant;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
11
|
declare const _default: typeof __VLS_export;
|
|
11
12
|
//#endregion
|
|
12
13
|
export { _default };
|
|
@@ -33,6 +33,19 @@
|
|
|
33
33
|
padding: 8px 6px;
|
|
34
34
|
background-color: var(--u-bg-color-middle);
|
|
35
35
|
}
|
|
36
|
+
.u-dual-nav--labeled .u-dual-nav__rail {
|
|
37
|
+
width: var(--u-nav-rail-labeled-width);
|
|
38
|
+
padding: 8px 4px;
|
|
39
|
+
gap: 2px;
|
|
40
|
+
}
|
|
41
|
+
.u-dual-nav--labeled .u-dual-nav__app {
|
|
42
|
+
aspect-ratio: auto;
|
|
43
|
+
max-width: none;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
gap: 2px;
|
|
46
|
+
padding: 6px 2px;
|
|
47
|
+
min-height: 0;
|
|
48
|
+
}
|
|
36
49
|
.u-dual-nav__divider {
|
|
37
50
|
flex-shrink: 0;
|
|
38
51
|
width: 1px;
|
|
@@ -153,6 +166,15 @@
|
|
|
153
166
|
font-weight: 600;
|
|
154
167
|
line-height: 1;
|
|
155
168
|
}
|
|
169
|
+
.u-dual-nav__app-label {
|
|
170
|
+
max-width: 100%;
|
|
171
|
+
overflow: hidden;
|
|
172
|
+
text-overflow: ellipsis;
|
|
173
|
+
white-space: nowrap;
|
|
174
|
+
font-size: var(--u-font-size-assist-default);
|
|
175
|
+
line-height: 1.2;
|
|
176
|
+
text-align: center;
|
|
177
|
+
}
|
|
156
178
|
.u-dual-nav__app-tip {
|
|
157
179
|
display: flex;
|
|
158
180
|
flex-direction: column;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _sfc_main$1 from "../nav/nav-icon.js";
|
|
2
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
|
|
3
|
+
import { bem } from "@veltra/utils";
|
|
4
|
+
//#region src/components/group-nav/group-nav-item.vue
|
|
5
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
6
|
+
name: "UGroupNavItem",
|
|
7
|
+
__name: "group-nav-item",
|
|
8
|
+
props: {
|
|
9
|
+
item: {},
|
|
10
|
+
active: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
emits: ["click"],
|
|
13
|
+
setup(__props, { emit: __emit }) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const emit = __emit;
|
|
16
|
+
const cls = bem("group-nav");
|
|
17
|
+
function handleClick() {
|
|
18
|
+
if (props.item.disabled) return;
|
|
19
|
+
emit("click", props.item);
|
|
20
|
+
}
|
|
21
|
+
return (_ctx, _cache) => {
|
|
22
|
+
return openBlock(), createElementBlock("li", {
|
|
23
|
+
class: normalizeClass([
|
|
24
|
+
unref(cls).e("item"),
|
|
25
|
+
unref(bem).is("active", __props.active),
|
|
26
|
+
unref(bem).is("disabled", __props.item.disabled ?? false)
|
|
27
|
+
]),
|
|
28
|
+
onClick: handleClick
|
|
29
|
+
}, [__props.item.icon ? (openBlock(), createBlock(_sfc_main$1, {
|
|
30
|
+
key: 0,
|
|
31
|
+
icon: __props.item.icon,
|
|
32
|
+
class: normalizeClass(unref(cls).e("icon"))
|
|
33
|
+
}, null, 8, ["icon", "class"])) : createCommentVNode("v-if", true), createElementVNode("span", { class: normalizeClass(unref(cls).e("item-title")) }, toDisplayString(__props.item.title), 3)], 2);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
export { _sfc_main as default };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=group-nav-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-nav-item.js","names":[],"sources":["../../../src/components/group-nav/group-nav-item.vue"],"sourcesContent":["<template>\n <li\n :class=\"[cls.e('item'), bem.is('active', active), bem.is('disabled', item.disabled ?? false)]\"\n @click=\"handleClick\"\n >\n <NavIcon v-if=\"item.icon\" :icon=\"item.icon\" :class=\"cls.e('icon')\" />\n\n <span :class=\"cls.e('item-title')\">\n {{ item.title }}\n </span>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport { bem } from '@veltra/utils'\n\nimport type { NavItem } from '../../types/nav'\nimport NavIcon from '../nav/nav-icon.vue'\n\ndefineOptions({ name: 'UGroupNavItem' })\n\nconst props = defineProps<{ item: NavItem; active: boolean }>()\n\nconst emit = defineEmits<{ (e: 'click', item: NavItem): void }>()\n\nconst cls = bem('group-nav')\n\nfunction handleClick() {\n if (props.item.disabled) return\n emit('click', props.item)\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;EAqBA,MAAM,QAAQ;EAEd,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,WAAW;EAE3B,SAAS,cAAc;GACrB,IAAI,MAAM,KAAK,UAAU;GACzB,KAAK,SAAS,MAAM,IAAI;EAC1B;;uBA7BE,mBASK,MAAA;IARF,OAAK,eAAA;KAAG,MAAA,GAAA,CAAG,CAAC,EAAC,MAAA;KAAU,MAAA,GAAA,CAAG,CAAC,GAAE,UAAW,QAAA,MAAM;KAAG,MAAA,GAAA,CAAG,CAAC,GAAE,YAAa,QAAA,KAAK,YAAQ,KAAA;IAAA,CAAA;IACjF,SAAO;OAEO,QAAA,KAAK,QAAA,UAAA,GAApB,YAAqE,aAAA;;IAA1C,MAAM,QAAA,KAAK;IAAO,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,MAAA,CAAA;uEAEzD,mBAEO,QAAA,EAFA,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,YAAA,CAAA,EAAA,GAAA,gBACd,QAAA,KAAK,KAAK,GAAA,CAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _sfc_main$1 from "../scroll/scroll.js";
|
|
2
|
+
import _sfc_main$2 from "./group-nav-item.js";
|
|
3
|
+
import { Fragment, createBlock, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
|
|
4
|
+
import { bem } from "@veltra/utils";
|
|
5
|
+
//#region src/components/group-nav/group-nav.vue
|
|
6
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
|
+
name: "UGroupNav",
|
|
8
|
+
__name: "group-nav",
|
|
9
|
+
props: {
|
|
10
|
+
currentPath: {},
|
|
11
|
+
groups: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["item-click"],
|
|
14
|
+
setup(__props, { emit: __emit }) {
|
|
15
|
+
const emit = __emit;
|
|
16
|
+
const cls = bem("group-nav");
|
|
17
|
+
function handleItemClick(item) {
|
|
18
|
+
emit("item-click", item);
|
|
19
|
+
}
|
|
20
|
+
return (_ctx, _cache) => {
|
|
21
|
+
return openBlock(), createBlock(unref(_sfc_main$1), {
|
|
22
|
+
tag: "ul",
|
|
23
|
+
class: normalizeClass(unref(cls).b),
|
|
24
|
+
"container-class": unref(cls).e("container")
|
|
25
|
+
}, {
|
|
26
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.groups, (group, index) => {
|
|
27
|
+
return openBlock(), createElementBlock("li", {
|
|
28
|
+
key: group.title || index,
|
|
29
|
+
class: normalizeClass(unref(cls).e("group"))
|
|
30
|
+
}, [createElementVNode("div", { class: normalizeClass(unref(cls).e("group-label")) }, toDisplayString(group.title), 3), createElementVNode("ul", { class: normalizeClass(unref(cls).e("group-list")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(group.children, (child, childIndex) => {
|
|
31
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
32
|
+
key: child.path || childIndex,
|
|
33
|
+
item: child,
|
|
34
|
+
active: __props.currentPath === child.path,
|
|
35
|
+
onClick: handleItemClick
|
|
36
|
+
}, null, 8, ["item", "active"]);
|
|
37
|
+
}), 128))], 2)], 2);
|
|
38
|
+
}), 128))]),
|
|
39
|
+
_: 1
|
|
40
|
+
}, 8, ["class", "container-class"]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { _sfc_main as default };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=group-nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-nav.js","names":[],"sources":["../../../src/components/group-nav/group-nav.vue"],"sourcesContent":["<template>\n <u-scroll tag=\"ul\" :class=\"cls.b\" :container-class=\"cls.e('container')\">\n <li v-for=\"(group, index) of groups\" :key=\"group.title || index\" :class=\"cls.e('group')\">\n <div :class=\"cls.e('group-label')\">{{ group.title }}</div>\n <ul :class=\"cls.e('group-list')\">\n <GroupNavItem\n v-for=\"(child, childIndex) of group.children\"\n :key=\"child.path || childIndex\"\n :item=\"child\"\n :active=\"currentPath === child.path\"\n @click=\"handleItemClick\"\n />\n </ul>\n </li>\n </u-scroll>\n</template>\n\n<script lang=\"ts\" setup>\nimport { bem } from '@veltra/utils'\n\nimport type { GroupNavEmits, GroupNavProps } from '../../types/group-nav'\nimport type { NavItem } from '../../types/nav'\nimport { UScroll } from '../scroll'\nimport GroupNavItem from './group-nav-item.vue'\n\ndefineOptions({ name: 'UGroupNav' })\n\ndefineProps<GroupNavProps>()\nconst emit = defineEmits<GroupNavEmits>()\n\nconst cls = bem('group-nav')\n\nfunction handleItemClick(item: NavItem) {\n emit('item-click', item)\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;EA4BA,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,WAAW;EAE3B,SAAS,gBAAgB,MAAe;GACtC,KAAK,cAAc,IAAI;EACzB;;uBAjCE,YAaW,MAAA,WAAA,GAAA;IAbD,KAAI;IAAM,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,CAAC;IAAG,mBAAiB,MAAA,GAAA,CAAG,CAAC,EAAC,WAAA;;2BACnB,EAAA,UAAA,IAAA,GAApC,mBAWK,UAAA,MAAA,WAXwB,QAAA,SAAjB,OAAO,UAAK;yBAAxB,mBAWK,MAAA;MAXiC,KAAK,MAAM,SAAS;MAAQ,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,OAAA,CAAA;SAC5E,mBAA0D,OAAA,EAApD,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,aAAA,CAAA,EAAA,GAAA,gBAAoB,MAAM,KAAK,GAAA,CAAA,GACjD,mBAQK,MAAA,EARA,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,YAAA,CAAA,EAAA,GAAA,EAAA,UAAA,IAAA,GACf,mBAME,UAAA,MAAA,WAL8B,MAAM,WAA5B,OAAO,eAAU;0BAD3B,YAME,aAAA;OAJC,KAAK,MAAM,QAAQ;OACnB,MAAM;OACN,QAAQ,QAAA,gBAAgB,MAAM;OAC9B,SAAO"}
|