diff --git a/build/transform/require-context/index.ts b/build/plugin/vite-plugin-context-plugin/transform.ts similarity index 99% rename from build/transform/require-context/index.ts rename to build/plugin/vite-plugin-context-plugin/transform.ts index 0800a3bacbd250e18e24d45a674b7ee925177ea4..5ef211b334258aeab2325347fde82223112d31cf 100644 --- a/build/transform/require-context/index.ts +++ b/build/plugin/vite-plugin-context-plugin/transform.ts @@ -1,3 +1,4 @@ +// 修改自 // https://github.com/luxueyan/vite-transform-globby-import/blob/master/src/index.ts // TODO 目前还不能监听文件新增及删除 内容已经改变,缓存问题? diff --git a/build/script/build.ts b/build/script/build.ts index a87373a1db210d97a12388e2df5acc3ac09dfe6f..ed018ce8f295555ce7cf1a7c826109c5ca7e1010 100644 --- a/build/script/build.ts +++ b/build/script/build.ts @@ -1,6 +1,7 @@ // #!/usr/bin/env node import { sh } from 'tasksfile'; + import { argv } from 'yargs'; import { runBuildConfig } from './buildConf'; import { runUpdateHtml } from './updateHtml'; @@ -9,7 +10,7 @@ import { errorConsole, successConsole } from '../utils'; export const runBuild = async () => { try { const argvList = argv._; - let cmd = `cross-env NODE_ENV=production vite build`; + let cmd = `npx cross-env NODE_ENV=production vite build`; await sh(cmd, { async: true, nopipe: true, diff --git a/package.json b/package.json index f9ddfbe14e2cadffbe909ffde658f19b650f1f21..6813b7128ebf673f04733db35e6724dcc92355e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vben-admin-2.0", - "version": "2.0.0-beta.7", + "version": "2.0.0-beta.8", "scripts": { "bootstrap": "yarn install", "serve": "node ./build/jsc.js preserve && cross-env NODE_ENV=development vite", diff --git a/postcss.config.js b/postcss.config.js index 501d049866b334ce10dd8ce43b225136cb828a9e..ded38c3fa7549a6f2a331f68b425c002e9497812 100755 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,4 +1,3 @@ -const path = require('path'); module.exports = { plugins: [require('autoprefixer'), require('postcss-import')], }; diff --git a/src/components/Menu/src/BasicMenu.tsx b/src/components/Menu/src/BasicMenu.tsx index 74731096c599346eab0fdf675b24495a1fb6644f..217f14559280f34dc67760512b2e3ec5ffa99200 100644 --- a/src/components/Menu/src/BasicMenu.tsx +++ b/src/components/Menu/src/BasicMenu.tsx @@ -91,7 +91,7 @@ export default defineComponent({ }); watch( - () => currentRoute.value.name, + () => currentRoute.value.path, (name: string) => { name !== 'Redirect' && handleMenuChange(); getParentPath(); @@ -210,7 +210,7 @@ export default defineComponent({ : {}; return ( {{ default: () => ( - <> -
- -
-
{realName}
-
+
+ +
+
{realName}
- +
), overlay: () => ( @@ -70,12 +68,10 @@ export default defineComponent({ {showDoc && ( {() => ( - <> - - - 文档 - - + + + 文档 + )} )} diff --git a/src/layouts/default/setting/SettingDrawer.tsx b/src/layouts/default/setting/SettingDrawer.tsx index e565a278226138f9e219ae6d514c2a0f236050e6..1902cc35ce15269b782091a524765bbb1b06ed10 100644 --- a/src/layouts/default/setting/SettingDrawer.tsx +++ b/src/layouts/default/setting/SettingDrawer.tsx @@ -406,6 +406,7 @@ export default defineComponent({ menuSetting: { mode, type, + collapsed: false, ...splitOpt, }, }; diff --git a/src/router/routes/modules/demo/feat.ts b/src/router/routes/modules/demo/feat.ts index f905640316b738c19bb9ee4b1c736620d2e68a02..1725a6c29bf2041346a0d9042a58d4b53d12bd96 100644 --- a/src/router/routes/modules/demo/feat.ts +++ b/src/router/routes/modules/demo/feat.ts @@ -10,7 +10,7 @@ export default { redirect: '/feat/icon', meta: { icon: 'ic:outline-featured-play-list', - title: 'Feat', + title: '页面功能', }, }, diff --git a/src/views/dashboard/analysis/components/FlowAnalysis.tsx b/src/views/dashboard/analysis/components/FlowAnalysis.tsx index dd01934ecb141d435cb2c969094522d548a9f934..81563570cc7d32a85b31f19dd61c8cb5a59843cc 100644 --- a/src/views/dashboard/analysis/components/FlowAnalysis.tsx +++ b/src/views/dashboard/analysis/components/FlowAnalysis.tsx @@ -11,7 +11,7 @@ export default defineComponent({ return ( {() => ( - <> +
{() => ( {() => ( - <> +
86.2
@@ -44,7 +44,7 @@ export default defineComponent({ 56.5 - +
)}
)} @@ -56,26 +56,24 @@ export default defineComponent({ )} - +
)}
); }; return () => ( - {() => ( - <> - - {() => renderContent()} - - - {() => renderContent()} - - - {() => renderContent()} - - - )} + {() => [ + + {() => renderContent()} + , + + {() => renderContent()} + , + + {() => renderContent()} + , + ]} ); },