mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-24 20:36:37 +08:00
chore(projects): merge branch main into example
This commit is contained in:
commit
d3210edc6a
29
CHANGELOG.md
29
CHANGELOG.md
@ -1,6 +1,35 @@
|
||||
# Changelog
|
||||
|
||||
|
||||
## [v1.2.5](https://github.com/soybeanjs/soybean-admin/compare/v1.2.4...v1.2.5) (2024-06-15)
|
||||
|
||||
### 🐞 Bug Fixes
|
||||
|
||||
- **projects**: Fix the issue of abnormal tab caching after logout. fixed #495 - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/495 [<samp>(3eeac)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3eeace9)
|
||||
|
||||
### 🔥 Performance
|
||||
|
||||
- **project**: Initializing the static routing function does not require asynchronization - by **CHENZL** in https://github.com/soybeanjs/soybean-admin/issues/493 [<samp>(2198b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2198b98)
|
||||
|
||||
### 🛠 Optimizations
|
||||
|
||||
- **projects**: optimize code - by @soybeanjs [<samp>(b94ba)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b94baa1)
|
||||
- **types**: Enhance compatibility of global types - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/494 [<samp>(cd9d5)</samp>](https://github.com/soybeanjs/soybean-admin/commit/cd9d58d)
|
||||
- **utils**: Reduce code indentation and improve readability - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/496 [<samp>(ad2f2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ad2f247)
|
||||
|
||||
### 📖 Documentation
|
||||
|
||||
- **projects**: update CHANGELOG - by @soybeanjs [<samp>(b3368)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b336841)
|
||||
|
||||
### 🏡 Chore
|
||||
|
||||
- **deps**: update deps - by @soybeanjs [<samp>(b094d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b094d68)
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
[](https://github.com/soybeanjs) [](https://github.com/Azir-11)
|
||||
[CHENZL](mailto:zlong5568863@qq.com)
|
||||
|
||||
## [v1.2.4](https://github.com/soybeanjs/soybean-admin/compare/v1.2.3...v1.2.4) (2024-06-14)
|
||||
|
||||
### 🛠 Optimizations
|
||||
|
@ -1,6 +1,114 @@
|
||||
# 更新日志
|
||||
|
||||
|
||||
## [v1.2.5](https://github.com/soybeanjs/soybean-admin/compare/v1.2.4...v1.2.5) (2024-06-15)
|
||||
|
||||
### 🐞 错误修复
|
||||
|
||||
- **项目**: 修复登出后标签页异常缓存的问题。已修复 #495 - 由 @Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/495 [<samp>(3eeac)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3eeace9)
|
||||
|
||||
### 🔥 性能
|
||||
|
||||
- **项目**: 初始化静态路由功能不需要异步 - 由 **CHENZL** 在 https://github.com/soybeanjs/soybean-admin/issues/493 [<samp>(2198b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2198b98)
|
||||
|
||||
### 🛠 优化
|
||||
|
||||
- **项目**: 优化代码 - 由 @soybeanjs [<samp>(b94ba)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b94baa1)
|
||||
- **类型**: 提高全局类型的兼容性 - 由 @Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/494 [<samp>(cd9d5)</samp>](https://github.com/soybeanjs/soybean-admin/commit/cd9d58d)
|
||||
- **工具**: 减少代码缩进,提高可读性 - 由 @Azir-11 在 https://github.com/soybeanjs/soybean-admin/issues/496 [<samp>(ad2f2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ad2f247)
|
||||
|
||||
### 📖 文档
|
||||
|
||||
- **项目**: 更新CHANGELOG - 由 @soybeanjs [<samp>(f70d2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f70d29b)
|
||||
|
||||
### 🏡 杂项
|
||||
|
||||
- **依赖**: 更新依赖 - 由 @soybeanjs [<samp>(b094d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b094d68)
|
||||
|
||||
### ❤️ 贡献者
|
||||
|
||||
[](https://github.com/soybeanjs) [](https://github.com/Azir-11)
|
||||
[CHENZL](mailto:zlong5568863@qq.com)
|
||||
|
||||
|
||||
## [v1.2.4](https://github.com/soybeanjs/soybean-admin/compare/v1.2.3...v1.2.4) (2024-06-14)
|
||||
|
||||
### 🛠 优化
|
||||
|
||||
- **项目**:
|
||||
- 优化 `setupAppVersionNotification` - 由 @soybeanjs 提交 [<samp>(b5a72)</samp>](https://github.com/soybeanjs/soybean-admin/commit/b5a723c)
|
||||
- 获取 'Asia/Shanghai' 时区的构建时间 - 由 @soybeanjs 提交 [<samp>(069fa)</samp>](https://github.com/soybeanjs/soybean-admin/commit/069fa8a)
|
||||
|
||||
### ❤️ 贡献者
|
||||
|
||||
[](https://github.com/soybeanjs)
|
||||
|
||||
## [v1.2.3](https://github.com/soybeanjs/soybean-admin/compare/v1.2.2...v1.2.3) (2024-06-13)
|
||||
|
||||
### 🐞 修复错误
|
||||
|
||||
- **项目**:
|
||||
- 通过在index.html中添加color-scheme元标签修复移动浏览器主题问题 - 由 @KickCashew 在 https://github.com/soybeanjs/soybean-admin/issues/488 中提交 [<samp>(c2125)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c212565)
|
||||
- 修复二级目录组件为空 - 由 @paynezhuang 在 https://github.com/soybeanjs/soybean-admin/issues/491 中提交 [<samp>(aabb2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/aabb2a4)
|
||||
|
||||
### 📖 文档
|
||||
|
||||
- **项目**:
|
||||
- 修复超链接指向错误 - 由 **Azir** 提交 [<samp>(20a81)</samp>](https://github.com/soybeanjs/soybean-admin/commit/20a8127)
|
||||
- 更新 README - 由 @soybeanjs 提交 [<samp>(70261)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7026126)
|
||||
|
||||
### 🏡 杂项
|
||||
|
||||
- **依赖**:
|
||||
- 更新依赖 - 由 @soybeanjs 提交 [<samp>(813d8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/813d8ce)
|
||||
- 更新依赖 - 由 @soybeanjs 提交 [<samp>(bf718)</samp>](https://github.com/soybeanjs/soybean-admin/commit/bf71837)
|
||||
|
||||
### ❤️ 贡献者
|
||||
|
||||
[](https://github.com/soybeanjs) [](https://github.com/paynezhuang) [](https://github.com/KickCashew)
|
||||
[Azir](mailto:2075125282@qq.com)
|
||||
|
||||
## [v1.2.2](https://github.com/honghuangdc/soybean-admin/compare/v1.2.1...v1.2.2) (2024-06-12)
|
||||
|
||||
### 🚀 特性
|
||||
|
||||
- **项目**: 切换标签时重置滚动位置 - 由 @soybeanjs 提交 [<samp>(9094b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/9094b21)
|
||||
|
||||
### 🐞 修复错误
|
||||
|
||||
- **项目**:
|
||||
- 在DEV模式下隐藏AppVersionNotification - 由 @sigma-plus 在 https://github.com/honghuangdc/soybean-admin/issues/482 中提交 [<samp>(62592)</samp>](https://github.com/honghuangdc/soybean-admin/commit/6259287)
|
||||
- 修复在移动布局中隐藏menu-toggler。fixed #483 - 由 @soybeanjs 在 https://github.com/honghuangdc/soybean-admin/issues/483 中提交 [<samp>(4470c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/4470cb4)
|
||||
|
||||
### 📖 文档
|
||||
|
||||
- **项目**: 更新 README - 由 @soybeanjs 提交 [<samp>(8f9a7)</samp>](https://github.com/honghuangdc/soybean-admin/commit/8f9a705)
|
||||
|
||||
### ❤️ 贡献者
|
||||
|
||||
[](https://github.com/soybeanjs) [](https://github.com/sigma-plus)
|
||||
|
||||
## [v1.2.1](https://github.com/honghuangdc/soybean-admin/compare/v1.2.0...v1.2.1) (2024-06-07)
|
||||
|
||||
### 🐞 修复错误
|
||||
|
||||
- **项目**:
|
||||
- 修复页面重新加载时获取用户信息 - 由 @soybeanjs 提交 [<samp>(ff51b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ff51b72)
|
||||
- 修复setupAppVersionNotification渲染 - 由 @soybeanjs 提交 [<samp>(6a6eb)</samp>](https://github.com/honghuangdc/soybean-admin/commit/6a6eb9a)
|
||||
|
||||
### 📖 文档
|
||||
|
||||
- **项目**: 更新CHANGELOG - 由 @soybeanjs [<samp>(fe06b)</samp>](https://github.com/honghuangdc/soybean-admin/commit/fe06b8c)完成
|
||||
|
||||
### 🏡 日常任务
|
||||
|
||||
- **依赖**: 更新依赖 - 由 @soybeanjs [<samp>(08827)</samp>](https://github.com/honghuangdc/soybean-admin/commit/08827a4)完成
|
||||
|
||||
### ❤️ 贡献者
|
||||
|
||||
[](https://github.com/soybeanjs)
|
||||
|
||||
|
||||
## [v1.2.0](https://github.com/soybeanjs/soybean-admin/compare/v1.1.5...v1.2.0) (2024-06-06)
|
||||
|
||||
### 🚀 功能
|
||||
|
10
package.json
10
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "soybean-admin",
|
||||
"type": "module",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
|
||||
"author": {
|
||||
"name": "Soybean",
|
||||
@ -68,7 +68,7 @@
|
||||
"swiper": "11.1.1",
|
||||
"tailwind-merge": "2.3.0",
|
||||
"vditor": "3.10.4",
|
||||
"vue": "3.4.27",
|
||||
"vue": "3.4.29",
|
||||
"vue-draggable-plus": "0.5.0",
|
||||
"vue-i18n": "9.13.1",
|
||||
"vue-router": "4.3.3",
|
||||
@ -78,10 +78,10 @@
|
||||
"devDependencies": {
|
||||
"@amap/amap-jsapi-types": "0.0.8",
|
||||
"@elegant-router/vue": "0.3.7",
|
||||
"@iconify/json": "2.2.218",
|
||||
"@iconify/json": "2.2.219",
|
||||
"@sa/scripts": "workspace:*",
|
||||
"@sa/uno-preset": "workspace:*",
|
||||
"@soybeanjs/eslint-config": "1.3.6",
|
||||
"@soybeanjs/eslint-config": "1.3.7",
|
||||
"@types/bmapgl": "0.0.5",
|
||||
"@types/lodash-es": "4.17.12",
|
||||
"@types/node": "20.14.2",
|
||||
@ -103,7 +103,7 @@
|
||||
"typescript": "5.4.5",
|
||||
"unplugin-icons": "0.19.0",
|
||||
"unplugin-vue-components": "0.27.0",
|
||||
"vite": "5.3.0",
|
||||
"vite": "5.3.1",
|
||||
"vite-plugin-progress": "0.0.7",
|
||||
"vite-plugin-svg-icons": "2.0.1",
|
||||
"vite-plugin-vue-devtools": "7.2.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/axios",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/color",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/hooks",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/materials",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
@ -11,7 +11,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sa/utils": "workspace:*",
|
||||
"simplebar-vue": "2.3.4"
|
||||
"simplebar-vue": "2.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typed-css-modules": "0.9.1"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/fetch",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/scripts",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"bin": {
|
||||
"sa": "./bin.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/uno-preset",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@sa/utils",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
|
526
pnpm-lock.yaml
526
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -12,40 +12,42 @@ export function setupAppVersionNotification() {
|
||||
|
||||
const buildTime = await getHtmlBuildTime();
|
||||
|
||||
if (buildTime !== BUILD_TIME) {
|
||||
isShow = true;
|
||||
|
||||
const n = window.$notification?.create({
|
||||
title: $t('system.updateTitle'),
|
||||
content: $t('system.updateContent'),
|
||||
action() {
|
||||
return h('div', { style: { display: 'flex', justifyContent: 'end', gap: '12px', width: '325px' } }, [
|
||||
h(
|
||||
NButton,
|
||||
{
|
||||
onClick() {
|
||||
n?.destroy();
|
||||
}
|
||||
},
|
||||
() => $t('system.updateCancel')
|
||||
),
|
||||
h(
|
||||
NButton,
|
||||
{
|
||||
type: 'primary',
|
||||
onClick() {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
() => $t('system.updateConfirm')
|
||||
)
|
||||
]);
|
||||
},
|
||||
onClose() {
|
||||
isShow = false;
|
||||
}
|
||||
});
|
||||
if (buildTime === BUILD_TIME) {
|
||||
return;
|
||||
}
|
||||
|
||||
isShow = true;
|
||||
|
||||
const n = window.$notification?.create({
|
||||
title: $t('system.updateTitle'),
|
||||
content: $t('system.updateContent'),
|
||||
action() {
|
||||
return h('div', { style: { display: 'flex', justifyContent: 'end', gap: '12px', width: '325px' } }, [
|
||||
h(
|
||||
NButton,
|
||||
{
|
||||
onClick() {
|
||||
n?.destroy();
|
||||
}
|
||||
},
|
||||
() => $t('system.updateCancel')
|
||||
),
|
||||
h(
|
||||
NButton,
|
||||
{
|
||||
type: 'primary',
|
||||
onClick() {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
() => $t('system.updateConfirm')
|
||||
)
|
||||
]);
|
||||
},
|
||||
onClose() {
|
||||
isShow = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -8,11 +8,13 @@ import { fetchGetUserInfo, fetchLogin } from '@/service/api';
|
||||
import { localStg } from '@/utils/storage';
|
||||
import { $t } from '@/locales';
|
||||
import { useRouteStore } from '../route';
|
||||
import { useTabStore } from '../tab';
|
||||
import { clearAuthStorage, getToken } from './shared';
|
||||
|
||||
export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||
const route = useRoute();
|
||||
const routeStore = useRouteStore();
|
||||
const tabStore = useTabStore();
|
||||
const { toLogin, redirectFromLogin } = useRouterPush(false);
|
||||
const { loading: loginLoading, startLoading, endLoading } = useLoading();
|
||||
|
||||
@ -47,6 +49,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||
await toLogin();
|
||||
}
|
||||
|
||||
tabStore.cacheTabs();
|
||||
routeStore.resetStore();
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
||||
/** Init auth route */
|
||||
async function initAuthRoute() {
|
||||
if (authRouteMode.value === 'static') {
|
||||
await initStaticAuthRoute();
|
||||
initStaticAuthRoute();
|
||||
} else {
|
||||
await initDynamicAuthRoute();
|
||||
}
|
||||
@ -228,7 +228,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
||||
}
|
||||
|
||||
/** Init static auth route */
|
||||
async function initStaticAuthRoute() {
|
||||
function initStaticAuthRoute() {
|
||||
const { authRoutes: staticAuthRoutes } = createStaticRoutes();
|
||||
|
||||
if (authStore.isStaticSuper) {
|
||||
|
@ -290,6 +290,7 @@ export const useTabStore = defineStore(SetupStoreId.Tab, () => {
|
||||
resetTabLabel,
|
||||
isTabRetain,
|
||||
updateTabsByLocale,
|
||||
getTabIdByRoute
|
||||
getTabIdByRoute,
|
||||
cacheTabs
|
||||
};
|
||||
});
|
||||
|
4
src/typings/env.d.ts
vendored
4
src/typings/env.d.ts
vendored
@ -105,3 +105,7 @@ declare namespace Env {
|
||||
readonly VITE_STORAGE_PREFIX?: string;
|
||||
}
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: Env.ImportMeta;
|
||||
}
|
||||
|
46
src/typings/global.d.ts
vendored
46
src/typings/global.d.ts
vendored
@ -1,27 +1,27 @@
|
||||
interface Window {
|
||||
/** NProgress instance */
|
||||
NProgress?: import('nprogress').NProgress;
|
||||
/** Loading bar instance */
|
||||
$loadingBar?: import('naive-ui').LoadingBarProviderInst;
|
||||
/** Dialog instance */
|
||||
$dialog?: import('naive-ui').DialogProviderInst;
|
||||
/** Message instance */
|
||||
$message?: import('naive-ui').MessageProviderInst;
|
||||
/** Notification instance */
|
||||
$notification?: import('naive-ui').NotificationProviderInst;
|
||||
}
|
||||
export {};
|
||||
|
||||
interface ViewTransition {
|
||||
ready: Promise<void>;
|
||||
}
|
||||
declare global {
|
||||
export interface Window {
|
||||
/** NProgress instance */
|
||||
NProgress?: import('nprogress').NProgress;
|
||||
/** Loading bar instance */
|
||||
$loadingBar?: import('naive-ui').LoadingBarProviderInst;
|
||||
/** Dialog instance */
|
||||
$dialog?: import('naive-ui').DialogProviderInst;
|
||||
/** Message instance */
|
||||
$message?: import('naive-ui').MessageProviderInst;
|
||||
/** Notification instance */
|
||||
$notification?: import('naive-ui').NotificationProviderInst;
|
||||
}
|
||||
|
||||
interface Document {
|
||||
startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition;
|
||||
}
|
||||
interface ViewTransition {
|
||||
ready: Promise<void>;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: Env.ImportMeta;
|
||||
}
|
||||
export interface Document {
|
||||
startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition;
|
||||
}
|
||||
|
||||
/** Build time of the project */
|
||||
declare const BUILD_TIME: string;
|
||||
/** Build time of the project */
|
||||
export const BUILD_TIME: string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user