diff --git a/eslint.config.mjs b/eslint.config.mjs index 97e8193..f9d3b69 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -51,10 +51,11 @@ export default [ definePage: "readonly", // uni-pages 页面宏 getCurrentPages: "readonly", // uni-app 全局 API wx: "readonly", // 微信小程序 API - useToast: "readonly", // wot-design-uni - useDialog: "readonly", // wot-design-uni - useMessage: "readonly", // wot-design-uni - useNotify: "readonly", // wot-design-uni + UniHelper: "readonly", // uni-app 类型命名空间 + useToast: "readonly", // @wot-ui/ui + useDialog: "readonly", // @wot-ui/ui + useMessage: "readonly", // @wot-ui/ui + useNotify: "readonly", // @wot-ui/ui }, }, }, diff --git a/package.json b/package.json index b04f871..43a25f5 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,8 @@ "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei", "build:quickapp-webview-union": "uni build -p quickapp-webview-union", "type-check": "vue-tsc --noEmit", - "check": "pnpm type-check && pnpm lint:eslint:check && pnpm lint:stylelint:check", + "type-check:templates": "node scripts/check-templates.mjs", + "check": "pnpm type-check && pnpm type-check:templates && pnpm lint:eslint:check && pnpm lint:stylelint:check", "lint:eslint:check": "eslint \"src/**/*.{vue,ts}\"", "lint:eslint": "eslint \"src/**/*.{vue,ts}\" --fix", "lint:prettier": "prettier --write \"**/*.{js,cjs,ts,json,css,scss,vue,html,md}\"", diff --git a/src/api/file.ts b/src/api/file.ts index 65daf30..bd63153 100644 --- a/src/api/file.ts +++ b/src/api/file.ts @@ -9,9 +9,7 @@ baseApi = import.meta.env.VITE_APP_BASE_API; // #endif const FileAPI = { - /** - * 文件上传地址 - */ + /** 文件上传地址 */ uploadUrl: baseApi + "/api/v1/files", /** @@ -55,9 +53,7 @@ const FileAPI = { export default FileAPI; -/** - * 文件API类型声明 - */ +/** 文件API类型声明 */ export interface FileInfo { /** 文件名 */ name: string; diff --git a/src/api/menu.ts b/src/api/menu.ts index 77f696e..b7e8e85 100644 --- a/src/api/menu.ts +++ b/src/api/menu.ts @@ -77,7 +77,14 @@ export interface MenuQuery { keywords?: string; } -/** 菜单类型 */ +/** + * 菜单类型 + * + * 与后端 MenuTypeEnum 一致:C 目录、M 菜单、E 外链、B 按钮。 + */ +export type MenuType = "C" | "M" | "E" | "B"; + +/** 菜单实体 */ export interface MenuItem { children?: MenuItem[]; component?: string; @@ -93,8 +100,8 @@ export interface MenuItem { sort?: number; /** 状态(1:显示;0:隐藏) */ visible?: number; - /** 菜单类型(C:目录;M:菜单;B:按钮) */ - type?: string | number; + /** 菜单类型 */ + type?: MenuType; } /** 菜单表单类型 */ @@ -103,8 +110,8 @@ export interface MenuForm { id?: string; name?: string; parentId: string; - /** 菜单类型(C:目录;M:菜单;B:按钮) */ - type: string | number; + /** 菜单类型 */ + type: MenuType; routeName?: string; routePath?: string; component?: string; diff --git a/src/api/notice.ts b/src/api/notice.ts index 5d4faea..fecd890 100644 --- a/src/api/notice.ts +++ b/src/api/notice.ts @@ -114,20 +114,17 @@ export interface NoticeForm { export interface NoticeItem { id: string; title?: string; - content?: string; /** 通知类型 */ type?: number; publisherName?: string; - /** 优先级(0-低 1-中 2-高) */ - priority?: number; - /** 目标类型(0-全体 1-指定) */ + /** 目标类型(1-全体 2-指定) */ targetType?: number; - /** 发布状态(0-未发布 1已发布 2已撤回) */ + /** 发布状态(0-未发布 1-已发布 -1-已撤回) */ publishStatus?: number; publishTime?: Date; revokeTime?: Date; /** 优先级(L-低 M-中 H-高) */ - level?: string | number; + level?: string; } export interface NoticeDetail { @@ -140,6 +137,6 @@ export interface NoticeDetail { /** 优先级(L-低 M-中 H-高) */ level?: string; publishTime?: Date; - /** 发布状态(0-未发布 1-已发布 2-已撤回) */ + /** 发布状态(0-未发布 1-已发布 -1-已撤回) */ publishStatus?: number; } diff --git a/src/components/custom-navbar/index.vue b/src/components/AppNavbar.vue similarity index 54% rename from src/components/custom-navbar/index.vue rename to src/components/AppNavbar.vue index b7c06a0..9b4228d 100644 --- a/src/components/custom-navbar/index.vue +++ b/src/components/AppNavbar.vue @@ -1,38 +1,38 @@