mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-20 18:46:39 +08:00
Merge branch 'main' into example
This commit is contained in:
commit
48e005bcaf
18
CHANGELOG.md
18
CHANGELOG.md
@ -1,6 +1,24 @@
|
||||
# Changelog
|
||||
|
||||
|
||||
## [v1.3.4](https://github.com/honghuangdc/soybean-admin/compare/v1.3.3...v1.3.4) (2024-08-01)
|
||||
|
||||
### 🚨 Breaking Changes
|
||||
|
||||
- **projects**: don't reset active menu of vertical-mix layout when it is mixSiderFixed - by @honghuangdc [<samp>(939c5)</samp>](https://github.com/honghuangdc/soybean-admin/commit/939c512)
|
||||
|
||||
### 🛠 Optimizations
|
||||
|
||||
- **projects**: optimize code - by @honghuangdc [<samp>(cb1d4)</samp>](https://github.com/honghuangdc/soybean-admin/commit/cb1d445)
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- **projects**: update deps & fix vue-router type - by @honghuangdc [<samp>(96837)</samp>](https://github.com/honghuangdc/soybean-admin/commit/968370b)
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
[](https://github.com/honghuangdc)
|
||||
|
||||
## [v1.3.3](https://github.com/honghuangdc/soybean-admin/compare/v1.3.2...v1.3.3) (2024-07-30)
|
||||
|
||||
### 🐞 Bug Fixes
|
||||
|
28
package.json
28
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "soybean-admin",
|
||||
"type": "module",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
|
||||
"author": {
|
||||
"name": "Soybean",
|
||||
@ -62,7 +62,6 @@
|
||||
"dompurify": "3.1.6",
|
||||
"echarts": "5.5.1",
|
||||
"jsbarcode": "3.11.6",
|
||||
"lodash-es": "4.17.21",
|
||||
"naive-ui": "2.39.0",
|
||||
"nprogress": "0.2.0",
|
||||
"pinia": "2.2.0",
|
||||
@ -71,33 +70,32 @@
|
||||
"swiper": "11.1.5",
|
||||
"tailwind-merge": "2.4.0",
|
||||
"vditor": "3.10.4",
|
||||
"vue": "3.4.34",
|
||||
"vue": "3.4.35",
|
||||
"vue-draggable-plus": "0.5.2",
|
||||
"vue-i18n": "9.13.1",
|
||||
"vue-pdf-embed": "2.1.0",
|
||||
"vue-router": "4.4.0",
|
||||
"vue-router": "4.4.1",
|
||||
"wangeditor": "4.7.15",
|
||||
"xgplayer": "3.0.19",
|
||||
"xlsx": "0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@amap/amap-jsapi-types": "0.0.15",
|
||||
"@elegant-router/vue": "0.3.7",
|
||||
"@elegant-router/vue": "0.3.8",
|
||||
"@iconify/json": "2.2.232",
|
||||
"@sa/scripts": "workspace:*",
|
||||
"@sa/uno-preset": "workspace:*",
|
||||
"@soybeanjs/eslint-config": "1.3.7",
|
||||
"@soybeanjs/eslint-config": "1.4.0",
|
||||
"@types/bmapgl": "0.0.7",
|
||||
"@types/dompurify": "3.0.5",
|
||||
"@types/lodash-es": "4.17.12",
|
||||
"@types/node": "22.0.0",
|
||||
"@types/node": "22.0.1",
|
||||
"@types/nprogress": "0.2.3",
|
||||
"@unocss/eslint-config": "0.61.7",
|
||||
"@unocss/preset-icons": "0.61.7",
|
||||
"@unocss/preset-uno": "0.61.7",
|
||||
"@unocss/transformer-directives": "0.61.7",
|
||||
"@unocss/transformer-variant-group": "0.61.7",
|
||||
"@unocss/vite": "0.61.7",
|
||||
"@unocss/eslint-config": "0.61.9",
|
||||
"@unocss/preset-icons": "0.61.9",
|
||||
"@unocss/preset-uno": "0.61.9",
|
||||
"@unocss/transformer-directives": "0.61.9",
|
||||
"@unocss/transformer-variant-group": "0.61.9",
|
||||
"@unocss/vite": "0.61.9",
|
||||
"@vitejs/plugin-vue": "5.1.1",
|
||||
"@vitejs/plugin-vue-jsx": "4.0.0",
|
||||
"eslint": "9.8.0",
|
||||
@ -105,7 +103,7 @@
|
||||
"lint-staged": "15.2.7",
|
||||
"sass": "1.77.8",
|
||||
"simple-git-hooks": "2.11.1",
|
||||
"tsx": "4.16.2",
|
||||
"tsx": "4.16.3",
|
||||
"typescript": "5.5.4",
|
||||
"unplugin-icons": "0.19.1",
|
||||
"unplugin-vue-components": "0.27.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/axios",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/color",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/hooks",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/materials",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/fetch",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/scripts",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"bin": {
|
||||
"sa": "./bin.ts"
|
||||
},
|
||||
@ -21,7 +21,7 @@
|
||||
"enquirer": "2.4.1",
|
||||
"execa": "9.3.0",
|
||||
"kolorist": "1.8.0",
|
||||
"npm-check-updates": "16.14.20",
|
||||
"npm-check-updates": "17.0.0",
|
||||
"rimraf": "6.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/uno-preset",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/utils",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
2397
pnpm-lock.yaml
2397
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -56,9 +56,7 @@ function handleSelectMixMenu(menu: App.Global.Menu) {
|
||||
:theme-color="themeStore.themeColor"
|
||||
@select="handleSelectMixMenu"
|
||||
@toggle-sider-collapse="appStore.toggleSiderCollapse"
|
||||
>
|
||||
<slot></slot>
|
||||
</FirstLevelMenu>
|
||||
/>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
|
@ -49,8 +49,11 @@ function handleSelectMixMenu(menu: App.Global.Menu) {
|
||||
}
|
||||
|
||||
function handleResetActiveMenu() {
|
||||
getActiveFirstLevelMenuKey();
|
||||
setDrawerVisible(false);
|
||||
|
||||
if (!appStore.mixSiderFixed) {
|
||||
getActiveFirstLevelMenuKey();
|
||||
}
|
||||
}
|
||||
|
||||
const selectedKey = computed(() => {
|
||||
|
@ -97,10 +97,13 @@ function transformElegantRouteToVueRoute(
|
||||
if (component) {
|
||||
if (isSingleLevelRoute(route)) {
|
||||
const { layout, view } = getSingleLevelRouteComponent(component);
|
||||
|
||||
|
||||
const singleLevelRoute: RouteRecordRaw = {
|
||||
path,
|
||||
component: layouts[layout],
|
||||
meta: {
|
||||
title: route.meta?.title || ''
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name,
|
||||
@ -110,36 +113,35 @@ function transformElegantRouteToVueRoute(
|
||||
} as RouteRecordRaw
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
return [singleLevelRoute];
|
||||
}
|
||||
|
||||
|
||||
if (isLayout(component)) {
|
||||
const layoutName = getLayoutName(component);
|
||||
|
||||
|
||||
vueRoute.component = layouts[layoutName];
|
||||
}
|
||||
|
||||
|
||||
if (isView(component)) {
|
||||
const viewName = getViewName(component);
|
||||
|
||||
|
||||
vueRoute.component = views[viewName];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(`Error transforming route "${route.name}": ${error.toString()}`);
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
// add redirect to child
|
||||
if (children?.length && !vueRoute.redirect) {
|
||||
vueRoute.redirect = {
|
||||
name: children[0].name
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (children?.length) {
|
||||
const childRoutes = children.flatMap(child => transformElegantRouteToVueRoute(child, layouts, views));
|
||||
|
||||
|
4
src/typings/elegant-router.d.ts
vendored
4
src/typings/elegant-router.d.ts
vendored
@ -88,7 +88,7 @@ declare module "@elegant-router/types" {
|
||||
|
||||
/**
|
||||
* custom route key
|
||||
*/
|
||||
*/
|
||||
export type CustomRouteKey = Extract<
|
||||
RouteKey,
|
||||
| "root"
|
||||
@ -109,7 +109,7 @@ declare module "@elegant-router/types" {
|
||||
|
||||
/**
|
||||
* the generated route key
|
||||
*/
|
||||
*/
|
||||
export type GeneratedRouteKey = Exclude<RouteKey, CustomRouteKey>;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user