diff --git a/.env b/.env index 057d106..3f54697 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ VITE_TITLE = 绝弹项目管理 # 网站副标题 VITE_SUBTITLE = 快速开发web应用的模板工具 -# 部署路径 +# 部署路径: 当为 ./ 时路由模式需为 hash VITE_BASE = / # 接口前缀:参见 axios 的 baseURL VITE_API = / diff --git a/README.md b/README.md index 81c8ea3..651a232 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ - 图标/样式一个类名搞定 - 遵循 Conventional Changelog 规范, 自动生成版本记录文档 - 内置常用 VsCode 代码片段和推荐扩展,提升开发效率 +- 支持路由动态打包、路由权限、路由缓存和动态首页 ## 快速开始 diff --git a/src/App.vue b/src/App.vue index f6fb06d..fb44bef 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,36 @@ diff --git a/src/api/interceptors/exception.ts b/src/api/interceptors/exception.ts index 7d36207..399c5e9 100644 --- a/src/api/interceptors/exception.ts +++ b/src/api/interceptors/exception.ts @@ -5,6 +5,7 @@ import { has, isString } from "lodash-es"; const successCodes = [2000]; const expiredCodes = [4050, 4051]; const resMessageTip = `响应异常,请检查参数或稍后重试!`; +const resGetMessage = `数据获取失败,请检查网络或稍后重试!`; const reqMessageTip = `请求失败,请检查网络或稍后重试!`; let logoutTipShowing = false; @@ -49,6 +50,9 @@ export function addExceptionInterceptor(axios: AxiosInstance, exipreHandler?: (. } const resMsg = error.response?.data?.message; let message: string | null = resMsg ?? resMessageTip; + if (error.config?.method === "get") { + message = resGetMessage; + } if (has(error.config, "resErrorTip")) { const tip = error.config.resErrorTip; if (tip) { diff --git a/src/components/empty/AniEmpty.vue b/src/components/empty/AniEmpty.vue new file mode 100644 index 0000000..b95424a --- /dev/null +++ b/src/components/empty/AniEmpty.vue @@ -0,0 +1,106 @@ + diff --git a/src/components/empty/index.vue b/src/components/empty/index.vue deleted file mode 100644 index 41f59c8..0000000 --- a/src/components/empty/index.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - diff --git a/src/components/table/table.tsx b/src/components/table/table.tsx index 8b6d554..a5b17b9 100644 --- a/src/components/table/table.tsx +++ b/src/components/table/table.tsx @@ -1,7 +1,7 @@ import { TableColumnData as BaseColumn, TableData as BaseData, Table as BaseTable } from "@arco-design/web-vue"; import { merge } from "lodash-es"; import { PropType, computed, defineComponent, reactive, ref } from "vue"; -import AniEmpty from "../empty/index.vue"; +import AniEmpty from "../empty/AniEmpty.vue"; import { Form, FormInstance, FormModal, FormModalInstance, FormModalProps, FormProps } from "../form"; import { config } from "./table.config"; diff --git a/src/pages/[..._all]/index.vue b/src/pages/[..._all]/index.vue index be413b5..51b785e 100644 --- a/src/pages/[..._all]/index.vue +++ b/src/pages/[..._all]/index.vue @@ -1,9 +1,7 @@