Merge branch 'main' into example

This commit is contained in:
Soybean 2025-03-19 22:42:20 +08:00
commit 9a294204a2
18 changed files with 401 additions and 338 deletions

4
.vscode/launch.json vendored
View File

@ -14,7 +14,9 @@
"name": "TS Debugger", "name": "TS Debugger",
"runtimeExecutable": "tsx", "runtimeExecutable": "tsx",
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"], "skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"],
"program": "${file}" "program": "${file}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
} }
] ]
} }

View File

@ -3,7 +3,6 @@
"source.fixAll.eslint": "explicit", "source.fixAll.eslint": "explicit",
"source.organizeImports": "never" "source.organizeImports": "never"
}, },
"eslint.useFlatConfig": true,
"editor.formatOnSave": false, "editor.formatOnSave": false,
"eslint.validate": ["html", "css", "scss", "json", "jsonc"], "eslint.validate": ["html", "css", "scss", "json", "jsonc"],
"i18n-ally.displayLanguage": "zh-cn", "i18n-ally.displayLanguage": "zh-cn",

View File

@ -1,6 +1,33 @@
# Changelog # Changelog
## [v1.3.13](https://github.com/soybeanjs/soybean-admin/compare/v1.3.12...v1.3.13) (2025-03-19)
### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes
- **projects**: fix active tab switch issue after removal &nbsp;-&nbsp; by @me-o in https://github.com/soybeanjs/soybean-admin/issues/723 [<samp>(a7c59)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a7c59ada)
### &nbsp;&nbsp;&nbsp;📖 Documentation
- **projects**: update README &nbsp;-&nbsp; by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/718 [<samp>(3febb)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3febb65d)
### &nbsp;&nbsp;&nbsp;📦 Build
- **deps**: Restrict the minimum Node.js version. &nbsp;-&nbsp; by **一寸灰** in https://github.com/soybeanjs/soybean-admin/issues/720 [<samp>(a6ecd)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a6ecd3e0)
### &nbsp;&nbsp;&nbsp;🏡 Chore
- **deps**:
- update deps &nbsp;-&nbsp; by @soybeanjs [<samp>(5d8b7)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5d8b782d)
- update deps &nbsp;-&nbsp; by @soybeanjs [<samp>(2e8cb)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2e8cb35c)
- **projects**:
- update vscode settings and launch &nbsp;-&nbsp; by @soybeanjs [<samp>(8b12e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/8b12ef9f)
### &nbsp;&nbsp;&nbsp;❤️ Contributors
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![me-o](https://github.com/me-o.png?size=48)](https://github.com/me-o)&nbsp;&nbsp;[![Azir-11](https://github.com/Azir-11.png?size=48)](https://github.com/Azir-11)&nbsp;&nbsp;
[一寸灰](mailto:webzhangfei@163.com),&nbsp;
## [v1.3.12](https://github.com/soybeanjs/soybean-admin/compare/v1.3.11...v1.3.12) (2025-03-12) ## [v1.3.12](https://github.com/soybeanjs/soybean-admin/compare/v1.3.11...v1.3.12) (2025-03-12)
### &nbsp;&nbsp;&nbsp;🚀 Features ### &nbsp;&nbsp;&nbsp;🚀 Features

View File

@ -164,7 +164,7 @@ Thanks the following people for their contributions. If you want to contribute t
<div> <div>
<p>QQ Group</p> <p>QQ Group</p>
<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/qq-soybean-admin-3.jpg" style="width:200px" /> <img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/qq-soybean-admin-4.jpg" style="width:200px" />
</div> </div>
<!-- <div> <!-- <div>
<p>WeChat Group</p> <p>WeChat Group</p>

View File

@ -191,7 +191,7 @@ pnpm build
<div> <div>
<p>QQ交流群</p> <p>QQ交流群</p>
<img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/qq-soybean-admin-3.jpg" style="width:200px" /> <img src="https://soybeanjs-1300612522.cos.ap-guangzhou.myqcloud.com/uPic/qq-soybean-admin-4.jpg" style="width:200px" />
</div> </div>
<!-- <div> <!-- <div>
<p>微信群</p> <p>微信群</p>

View File

@ -1,7 +1,7 @@
{ {
"name": "soybean-admin", "name": "soybean-admin",
"type": "module", "type": "module",
"version": "1.3.12", "version": "1.3.13",
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。", "description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
"author": { "author": {
"name": "Soybean", "name": "Soybean",
@ -27,7 +27,7 @@
"UnoCSS" "UnoCSS"
], ],
"engines": { "engines": {
"node": ">=18.12.0", "node": ">=18.20.0",
"pnpm": ">=8.7.0" "pnpm": ">=8.7.0"
}, },
"scripts": { "scripts": {
@ -48,7 +48,7 @@
}, },
"dependencies": { "dependencies": {
"@antv/data-set": "0.11.8", "@antv/data-set": "0.11.8",
"@antv/g2": "5.2.11", "@antv/g2": "5.2.12",
"@antv/g6": "5.0.44", "@antv/g6": "5.0.44",
"@better-scroll/core": "2.5.1", "@better-scroll/core": "2.5.1",
"@iconify/vue": "4.3.0", "@iconify/vue": "4.3.0",
@ -58,7 +58,7 @@
"@sa/hooks": "workspace:*", "@sa/hooks": "workspace:*",
"@sa/materials": "workspace:*", "@sa/materials": "workspace:*",
"@sa/utils": "workspace:*", "@sa/utils": "workspace:*",
"@visactor/vchart": "1.13.6", "@visactor/vchart": "1.13.7",
"@visactor/vchart-theme": "1.12.2", "@visactor/vchart-theme": "1.12.2",
"@visactor/vtable-editors": "1.17.2", "@visactor/vtable-editors": "1.17.2",
"@visactor/vtable-gantt": "1.17.2", "@visactor/vtable-gantt": "1.17.2",
@ -68,7 +68,7 @@
"clipboard": "2.0.11", "clipboard": "2.0.11",
"dayjs": "1.11.13", "dayjs": "1.11.13",
"defu": "6.1.4", "defu": "6.1.4",
"dhtmlx-gantt": "9.0.5", "dhtmlx-gantt": "9.0.6",
"dompurify": "3.2.4", "dompurify": "3.2.4",
"echarts": "5.6.0", "echarts": "5.6.0",
"jsbarcode": "3.11.6", "jsbarcode": "3.11.6",
@ -94,7 +94,7 @@
"devDependencies": { "devDependencies": {
"@amap/amap-jsapi-types": "0.0.15", "@amap/amap-jsapi-types": "0.0.15",
"@elegant-router/vue": "0.3.8", "@elegant-router/vue": "0.3.8",
"@iconify/json": "2.2.316", "@iconify/json": "2.2.318",
"@sa/scripts": "workspace:*", "@sa/scripts": "workspace:*",
"@sa/uno-preset": "workspace:*", "@sa/uno-preset": "workspace:*",
"@soybeanjs/eslint-config": "1.6.0", "@soybeanjs/eslint-config": "1.6.0",
@ -107,20 +107,20 @@
"@unocss/transformer-directives": "66.0.0", "@unocss/transformer-directives": "66.0.0",
"@unocss/transformer-variant-group": "66.0.0", "@unocss/transformer-variant-group": "66.0.0",
"@unocss/vite": "66.0.0", "@unocss/vite": "66.0.0",
"@vitejs/plugin-vue": "5.2.1", "@vitejs/plugin-vue": "5.2.3",
"@vitejs/plugin-vue-jsx": "4.1.1", "@vitejs/plugin-vue-jsx": "4.1.2",
"consola": "3.4.0", "consola": "3.4.2",
"eslint": "9.22.0", "eslint": "9.22.0",
"eslint-plugin-vue": "10.0.0", "eslint-plugin-vue": "10.0.0",
"kolorist": "1.8.0", "kolorist": "1.8.0",
"lint-staged": "15.5.0", "lint-staged": "15.5.0",
"sass": "1.85.1", "sass": "1.86.0",
"simple-git-hooks": "2.11.1", "simple-git-hooks": "2.11.1",
"tsx": "4.19.3", "tsx": "4.19.3",
"typescript": "5.8.2", "typescript": "5.8.2",
"unplugin-icons": "22.1.0", "unplugin-icons": "22.1.0",
"unplugin-vue-components": "28.4.1", "unplugin-vue-components": "28.4.1",
"vite": "6.2.1", "vite": "6.2.2",
"vite-plugin-progress": "0.0.7", "vite-plugin-progress": "0.0.7",
"vite-plugin-svg-icons": "2.0.1", "vite-plugin-svg-icons": "2.0.1",
"vite-plugin-vue-devtools": "7.7.2", "vite-plugin-vue-devtools": "7.7.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/alova", "name": "@sa/alova",
"version": "1.3.12", "version": "1.3.13",
"exports": { "exports": {
".": "./src/index.ts", ".": "./src/index.ts",
"./fetch": "./src/fetch.ts", "./fetch": "./src/fetch.ts",

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/axios", "name": "@sa/axios",
"version": "1.3.12", "version": "1.3.13",
"exports": { "exports": {
".": "./src/index.ts" ".": "./src/index.ts"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/color", "name": "@sa/color",
"version": "1.3.12", "version": "1.3.13",
"exports": { "exports": {
".": "./src/index.ts" ".": "./src/index.ts"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/hooks", "name": "@sa/hooks",
"version": "1.3.12", "version": "1.3.13",
"exports": { "exports": {
".": "./src/index.ts" ".": "./src/index.ts"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/materials", "name": "@sa/materials",
"version": "1.3.12", "version": "1.3.13",
"exports": { "exports": {
".": "./src/index.ts" ".": "./src/index.ts"
}, },

View File

@ -63,7 +63,7 @@ function handleClose() {
<slot></slot> <slot></slot>
<template #suffix> <template #suffix>
<slot name="suffix"> <slot name="suffix">
<SvgClose v-if="closable" :class="[style['svg-close']]" @click.stop="handleClose" /> <SvgClose v-if="closable" :class="[style['svg-close']]" @pointerdown.stop="handleClose" />
</slot> </slot>
</template> </template>
</component> </component>

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/fetch", "name": "@sa/fetch",
"version": "1.3.12", "version": "1.3.13",
"exports": { "exports": {
".": "./src/index.ts" ".": "./src/index.ts"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/scripts", "name": "@sa/scripts",
"version": "1.3.12", "version": "1.3.13",
"bin": { "bin": {
"sa": "./bin.ts" "sa": "./bin.ts"
}, },
@ -17,7 +17,7 @@
"bumpp": "10.1.0", "bumpp": "10.1.0",
"c12": "3.0.2", "c12": "3.0.2",
"cac": "6.7.14", "cac": "6.7.14",
"consola": "3.4.0", "consola": "3.4.2",
"enquirer": "2.4.1", "enquirer": "2.4.1",
"execa": "9.5.2", "execa": "9.5.2",
"kolorist": "1.8.0", "kolorist": "1.8.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/uno-preset", "name": "@sa/uno-preset",
"version": "1.3.12", "version": "1.3.13",
"exports": { "exports": {
".": "./src/index.ts" ".": "./src/index.ts"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/utils", "name": "@sa/utils",
"version": "1.3.12", "version": "1.3.13",
"exports": { "exports": {
".": "./src/index.ts" ".": "./src/index.ts"
}, },
@ -14,7 +14,7 @@
"crypto-js": "4.2.0", "crypto-js": "4.2.0",
"klona": "2.0.6", "klona": "2.0.6",
"localforage": "1.10.0", "localforage": "1.10.0",
"nanoid": "5.1.3" "nanoid": "5.1.5"
}, },
"devDependencies": { "devDependencies": {
"@types/crypto-js": "4.2.2" "@types/crypto-js": "4.2.2"

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,6 @@ import { SetupStoreId } from '@/enum';
import { useThemeStore } from '../theme'; import { useThemeStore } from '../theme';
import { import {
extractTabsByAllRoutes, extractTabsByAllRoutes,
filterTabsById,
filterTabsByIds, filterTabsByIds,
findTabByRouteName, findTabByRouteName,
getAllTabs, getAllTabs,
@ -96,23 +95,15 @@ export const useTabStore = defineStore(SetupStoreId.Tab, () => {
* @param tabId Tab id * @param tabId Tab id
*/ */
async function removeTab(tabId: string) { async function removeTab(tabId: string) {
const removeTabIndex = tabs.value.findIndex(tab => tab.id === tabId);
if (removeTabIndex === -1) return;
const isRemoveActiveTab = activeTabId.value === tabId; const isRemoveActiveTab = activeTabId.value === tabId;
const updatedTabs = filterTabsById(tabId, tabs.value); const nextTab = tabs.value[removeTabIndex + 1] || homeTab.value;
function update() { tabs.value.splice(removeTabIndex, 1);
tabs.value = updatedTabs; if (isRemoveActiveTab && nextTab) {
} await switchRouteByTab(nextTab);
if (!isRemoveActiveTab) {
update();
return;
}
const activeTab = updatedTabs.at(-1) || homeTab.value;
if (activeTab) {
await switchRouteByTab(activeTab);
update();
} }
} }