vome-core 0.0.90 → 0.0.92
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/admin/config/plugin-dev.js +67 -1
- package/dist/admin/crud/components/vm-switch.vue +1 -1
- package/dist/admin/crud/config.js +33 -1
- package/dist/admin/crud/confirm.js +97 -1
- package/dist/admin/crud/dict.js +67 -1
- package/dist/admin/crud/index.js +81 -1
- package/dist/admin/crud/key.js +20 -1
- package/dist/admin/crud/mitt.js +21 -1
- package/dist/admin/crud/plugins.js +278 -1
- package/dist/admin/crud/span.js +35 -1
- package/dist/admin/crud/style.js +132 -1
- package/dist/admin/crud/validate.js +92 -1
- package/dist/admin/crud/vm-search.vue +4 -4
- package/dist/admin/crud/vm-table.vue +2 -2
- package/dist/admin/crud/vm-upsert.vue +30 -1
- package/dist/admin/directives/perm.js +14 -1
- package/dist/admin/hooks/useUpload.js +63 -1
- package/dist/admin/lib/browser.js +24 -1
- package/dist/admin/lib/cn.js +5 -1
- package/dist/admin/lib/dialog-float.js +13 -1
- package/dist/admin/lib/export-excel.js +64 -1
- package/dist/admin/lib/import-excel.js +61 -1
- package/dist/admin/lib/json.js +42 -1
- package/dist/admin/lib/menu.js +11 -1
- package/dist/admin/lib/tree.js +1 -1
- package/dist/admin/lib/upload.js +88 -1
- package/dist/admin/lib/video-frame.js +80 -1
- package/dist/client/dict.d.ts +8 -1
- package/dist/client/dict.js +13 -2
- package/dist/index.js +28215 -1
- package/dist/server/index.js +36228 -1
- package/dist/shared/excel.js +93 -1
- package/dist/shared/index.js +20 -1
- package/dist/shared/locale-json.js +68 -1
- package/dist/shared/tree.js +39 -1
- package/package.json +1 -1
package/dist/client/dict.d.ts
CHANGED
|
@@ -14,8 +14,15 @@ export type EpsDictNode = EpsDictRow & {
|
|
|
14
14
|
};
|
|
15
15
|
export type EpsDictMap = Record<string, EpsDictNode[]>;
|
|
16
16
|
export declare function getDictMap(): EpsDictMap;
|
|
17
|
+
/**
|
|
18
|
+
* 一级业务字典(无 children、不含 name===color)
|
|
19
|
+
* 用于表单下拉 / switch 等不需要色值的场景
|
|
20
|
+
*/
|
|
17
21
|
export declare function getDict(typeKey: string): EpsDictNode[];
|
|
18
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* 一级业务项平铺为 { label, value, color? }
|
|
24
|
+
* color 取自该根项下子节点 name===color;供彩色 tag / 菜单类型等
|
|
25
|
+
*/
|
|
19
26
|
export declare function getDictOptions(typeKey: string): {
|
|
20
27
|
label: string;
|
|
21
28
|
value: string | number;
|
package/dist/client/dict.js
CHANGED
|
@@ -3,14 +3,25 @@ function isEmpty(val) {
|
|
|
3
3
|
return val === "" || val === null || val === undefined;
|
|
4
4
|
}
|
|
5
5
|
const data = Object.create(null);
|
|
6
|
+
function isColorMeta(n) {
|
|
7
|
+
return String(n.name || "") === "color";
|
|
8
|
+
}
|
|
6
9
|
export function getDictMap() {
|
|
7
10
|
return data;
|
|
8
11
|
}
|
|
9
12
|
export function getDict(typeKey) {
|
|
10
|
-
|
|
13
|
+
const roots = data[typeKey] || [];
|
|
14
|
+
return roots.filter((n) => !isColorMeta(n)).map((n) => {
|
|
15
|
+
const { children: _c, ...rest } = n;
|
|
16
|
+
return {
|
|
17
|
+
...rest,
|
|
18
|
+
label: n.label || n.name
|
|
19
|
+
};
|
|
20
|
+
});
|
|
11
21
|
}
|
|
12
22
|
export function getDictOptions(typeKey) {
|
|
13
|
-
|
|
23
|
+
const roots = data[typeKey] || [];
|
|
24
|
+
return roots.filter((n) => !isColorMeta(n)).map((n) => {
|
|
14
25
|
const colorChild = n.children?.find((c) => c.name === "color");
|
|
15
26
|
return {
|
|
16
27
|
label: n.label || n.name,
|