Skip to content

Commit

Permalink
release: update 3.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Aug 23, 2022
1 parent c07e60e commit 2888f8c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 16 deletions.
3 changes: 0 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
/>
<title>pure-admin-thin</title>
<link rel="icon" href="/favicon.ico" />
<script>
window.process = {};
</script>
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pure-admin-thin",
"version": "3.4.5",
"version": "3.4.6",
"private": true,
"scripts": {
"dev": "cross-env --max_old_space_size=4096 vite",
Expand Down Expand Up @@ -116,7 +116,7 @@
"stylelint-config-standard": "^24.0.0",
"stylelint-order": "^5.0.0",
"typescript": "^4.7.4",
"unocss": "^0.45.9",
"unocss": "^0.45.12",
"unplugin-vue-define-options": "^0.7.3",
"vite": "^3.0.9",
"vite-plugin-mock": "^2.9.6",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/serverConfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Version": "3.4.5",
"Version": "3.4.6",
"Title": "PureAdmin",
"FixedHeader": true,
"HiddenSideBar": false,
Expand Down
23 changes: 14 additions & 9 deletions src/router/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,21 @@ function addAsyncRoutes(arrRoutes: Array<RouteRecordRaw>) {
// 将backstage属性加入meta,标识此路由为后端返回路由
v.meta.backstage = true;
// 父级的redirect属性取值:如果子级存在且父级的redirect属性不存在,默认取第一个子级的path;如果子级存在且父级的redirect属性存在,取存在的redirect属性,会覆盖默认值
if (v?.children && !v.redirect) v.redirect = v.children[0].path;
if (v?.children && v.children.length && !v.redirect)
v.redirect = v.children[0].path;
// 父级的name属性取值:如果子级存在且父级的name属性不存在,默认取第一个子级的name;如果子级存在且父级的name属性存在,取存在的name属性,会覆盖默认值
if (v?.children && !v.name) v.name = v.children[0].name;
if (v.meta?.frameSrc) v.component = IFrame;
// 对后端传component组件路径和不传做兼容(如果后端传component组件路径,那么path可以随便写,如果不传,component组件路径会跟path保持一致)
const index = v?.component
? modulesRoutesKeys.findIndex(ev => ev.includes(v.component as any))
: modulesRoutesKeys.findIndex(ev => ev.includes(v.path));
v.component = modulesRoutes[modulesRoutesKeys[index]];
if (v.children) {
if (v?.children && v.children.length && !v.name)
v.name = v.children[0].name;
if (v.meta?.frameSrc) {
v.component = IFrame;
} else {
// 对后端传component组件路径和不传做兼容(如果后端传component组件路径,那么path可以随便写,如果不传,component组件路径会跟path保持一致)
const index = v?.component
? modulesRoutesKeys.findIndex(ev => ev.includes(v.component as any))
: modulesRoutesKeys.findIndex(ev => ev.includes(v.path));
v.component = modulesRoutes[modulesRoutesKeys[index]];
}
if (v?.children && v.children.length) {
addAsyncRoutes(v.children);
}
});
Expand Down
2 changes: 2 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
chunkSizeWarningLimit: 4000
},
define: {
"process.platform": null,
"process.version": null,
__INTLIFY_PROD_DEVTOOLS__: false,
__APP_INFO__: JSON.stringify(__APP_INFO__)
}
Expand Down

1 comment on commit 2888f8c

@vercel
Copy link

@vercel vercel bot commented on 2888f8c Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue-pure-thin – ./

vue-pure-thin-xiaoxian521.vercel.app
vue-pure-thin-git-main-xiaoxian521.vercel.app
vue-pure-thin.vercel.app

Please sign in to comment.