diff --git a/components.d.ts b/components.d.ts index b22f1b5..0f8c824 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,8 +8,8 @@ export {} declare module 'vue' { export interface GlobalComponents { CuDateQuery: typeof import('./src/components/cu-date-query/index.vue')['default'] - CuPicker: typeof import('./src/components/cu-picker/index.vue')['default'] CustomNavbar: typeof import('./src/components/custom-navbar/index.vue')['default'] + CustomTree: typeof import('./src/components/custom-tree/index.vue')['default'] Loading1: typeof import('./src/components/qiun-loading/loading1.vue')['default'] Loading2: typeof import('./src/components/qiun-loading/loading2.vue')['default'] Loading3: typeof import('./src/components/qiun-loading/loading3.vue')['default'] @@ -27,11 +27,11 @@ declare module 'vue' { WdCheckbox: typeof import('wot-design-uni/components/wd-checkbox/wd-checkbox.vue')['default'] WdCollapse: typeof import('wot-design-uni/components/wd-collapse/wd-collapse.vue')['default'] WdCollapseItem: typeof import('wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue')['default'] + WdColPicker: typeof import('wot-design-uni/components/wd-col-picker/wd-col-picker.vue')['default'] WdConfigProvider: typeof import('wot-design-uni/components/wd-config-provider/wd-config-provider.vue')['default'] WdDivider: typeof import('wot-design-uni/components/wd-divider/wd-divider.vue')['default'] WdDropMenu: typeof import('wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue')['default'] WdDropMenuItem: typeof import('wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue')['default'] - WdFab: typeof import('wot-design-uni/components/wd-fab/wd-fab.vue')['default'] WdForm: typeof import('wot-design-uni/components/wd-form/wd-form.vue')['default'] WdFormItem: typeof import('wot-design-uni/components/wd-form-item/wd-form-item.vue')['default'] WdGrid: typeof import('wot-design-uni/components/wd-grid/wd-grid.vue')['default'] @@ -45,7 +45,6 @@ declare module 'vue' { WdLoadmore: typeof import('wot-design-uni/components/wd-loadmore/wd-loadmore.vue')['default'] WdMessageBox: typeof import('wot-design-uni/components/wd-message-box/wd-message-box.vue')['default'] WdNotify: typeof import('wot-design-uni/components/wd-notify/wd-notify.vue')['default'] - WdPicker: typeof import('wot-design-uni/components/wd-picker/wd-picker.vue')['default'] WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default'] WdProgress: typeof import('wot-design-uni/components/wd-progress/wd-progress.vue')['default'] WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default'] diff --git a/package.json b/package.json index 85bff78..5ff97b8 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@vueuse/core": "9.13.0", "pinia": "^2.3.1", "vue": "^3.5.22", - "wot-design-uni": "^1.13.0" + "wot-design-uni": "^1.14.0" }, "devDependencies": { "@commitlint/cli": "^19.8.1", diff --git a/skills-lock.json b/skills-lock.json new file mode 100644 index 0000000..4a3686e --- /dev/null +++ b/skills-lock.json @@ -0,0 +1,10 @@ +{ + "version": 1, + "skills": { + "wot-ui": { + "source": "wot-ui/wot-starter", + "sourceType": "github", + "computedHash": "b4f8b0577871b28dd12278f26961d015e378d7d4f11435599631f1ee6860c8eb" + } + } +} diff --git a/src/api/dict.ts b/src/api/dict.ts new file mode 100644 index 0000000..bade754 --- /dev/null +++ b/src/api/dict.ts @@ -0,0 +1,126 @@ +import request from "@/utils/request"; + +const DICT_BASE_URL = "/api/v1/dicts"; + +const DictAPI = { + getPage(queryParams: DictTypePageQuery) { + return request({ + url: `${DICT_BASE_URL}`, + method: "GET", + data: queryParams, + }); + }, + + getFormData(id: string | number) { + return request({ + url: `${DICT_BASE_URL}/${id}/form`, + method: "GET", + }); + }, + + create(data: DictTypeForm) { + return request({ + url: `${DICT_BASE_URL}`, + method: "POST", + data, + }); + }, + + update(id: string | number, data: DictTypeForm) { + return request({ + url: `${DICT_BASE_URL}/${id}`, + method: "PUT", + data, + }); + }, + + deleteByIds(ids: string) { + return request({ + url: `${DICT_BASE_URL}/${ids}`, + method: "DELETE", + }); + }, + + getItemPage(dictCode: string, queryParams: DictItemPageQuery) { + return request({ + url: `${DICT_BASE_URL}/${dictCode}/items`, + method: "GET", + data: queryParams, + }); + }, + + getItemFormData(dictCode: string, id: string | number) { + return request({ + url: `${DICT_BASE_URL}/${dictCode}/items/${id}/form`, + method: "GET", + }); + }, + + createItem(dictCode: string, data: DictItemForm) { + return request({ + url: `${DICT_BASE_URL}/${dictCode}/items`, + method: "POST", + data, + }); + }, + + updateItem(dictCode: string, id: string | number, data: DictItemForm) { + return request({ + url: `${DICT_BASE_URL}/${dictCode}/items/${id}`, + method: "PUT", + data, + }); + }, + + deleteItems(dictCode: string, ids: string) { + return request({ + url: `${DICT_BASE_URL}/${dictCode}/items/${ids}`, + method: "DELETE", + }); + }, +}; + +export default DictAPI; + +export interface DictTypePageQuery extends PageQuery { + keywords?: string; + status?: number; +} + +export interface DictTypeForm { + id?: string; + name?: string; + dictCode?: string; + status?: number; + remark?: string; +} + +export interface DictTypePageVO { + id?: string; + name?: string; + dictCode?: string; + status?: number; + remark?: string; +} + +export interface DictItemPageQuery extends PageQuery { + keywords?: string; +} + +export interface DictItemForm { + id?: string; + dictCode?: string; + label?: string; + value?: string; + sort?: number; + status?: number; +} + +export interface DictItemPageVO { + id?: string; + dictCode?: string; + label?: string; + value?: string; + sort?: number; + status?: number; +} diff --git a/src/api/menu.ts b/src/api/menu.ts new file mode 100644 index 0000000..8293a95 --- /dev/null +++ b/src/api/menu.ts @@ -0,0 +1,123 @@ +import request from "@/utils/request"; + +const MENU_BASE_URL = "/api/v1/menus"; + +const MenuAPI = { + /** 获取菜单列表 */ + getList(queryParams?: MenuQuery) { + return request({ + url: `${MENU_BASE_URL}`, + method: "GET", + data: queryParams, + }); + }, + + /** 获取菜单下拉选项 */ + getOptions(includeButton = false) { + return request({ + url: `${MENU_BASE_URL}/options`, + method: "GET", + data: { includeButton }, + }); + }, + + /** 获取菜单表单数据 */ + getFormData(id: string) { + return request({ + url: `${MENU_BASE_URL}/${id}/form`, + method: "GET", + }); + }, + + /** 新增菜单 */ + add(data: MenuForm) { + return request({ + url: `${MENU_BASE_URL}`, + method: "POST", + data, + }); + }, + + /** 修改菜单 */ + update(id: string, data: MenuForm) { + return request({ + url: `${MENU_BASE_URL}/${id}`, + method: "PUT", + data, + }); + }, + + /** 删除菜单 */ + deleteById(id: string) { + return request({ + url: `${MENU_BASE_URL}/${id}`, + method: "DELETE", + }); + }, +}; + +export default MenuAPI; + +/** 菜单查询参数 */ +export interface MenuQuery { + /** 搜索关键字 */ + keywords?: string; + /** 状态 */ + visible?: number; +} + +/** 菜单类型 */ +export interface MenuVO { + /** 子菜单 */ + children?: MenuVO[]; + /** 组件路径 */ + component?: string; + /** 创建时间 */ + createTime?: Date; + /** 图标 */ + icon?: string; + /** 菜单ID */ + id?: string; + /** 菜单名称 */ + name?: string; + /** 父菜单ID */ + parentId?: string; + /** 权限标识 */ + perm?: string; + /** 路由名称 */ + routeName?: string; + /** 路由路径 */ + routePath?: string; + /** 排序 */ + sort?: number; + /** 状态(1:显示;0:隐藏) */ + visible?: number; + /** 菜单类型(C:目录;M:菜单;B:按钮) */ + type?: string | number; +} + +/** 菜单表单类型 */ +export interface MenuForm { + /** 菜单ID(新增不填) */ + id?: string; + /** 菜单名称 */ + name?: string; + /** 父菜单ID */ + parentId: string; + /** 菜单类型(C:目录;M:菜单;B:按钮) */ + type: string | number; + /** 路由名称 */ + routeName?: string; + /** 路由路径 */ + routePath?: string; + /** 组件路径 */ + component?: string; + /** 权限标识 */ + perm?: string; + /** 图标 */ + icon?: string; + /** 排序 */ + sort?: number; + /** 状态(1:显示;0:隐藏) */ + visible?: number; +} diff --git a/src/api/role.ts b/src/api/role.ts index f4e7ea0..b18fda6 100644 --- a/src/api/role.ts +++ b/src/api/role.ts @@ -28,7 +28,7 @@ const RoleAPI = { */ getRoleMenuIds(roleId: number) { return request({ - url: `${ROLE_BASE_URL}/${roleId}/menuIds`, + url: `${ROLE_BASE_URL}/${roleId}/menu-ids`, method: "GET", }); }, @@ -116,6 +116,10 @@ export interface RolePageVO { sort?: number; /** 角色状态 */ status?: number; + /** 数据权限(1-所有数据 2-部门及子部门数据 3-本部门数据 4-本人数据 5-自定义部门数据) */ + dataScope?: number; + /** 数据权限标签 */ + dataScopeLabel?: string; /** 创建时间 */ createTime?: string; /** 修改时间 */ diff --git a/src/components/custom-tree/index.vue b/src/components/custom-tree/index.vue new file mode 100644 index 0000000..6e339bc --- /dev/null +++ b/src/components/custom-tree/index.vue @@ -0,0 +1,425 @@ + + + + + diff --git a/src/config/menu.ts b/src/config/menu.ts index 59b257e..3f67238 100644 --- a/src/config/menu.ts +++ b/src/config/menu.ts @@ -19,40 +19,93 @@ export const menuConfig: WorkMenuGroup[] = [ title: "系统管理", children: [ { - icon: "/static/icons/user.png", + icon: "/static/icons/user.svg", title: "用户管理", url: "/pages/work/user/index", perm: "sys:user:list", }, { - icon: "/static/icons/role.png", + icon: "/static/icons/role.svg", title: "角色管理", url: "/pages/work/role/index", perm: "sys:role:list", }, { - icon: "/static/icons/notice.png", - title: "通知公告", - url: "/pages/work/notice/index", - perm: "sys:notice:list", + icon: "/static/icons/company.svg", + title: "部门管理", + url: "/pages/work/dept/index", + perm: "sys:dept:list", }, { - icon: "/static/icons/setting.png", + icon: "/static/icons/settings.svg", title: "系统配置", url: "/pages/work/config/index", perm: "sys:config:list", }, + { + icon: "/static/icons/file.svg", + title: "字典管理", + url: "/pages/work/dict/index", + perm: "sys:dict:list", + }, + { + icon: "/static/icons/tree.svg", + title: "菜单管理", + url: "/pages/work/menu/index", + perm: "sys:menu:list", + }, + { + icon: "/static/icons/bell.svg", + title: "通知公告", + url: "/pages/work/notice/index", + perm: "sys:notice:list", + }, ], }, { title: "系统监控", children: [ { - icon: "/static/icons/log.png", + icon: "/static/icons/log.svg", title: "系统日志", url: "/pages/work/log/index", perm: "sys:log:list", }, + { + icon: "/static/icons/dashboard.svg", + title: "应用监控", + url: "https://www.baidu.com", + perm: "", + }, + ], + }, + { + title: "项目链接", + children: [ + { + icon: "/static/icons/company.svg", + title: "官网", + url: "https://www.youlai.tech/", + perm: "", + }, + { + icon: "/static/icons/file.svg", + title: "文档", + url: "https://youlai.blog.csdn.net/article/details/143222890", + perm: "", + }, + { + icon: "/static/icons/api.svg", + title: "接口", + url: "https://youlai.apifox.cn/", + perm: "", + }, + { + icon: "/static/icons/git.svg", + title: "仓库", + url: "https://atomgit.com/youlai/youlai-app", + perm: "", + }, ], }, ]; diff --git a/src/layouts/tabbar.vue b/src/layouts/tabbar.vue index 184cbbd..5cd071d 100644 --- a/src/layouts/tabbar.vue +++ b/src/layouts/tabbar.vue @@ -4,7 +4,7 @@ :custom-class="`page-wraper ${theme}`" :theme="theme" :style="{ - '--status-bar-height': statusBarHeight + 'px', + '--status-bar-height': statusBarHeight + 'px', }" > @@ -51,6 +51,17 @@ function handleTabbarChange({ value }: { value: string }) { router.pushTab({ name: value }); } +// 监听路由变化更新 tabbar 激活状态 +watch( + () => route.name, + (name) => { + if (name && name !== activeTabbar.value.name) { + setTabbarItemActive(name); + } + }, + { immediate: true } +); + onMounted(() => { const systemInfo = uni.getSystemInfoSync(); statusBarHeight.value = systemInfo.statusBarHeight || 0; @@ -58,11 +69,6 @@ onMounted(() => { // #ifdef APP-PLUS uni.hideTabBar(); // #endif - nextTick(() => { - if (route.name && route.name !== activeTabbar.value.name) { - setTabbarItemActive(route.name); - } - }); }); diff --git a/src/pages.json b/src/pages.json index 427acf4..6ee3c03 100644 --- a/src/pages.json +++ b/src/pages.json @@ -27,6 +27,14 @@ }, "layout": "tabbar" }, + { + "path": "pages/webview/index", + "type": "page", + "name": "webview", + "style": { + "navigationBarTitleText": "网页" + } + }, { "path": "pages/work/index", "type": "page", @@ -95,6 +103,14 @@ "navigationBarTitleText": "部门管理" } }, + { + "path": "pages/work/dict/index", + "type": "page", + "name": "dict", + "style": { + "navigationBarTitleText": "字典管理" + } + }, { "path": "pages/work/log/index", "type": "page", @@ -111,6 +127,14 @@ "navigationBarTitleText": "菜单管理" } }, + { + "path": "pages/work/monitor/index", + "type": "page", + "name": "monitor", + "style": { + "navigationBarTitleText": "应用监控" + } + }, { "path": "pages/work/notice/index", "type": "page", @@ -119,6 +143,14 @@ "navigationBarTitleText": "通知公告" } }, + { + "path": "pages/work/role/assign-perm", + "type": "page", + "name": "role-assign-perm", + "style": { + "navigationBarTitleText": "分配权限" + } + }, { "path": "pages/work/role/index", "type": "page", @@ -162,6 +194,14 @@ "style": { "navigationBarTitleText": "主题设置" } + }, + { + "path": "pages/work/dict/item/index", + "type": "page", + "name": "dict-item", + "style": { + "navigationBarTitleText": "字典数据" + } } ], "globalStyle": { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 5f456a3..6708813 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -45,9 +45,7 @@ - - - + 访客数 @@ -57,9 +55,7 @@ - - - + 浏览量 @@ -69,9 +65,6 @@ - - - 应用版本 @@ -108,23 +101,6 @@ + + + + +{ + "name": "webview", + "style": { "navigationBarTitleText": "网页" } +} + diff --git a/src/pages/work/config/index.vue b/src/pages/work/config/index.vue index d740c84..bb6820f 100644 --- a/src/pages/work/config/index.vue +++ b/src/pages/work/config/index.vue @@ -1,298 +1,240 @@ + + { "name": "config", @@ -301,34 +243,3 @@ onLoad(() => { } } - - diff --git a/src/pages/work/dept/index.vue b/src/pages/work/dept/index.vue index 1bd61d8..7d9cb4a 100644 --- a/src/pages/work/dept/index.vue +++ b/src/pages/work/dept/index.vue @@ -1,363 +1,345 @@ @@ -216,7 +213,7 @@ const deptOptions = ref([]); // 部门多列选择器数据 const deptSelected = ref<(string | number)[]>([]); -const deptColumns = ref[]>([]); +const deptColumns = ref[][]>([]); // 格式化部门展示 const displayDeptFormat = (selectedItems: Record[]) => { diff --git a/src/static/icons/api.svg b/src/static/icons/api.svg new file mode 100644 index 0000000..f361cd7 --- /dev/null +++ b/src/static/icons/api.svg @@ -0,0 +1 @@ +</> diff --git a/src/static/icons/bell.svg b/src/static/icons/bell.svg new file mode 100644 index 0000000..4c1282e --- /dev/null +++ b/src/static/icons/bell.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/browser.png b/src/static/icons/browser.png deleted file mode 100644 index fbadaa0..0000000 Binary files a/src/static/icons/browser.png and /dev/null differ diff --git a/src/static/icons/browser.svg b/src/static/icons/browser.svg index ef3c36d..a210362 100644 --- a/src/static/icons/browser.svg +++ b/src/static/icons/browser.svg @@ -1,4 +1,4 @@ - + diff --git a/src/static/icons/category.svg b/src/static/icons/category.svg new file mode 100644 index 0000000..32fccfd --- /dev/null +++ b/src/static/icons/category.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/company.svg b/src/static/icons/company.svg new file mode 100644 index 0000000..2d05d43 --- /dev/null +++ b/src/static/icons/company.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/dashboard.svg b/src/static/icons/dashboard.svg new file mode 100644 index 0000000..61eeafc --- /dev/null +++ b/src/static/icons/dashboard.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/file.svg b/src/static/icons/file.svg new file mode 100644 index 0000000..18a86ff --- /dev/null +++ b/src/static/icons/file.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/git.svg b/src/static/icons/git.svg new file mode 100644 index 0000000..f8b39af --- /dev/null +++ b/src/static/icons/git.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/log.png b/src/static/icons/log.png deleted file mode 100644 index e9777db..0000000 Binary files a/src/static/icons/log.png and /dev/null differ diff --git a/src/static/icons/log.svg b/src/static/icons/log.svg new file mode 100644 index 0000000..15526d9 --- /dev/null +++ b/src/static/icons/log.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/more.svg b/src/static/icons/more.svg new file mode 100644 index 0000000..f215c92 --- /dev/null +++ b/src/static/icons/more.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/notice.png b/src/static/icons/notice.png deleted file mode 100644 index ebde028..0000000 Binary files a/src/static/icons/notice.png and /dev/null differ diff --git a/src/static/icons/role.png b/src/static/icons/role.png deleted file mode 100644 index 890d96f..0000000 Binary files a/src/static/icons/role.png and /dev/null differ diff --git a/src/static/icons/role.svg b/src/static/icons/role.svg new file mode 100644 index 0000000..206832c --- /dev/null +++ b/src/static/icons/role.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/setting.png b/src/static/icons/setting.png deleted file mode 100644 index 45c0c1e..0000000 Binary files a/src/static/icons/setting.png and /dev/null differ diff --git a/src/static/icons/setting.svg b/src/static/icons/setting.svg deleted file mode 100644 index fe81bc7..0000000 --- a/src/static/icons/setting.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/static/icons/settings.svg b/src/static/icons/settings.svg new file mode 100644 index 0000000..0fad12a --- /dev/null +++ b/src/static/icons/settings.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/tree.svg b/src/static/icons/tree.svg new file mode 100644 index 0000000..bb29a92 --- /dev/null +++ b/src/static/icons/tree.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/static/icons/user.png b/src/static/icons/user.png deleted file mode 100644 index 9f58ed0..0000000 Binary files a/src/static/icons/user.png and /dev/null differ diff --git a/src/static/icons/user.svg b/src/static/icons/user.svg new file mode 100644 index 0000000..6290e97 --- /dev/null +++ b/src/static/icons/user.svg @@ -0,0 +1 @@ + diff --git a/src/static/icons/visitor.png b/src/static/icons/visitor.png deleted file mode 100644 index cf23b92..0000000 Binary files a/src/static/icons/visitor.png and /dev/null differ diff --git a/src/static/icons/visitor.svg b/src/static/icons/visitor.svg index e4aa560..199cffa 100644 --- a/src/static/icons/visitor.svg +++ b/src/static/icons/visitor.svg @@ -1,4 +1,4 @@ - + diff --git a/src/styles/index.scss b/src/styles/index.scss index 5e3e9b2..71faf8e 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -46,6 +46,7 @@ body, } .page--pt { + box-sizing: border-box; padding-top: 16rpx; } @@ -95,14 +96,28 @@ body, } // ========================================================================== -// 浮动按钮 +// 浮动新增按钮 // ========================================================================== -.wd-button.fab-btn { - box-sizing: border-box !important; - width: 80rpx !important; - min-width: 80rpx !important; - height: 80rpx !important; - padding: 0 !important; - border-radius: 40rpx !important; +.fab-add { + position: fixed; + right: 32rpx; + bottom: 120rpx; + z-index: 99; + display: flex; + align-items: center; + justify-content: center; + width: 88rpx; + height: 88rpx; + background: var(--color-primary); + border-radius: 50%; + box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15); + + &:active { + opacity: 0.8; + } + + .wd-icon { + color: #fff; + } } diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index e07162d..84925a2 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -32,6 +32,7 @@ declare global { const defineComponent: typeof import('vue')['defineComponent'] const defineStore: typeof import('pinia')['defineStore'] const dept: typeof import('../api/dept')['default'] + const dict: typeof import('../api/dict')['default'] const effectScope: typeof import('vue')['effectScope'] const file: typeof import('../api/file')['default'] const getAccessToken: typeof import('../utils/auth')['getAccessToken'] @@ -61,6 +62,7 @@ declare global { const mapStores: typeof import('pinia')['mapStores'] const mapWritableState: typeof import('pinia')['mapWritableState'] const markRaw: typeof import('vue')['markRaw'] + const menu: typeof import('../api/menu')['default'] const nextTick: typeof import('vue')['nextTick'] const notice: typeof import('../api/notice')['default'] const onActivated: typeof import('vue')['onActivated'] @@ -235,6 +237,7 @@ declare module 'vue' { readonly defineComponent: UnwrapRef readonly defineStore: UnwrapRef readonly dept: UnwrapRef + readonly dict: UnwrapRef readonly effectScope: UnwrapRef readonly file: UnwrapRef readonly getAccessToken: UnwrapRef @@ -262,6 +265,7 @@ declare module 'vue' { readonly mapStores: UnwrapRef readonly mapWritableState: UnwrapRef readonly markRaw: UnwrapRef + readonly menu: UnwrapRef readonly nextTick: UnwrapRef readonly notice: UnwrapRef readonly onActivated: UnwrapRef diff --git a/src/types/uni-pages.d.ts b/src/types/uni-pages.d.ts index c6b7409..0fb54af 100644 --- a/src/types/uni-pages.d.ts +++ b/src/types/uni-pages.d.ts @@ -7,6 +7,7 @@ interface NavigateToOptions { url: "/pages/index/index" | "/pages/login/index" | "/pages/mine/index" | + "/pages/webview/index" | "/pages/work/index" | "/pages/mine/about/index" | "/pages/mine/account/index" | @@ -17,15 +18,19 @@ interface NavigateToOptions { "/pages/mine/settings/index" | "/pages/work/config/index" | "/pages/work/dept/index" | + "/pages/work/dict/index" | "/pages/work/log/index" | "/pages/work/menu/index" | + "/pages/work/monitor/index" | "/pages/work/notice/index" | + "/pages/work/role/assign-perm" | "/pages/work/role/index" | "/pages/work/user/index" | "/pages/mine/settings/agreement/index" | "/pages/mine/settings/network/index" | "/pages/mine/settings/privacy/index" | - "/pages/mine/settings/theme/index"; + "/pages/mine/settings/theme/index" | + "/pages/work/dict/item/index"; } interface RedirectToOptions extends NavigateToOptions {} diff --git a/tsconfig.json b/tsconfig.json index 44f5887..f21ef92 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,9 @@ // 调整 Volar(Vue 语言服务工具)解析行为,用于为 uni-app 组件提供 TypeScript 类型 "plugins": ["@uni-helper/uni-types/volar-plugin"], // 禁用原生组件严格类型检查(uni-app 原生组件与 Volar 的兼容性问题) - "nativeTags": ["block", "component", "template", "slot"] + "nativeTags": ["block", "component", "template", "slot"], + // 忽略 slot props 隐式 any 类型错误(递归组件 slot 转发的已知限制) + "strictTemplates": false }, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], "exclude": ["node_modules", "dist"] diff --git a/vite.config.ts b/vite.config.ts index 7fc3579..709ea23 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -55,6 +55,7 @@ export default defineConfig(async ({ mode }: ConfigEnv): Promise => }), Components({ resolvers: [WotResolver()], + dirs: ["src/components"], }), AutoImport({