@kengic/vue 0.15.2-beta.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { ComputedRef } from 'vue';
3
3
  import { Router } from 'vue-router';
4
4
  import { IKgLocale, KG_APP, Menu } from '../consts';
5
5
  export declare type IKgStateOption = {
6
- /** 模块首页. */
6
+ /** 模块首页地址. */
7
7
  appIndex?: {
8
8
  /** 默认为 '/wms/data-manager/index'. */
9
9
  [KG_APP.WMS_DATA_MANAGER]?: string;
@@ -14,6 +14,17 @@ export declare type IKgStateOption = {
14
14
  /** 默认为 '/sys/index'. */
15
15
  [KG_APP.SYS]?: string;
16
16
  };
17
+ /** 模块标题. */
18
+ appTitle?: {
19
+ /** 默认为 '数据管理'. */
20
+ [KG_APP.WMS_DATA_MANAGER]?: string;
21
+ /** 默认为 '仓库管理'. */
22
+ [KG_APP.WMS_BUSINESS_MANAGER]?: string;
23
+ /** 默认为 'WCS'. */
24
+ [KG_APP.WCS]?: string;
25
+ /** 默认为 '系统配置'. */
26
+ [KG_APP.SYS]?: string;
27
+ };
17
28
  KgModal?: {
18
29
  /** 拖拽移动. */
19
30
  drag?: {
@@ -230,5 +230,15 @@ export declare enum KG_HTTP_HEADERS {
230
230
  /** 拼接后的查询 SQL: ORDER BY. */
231
231
  KG_QUERY_ORDER_BY_SQL = "Kg-Query-Order-By-Sql"
232
232
  }
233
- /** 特殊属性:请求返回的原始响应数据 */
233
+ /** 特殊属性:请求返回的原始响应数据. */
234
234
  export declare const __KG__RESPONSE__ = "__KG__RESPONSE__";
235
+ /** 模块菜单的临时ID:数据管理. */
236
+ export declare const KG_TMP_MENU_ID__DATA_MANAGER = "KG_TMP_MENU_ID__DATA_MANAGER";
237
+ /** 模块菜单的临时ID:仓库管理. */
238
+ export declare const KG_TMP_MENU_ID__BUSINESS_MANAGER = "KG_TMP_MENU_ID__BUSINESS_MANAGER";
239
+ /** 模块菜单的临时ID:WCS. */
240
+ export declare const KG_TMP_MENU_ID__WCS = "KG_TMP_MENU_ID__WCS";
241
+ /** 模块菜单的临时ID:系统配置. */
242
+ export declare const KG_TMP_MENU_ID__SYS = "KG_TMP_MENU_ID__SYS";
243
+ /** 模块菜单的临时ID:PDA. */
244
+ export declare const KG_TMP_MENU_ID__PDA = "KG_TMP_MENU_ID__PDA";
@@ -10,10 +10,10 @@ export declare type IKgEventCb = {
10
10
  /** 菜单. */
11
11
  export interface Menu {
12
12
  id: string;
13
- app: string;
13
+ app: string | null;
14
14
  name: string;
15
15
  title: string;
16
- path: string;
16
+ path?: string;
17
17
  icon?: string;
18
18
  hideMenu?: boolean;
19
19
  children?: Menu[];
@@ -14,10 +14,16 @@ export declare class KgRouteUtil {
14
14
  static getMenuByPath(menus: Array<Menu>, path: string): Menu | null;
15
15
  /**
16
16
  * 翻译菜单标题.
17
- * @param menus 菜单列表, 可以是一棵树.
17
+ * @param menus 菜单列表, 树形结构.
18
18
  * @param titleKey 标题的属性名, 即要将哪个属性作为菜单的标题.
19
19
  */
20
- static translateMenus(menus?: Array<Menu> | null, titleKey?: string): Array<Menu>;
20
+ static translateMenus(menus: Array<Menu> | null | undefined, titleKey?: string): Array<Menu>;
21
+ /**
22
+ * 转换菜单列表.
23
+ * 1. 根据模块分组,
24
+ * @param menus 菜单列表, 树形结构.
25
+ */
26
+ static transformMenus(menus: Array<Menu> | null | undefined): Array<Menu>;
21
27
  /**
22
28
  * 判断某个路径是否属于某个模块.
23
29
  * @param path 路径.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.15.2-beta.0",
3
+ "version": "0.16.0",
4
4
  "scripts": {
5
5
  "build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",
@@ -19,8 +19,8 @@
19
19
  "bump-to:luotao.wms-vue3:focus": "npm run switch-node-version && tsx scripts/bump-to.luotao.wms-vue3.focus.ts",
20
20
  "copy-to:luotao.wms-vue3:focus": "npm run build:dev && tsx scripts/copy-to.luotao.wms-vue3.focus.ts",
21
21
  "--------------------": "",
22
- "switch-node-version": "node scripts/switch-node-version.mjs --experimental-default-type=module",
23
22
  "cnpm:sync": "npm run switch-node-version && cnpm sync @kengic/vue",
23
+ "switch-node-version": "node scripts/switch-node-version.mjs --experimental-default-type=module",
24
24
  "gen:apis:WMS": "npm run switch-node-version && kengic-pont generate-apis --config kg.config.ts --origin WMS",
25
25
  "bump-version:beta": "npm run switch-node-version && tsx scripts/bump.ts beta",
26
26
  "bump-version:major": "npm run switch-node-version && tsx scripts/bump.ts major",