diff --git a/build/utils.ts b/build/utils.ts index 296738941..cac884c64 100644 --- a/build/utils.ts +++ b/build/utils.ts @@ -3,7 +3,13 @@ import { readdir, stat } from "node:fs"; import { fileURLToPath } from "node:url"; import { dirname, resolve } from "node:path"; import { sum, formatBytes } from "@pureadmin/utils"; -import { dependencies, devDependencies, name, version } from "../package.json"; +import { + name, + version, + engines, + dependencies, + devDependencies +} from "../package.json"; /** 启动`node`进程时所在工作目录的绝对路径 */ const root: string = process.cwd(); @@ -35,9 +41,9 @@ const alias: Record = { "@build": pathResolve() }; -/** 平台的名称、版本、依赖、最后构建时间 */ +/** 平台的名称、版本、运行所需的`node`和`pnpm`版本、依赖、最后构建时间的类型提示 */ const __APP_INFO__ = { - pkg: { name, version, dependencies, devDependencies }, + pkg: { name, version, engines, dependencies, devDependencies }, lastBuildTime: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss") }; diff --git a/src/components/ReIcon/src/offlineIcon.ts b/src/components/ReIcon/src/offlineIcon.ts index be3b5c571..830e9002e 100644 --- a/src/components/ReIcon/src/offlineIcon.ts +++ b/src/components/ReIcon/src/offlineIcon.ts @@ -27,6 +27,7 @@ import Lollipop from "@iconify-icons/ep/lollipop"; import Monitor from "@iconify-icons/ep/monitor"; import Tag from "@iconify-icons/ri/bookmark-2-line"; import Table from "@iconify-icons/ri/table-line"; +import Info from "@iconify-icons/ri/file-info-line"; addIcon("ubuntuFill", UbuntuFill); addIcon("menu", Menu); addIcon("edit", Edit); @@ -49,3 +50,4 @@ addIcon("lollipop", Lollipop); addIcon("monitor", Monitor); addIcon("tag", Tag); addIcon("table", Table); +addIcon("info", Info); diff --git a/src/router/enums.ts b/src/router/enums.ts index 25b32bfb3..c324f0805 100644 --- a/src/router/enums.ts +++ b/src/router/enums.ts @@ -12,12 +12,12 @@ const home = 0, // 平台规定只有 home 路由的 rank 才能为 0 ,所以 permission = 9, system = 10, tabs = 11, - formdesign = 12, - flowchart = 13, - ppt = 14, - editor = 15, - guide = 16, - about = 17, + about = 12, + formdesign = 13, + flowchart = 14, + ppt = 15, + editor = 16, + guide = 17, menuoverflow = 18; export { @@ -33,11 +33,11 @@ export { permission, system, tabs, + about, formdesign, flowchart, ppt, editor, guide, - about, menuoverflow }; diff --git a/src/router/modules/about.ts b/src/router/modules/about.ts index f4fef7b4d..0ef9cb6cc 100644 --- a/src/router/modules/about.ts +++ b/src/router/modules/about.ts @@ -5,6 +5,7 @@ export default { path: "/about", redirect: "/about/index", meta: { + icon: "info", title: $t("menus.hsAbout"), rank: about }, diff --git a/src/router/modules/formdesign.ts b/src/router/modules/formdesign.ts index 9bd1b9e62..f814eac8f 100644 --- a/src/router/modules/formdesign.ts +++ b/src/router/modules/formdesign.ts @@ -18,7 +18,7 @@ export default { meta: { title: $t("menus.hsFormDesign"), frameSrc: - "https://haixin-fang.github.io/starfish-vue3-lowcode/playground/index.html#/" + "https://haixin-fang.github.io/vue-form-design/playground/index.html" } } ] diff --git a/src/views/about/columns.tsx b/src/views/about/columns.tsx index ec201b335..ebf547109 100644 --- a/src/views/about/columns.tsx +++ b/src/views/about/columns.tsx @@ -1,67 +1,99 @@ export function useColumns() { const { pkg, lastBuildTime } = __APP_INFO__; - const { version } = pkg; + const { version, engines } = pkg; const columns = [ { - label: "版本", + label: "当前版本", cellRenderer: () => { - return {version}; + return ( + + {version} + + ); } }, { label: "最后编译时间", - cellRenderer: () => { - return {lastBuildTime}; - } - }, - { - label: "文档地址", cellRenderer: () => { return ( - - 文档地址 - + + {lastBuildTime} + ); } }, { - label: "预览地址", + label: "推荐 node 版本", cellRenderer: () => { return ( - - 预览地址 - + + {engines.node} + ); } }, { - label: "Github", + label: "推荐 pnpm 版本", + cellRenderer: () => { + return ( + + {engines.pnpm} + + ); + } + }, + { + label: "完整版代码地址", + className: "pure-version", cellRenderer: () => { return ( - Github + 完整版代码链接 ); } }, { - label: "精简版", + label: "精简版代码地址", + className: "pure-version", cellRenderer: () => { return ( - 精简版 + 精简版代码链接 + + ); + } + }, + { + label: "文档地址", + className: "pure-version", + cellRenderer: () => { + return ( + + 文档链接 + + ); + } + }, + { + label: "预览地址", + className: "pure-version", + cellRenderer: () => { + return ( + + 预览链接 ); } diff --git a/src/views/about/index.vue b/src/views/about/index.vue index 0c6c44c5d..d5174be91 100644 --- a/src/views/about/index.vue +++ b/src/views/about/index.vue @@ -1,5 +1,7 @@