mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-29 14:46:41 +08:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
ab5c1bfe0e
53
CHANGELOG.md
53
CHANGELOG.md
@ -1,6 +1,59 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
|
## [v1.3.7](https://github.com/soybeanjs/soybean-admin/compare/v1.3.6...v1.3.7) (2024-09-21)
|
||||||
|
|
||||||
|
### 🚨 Breaking Changes
|
||||||
|
|
||||||
|
- **projects**: update scss config - by @soybeanjs [<samp>(24e9e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/24e9e57)
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- **projects**: fix global-tab click conflict with contextmenu - by @soybeanjs [<samp>(3e72c)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3e72c3b)
|
||||||
|
|
||||||
|
### 💅 Refactors
|
||||||
|
|
||||||
|
- **packages**: @sa/materials: remove tab close shortcut by mouse - by @soybeanjs [<samp>(4da58)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4da588c)
|
||||||
|
|
||||||
|
### 🏡 Chore
|
||||||
|
|
||||||
|
- **deps**: update deps - by @soybeanjs [<samp>(baefd)</samp>](https://github.com/soybeanjs/soybean-admin/commit/baefdfd)
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
[](https://github.com/soybeanjs)
|
||||||
|
|
||||||
|
## [v1.3.6](https://github.com/soybeanjs/soybean-admin/compare/v1.3.5...v1.3.6) (2024-09-20)
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- **components**:
|
||||||
|
- fix VerticalMixMenu name - by @soybeanjs [<samp>(20f8e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/20f8ed3)
|
||||||
|
- **projects**:
|
||||||
|
- fix click global-tab in iPad. fixed #624 - by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/624 [<samp>(04d05)</samp>](https://github.com/soybeanjs/soybean-admin/commit/04d0564)
|
||||||
|
- when the roles filter submenu is empty, the parent menu is not excluded. fixed #621. - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/626 and https://github.com/soybeanjs/soybean-admin/issues/621 [<samp>(0ac95)</samp>](https://github.com/soybeanjs/soybean-admin/commit/0ac95bd)
|
||||||
|
|
||||||
|
### 🛠 Optimizations
|
||||||
|
|
||||||
|
- **projects**:
|
||||||
|
- optimize code - by @soybeanjs [<samp>(6561f)</samp>](https://github.com/soybeanjs/soybean-admin/commit/6561f0b)
|
||||||
|
- optimize code - by @soybeanjs [<samp>(38eeb)</samp>](https://github.com/soybeanjs/soybean-admin/commit/38eeb67)
|
||||||
|
- remove defineModel setting,enabled by default - by @yanbowe in https://github.com/soybeanjs/soybean-admin/issues/620 [<samp>(60bbd)</samp>](https://github.com/soybeanjs/soybean-admin/commit/60bbd2d)
|
||||||
|
|
||||||
|
### 📖 Documentation
|
||||||
|
|
||||||
|
- **projects**: update CHANGELOG - by @soybeanjs [<samp>(5baf1)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5baf19d)
|
||||||
|
|
||||||
|
### 🏡 Chore
|
||||||
|
|
||||||
|
- **deps**:
|
||||||
|
- update deps - by @soybeanjs [<samp>(207d6)</samp>](https://github.com/soybeanjs/soybean-admin/commit/207d6eb)
|
||||||
|
- update deps - by @soybeanjs [<samp>(f3562)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f35627e)
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
[](https://github.com/soybeanjs) [](https://github.com/Azir-11) [](https://github.com/yanbowe)
|
||||||
|
|
||||||
## [v1.3.5](https://github.com/soybeanjs/soybean-admin/compare/v1.3.4...v1.3.5) (2024-09-07)
|
## [v1.3.5](https://github.com/soybeanjs/soybean-admin/compare/v1.3.4...v1.3.5) (2024-09-07)
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
|
40
package.json
40
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "soybean-admin",
|
"name": "soybean-admin",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"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",
|
||||||
@ -55,7 +55,7 @@
|
|||||||
"@sa/hooks": "workspace:*",
|
"@sa/hooks": "workspace:*",
|
||||||
"@sa/materials": "workspace:*",
|
"@sa/materials": "workspace:*",
|
||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"@vueuse/core": "11.0.3",
|
"@vueuse/core": "11.1.0",
|
||||||
"clipboard": "2.0.11",
|
"clipboard": "2.0.11",
|
||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"echarts": "5.5.1",
|
"echarts": "5.5.1",
|
||||||
@ -64,40 +64,40 @@
|
|||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"pinia": "2.2.2",
|
"pinia": "2.2.2",
|
||||||
"tailwind-merge": "2.5.2",
|
"tailwind-merge": "2.5.2",
|
||||||
"vue": "3.5.3",
|
"vue": "3.5.7",
|
||||||
"vue-draggable-plus": "0.5.3",
|
"vue-draggable-plus": "0.5.3",
|
||||||
"vue-i18n": "9.14.0",
|
"vue-i18n": "10.0.1",
|
||||||
"vue-router": "4.4.3"
|
"vue-router": "4.4.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@elegant-router/vue": "0.3.8",
|
"@elegant-router/vue": "0.3.8",
|
||||||
"@iconify/json": "2.2.245",
|
"@iconify/json": "2.2.251",
|
||||||
"@sa/scripts": "workspace:*",
|
"@sa/scripts": "workspace:*",
|
||||||
"@sa/uno-preset": "workspace:*",
|
"@sa/uno-preset": "workspace:*",
|
||||||
"@soybeanjs/eslint-config": "1.4.1",
|
"@soybeanjs/eslint-config": "1.4.1",
|
||||||
"@types/node": "22.5.4",
|
"@types/node": "22.5.5",
|
||||||
"@types/nprogress": "0.2.3",
|
"@types/nprogress": "0.2.3",
|
||||||
"@unocss/eslint-config": "0.62.3",
|
"@unocss/eslint-config": "0.62.4",
|
||||||
"@unocss/preset-icons": "0.62.3",
|
"@unocss/preset-icons": "0.62.4",
|
||||||
"@unocss/preset-uno": "0.62.3",
|
"@unocss/preset-uno": "0.62.4",
|
||||||
"@unocss/transformer-directives": "0.62.3",
|
"@unocss/transformer-directives": "0.62.4",
|
||||||
"@unocss/transformer-variant-group": "0.62.3",
|
"@unocss/transformer-variant-group": "0.62.4",
|
||||||
"@unocss/vite": "0.62.3",
|
"@unocss/vite": "0.62.4",
|
||||||
"@vitejs/plugin-vue": "5.1.3",
|
"@vitejs/plugin-vue": "5.1.4",
|
||||||
"@vitejs/plugin-vue-jsx": "4.0.1",
|
"@vitejs/plugin-vue-jsx": "4.0.1",
|
||||||
"eslint": "9.10.0",
|
"eslint": "9.11.0",
|
||||||
"eslint-plugin-vue": "9.28.0",
|
"eslint-plugin-vue": "9.28.0",
|
||||||
"lint-staged": "15.2.10",
|
"lint-staged": "15.2.10",
|
||||||
"sass": "1.78.0",
|
"sass": "1.79.3",
|
||||||
"simple-git-hooks": "2.11.1",
|
"simple-git-hooks": "2.11.1",
|
||||||
"tsx": "4.19.0",
|
"tsx": "4.19.1",
|
||||||
"typescript": "5.5.4",
|
"typescript": "5.6.2",
|
||||||
"unplugin-icons": "0.19.3",
|
"unplugin-icons": "0.19.3",
|
||||||
"unplugin-vue-components": "0.27.4",
|
"unplugin-vue-components": "0.27.4",
|
||||||
"vite": "5.4.3",
|
"vite": "5.4.6",
|
||||||
"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.4.4",
|
"vite-plugin-vue-devtools": "7.4.5",
|
||||||
"vue-eslint-parser": "9.4.3",
|
"vue-eslint-parser": "9.4.3",
|
||||||
"vue-tsc": "2.1.6"
|
"vue-tsc": "2.1.6"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/axios",
|
"name": "@sa/axios",
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
@ -16,6 +16,6 @@
|
|||||||
"qs": "6.13.0"
|
"qs": "6.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/qs": "6.9.15"
|
"@types/qs": "6.9.16"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/color",
|
"name": "@sa/color",
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/hooks",
|
"name": "@sa/hooks",
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/materials",
|
"name": "@sa/materials",
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -53,23 +53,10 @@ const bindProps = computed(() => {
|
|||||||
function handleClose() {
|
function handleClose() {
|
||||||
emit('close');
|
emit('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMouseup(e: MouseEvent) {
|
|
||||||
// close tab by mouse wheel button click
|
|
||||||
if (e.button === 1) {
|
|
||||||
handleClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<component
|
<component :is="activeTabComponent.component" :class="activeTabComponent.class" :style="cssVars" v-bind="bindProps">
|
||||||
:is="activeTabComponent.component"
|
|
||||||
:class="activeTabComponent.class"
|
|
||||||
:style="cssVars"
|
|
||||||
v-bind="bindProps"
|
|
||||||
@mouseup="handleMouseup"
|
|
||||||
>
|
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<slot name="prefix"></slot>
|
<slot name="prefix"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/fetch",
|
"name": "@sa/fetch",
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
@ -10,6 +10,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ofetch": "1.3.4"
|
"ofetch": "1.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/scripts",
|
"name": "@sa/scripts",
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"bin": {
|
"bin": {
|
||||||
"sa": "./bin.ts"
|
"sa": "./bin.ts"
|
||||||
},
|
},
|
||||||
@ -19,9 +19,9 @@
|
|||||||
"cac": "6.7.14",
|
"cac": "6.7.14",
|
||||||
"consola": "3.2.3",
|
"consola": "3.2.3",
|
||||||
"enquirer": "2.4.1",
|
"enquirer": "2.4.1",
|
||||||
"execa": "9.3.1",
|
"execa": "9.4.0",
|
||||||
"kolorist": "1.8.0",
|
"kolorist": "1.8.0",
|
||||||
"npm-check-updates": "17.1.1",
|
"npm-check-updates": "17.1.2",
|
||||||
"rimraf": "6.0.1"
|
"rimraf": "6.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/uno-preset",
|
"name": "@sa/uno-preset",
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/utils",
|
"name": "@sa/utils",
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
1343
pnpm-lock.yaml
1343
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,7 @@ import { useAppStore } from '@/store/modules/app';
|
|||||||
import { useThemeStore } from '@/store/modules/theme';
|
import { useThemeStore } from '@/store/modules/theme';
|
||||||
import { useRouteStore } from '@/store/modules/route';
|
import { useRouteStore } from '@/store/modules/route';
|
||||||
import { useTabStore } from '@/store/modules/tab';
|
import { useTabStore } from '@/store/modules/tab';
|
||||||
|
import { isPC } from '@/utils/agent';
|
||||||
import ContextMenu from './context-menu.vue';
|
import ContextMenu from './context-menu.vue';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@ -24,6 +25,7 @@ const bsWrapper = ref<HTMLElement>();
|
|||||||
const { width: bsWrapperWidth, left: bsWrapperLeft } = useElementBounding(bsWrapper);
|
const { width: bsWrapperWidth, left: bsWrapperLeft } = useElementBounding(bsWrapper);
|
||||||
const bsScroll = ref<InstanceType<typeof BetterScroll>>();
|
const bsScroll = ref<InstanceType<typeof BetterScroll>>();
|
||||||
const tabRef = ref<HTMLElement>();
|
const tabRef = ref<HTMLElement>();
|
||||||
|
const isPCFlag = isPC();
|
||||||
|
|
||||||
const TAB_DATA_ID = 'data-tab-id';
|
const TAB_DATA_ID = 'data-tab-id';
|
||||||
|
|
||||||
@ -166,7 +168,7 @@ init();
|
|||||||
<template>
|
<template>
|
||||||
<DarkModeContainer class="size-full flex-y-center px-16px shadow-tab">
|
<DarkModeContainer class="size-full flex-y-center px-16px shadow-tab">
|
||||||
<div ref="bsWrapper" class="h-full flex-1-hidden">
|
<div ref="bsWrapper" class="h-full flex-1-hidden">
|
||||||
<BetterScroll ref="bsScroll" :options="{ scrollX: true, scrollY: false, click: true }" @click="removeFocus">
|
<BetterScroll ref="bsScroll" :options="{ scrollX: true, scrollY: false, click: !isPCFlag }" @click="removeFocus">
|
||||||
<div
|
<div
|
||||||
ref="tabRef"
|
ref="tabRef"
|
||||||
class="h-full flex pr-18px"
|
class="h-full flex pr-18px"
|
||||||
|
8
src/typings/global.d.ts
vendored
8
src/typings/global.d.ts
vendored
@ -14,14 +14,6 @@ declare global {
|
|||||||
$notification?: import('naive-ui').NotificationProviderInst;
|
$notification?: import('naive-ui').NotificationProviderInst;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ViewTransition {
|
|
||||||
ready: Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Document {
|
|
||||||
startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Build time of the project */
|
/** Build time of the project */
|
||||||
export const BUILD_TIME: string;
|
export const BUILD_TIME: string;
|
||||||
}
|
}
|
||||||
|
5
src/utils/agent.ts
Normal file
5
src/utils/agent.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export function isPC() {
|
||||||
|
const agents = ['Android', 'iPhone', 'webOS', 'BlackBerry', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
|
||||||
|
|
||||||
|
return !agents.includes(window.navigator.userAgent);
|
||||||
|
}
|
@ -40,7 +40,7 @@ async function handleSubmit() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false">
|
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
|
||||||
<NFormItem path="phone">
|
<NFormItem path="phone">
|
||||||
<NInput v-model:value="model.phone" :placeholder="$t('page.login.common.phonePlaceholder')" />
|
<NInput v-model:value="model.phone" :placeholder="$t('page.login.common.phonePlaceholder')" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
@ -75,7 +75,7 @@ async function handleAccountLogin(account: Account) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false">
|
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
|
||||||
<NFormItem path="userName">
|
<NFormItem path="userName">
|
||||||
<NInput v-model:value="model.userName" :placeholder="$t('page.login.common.userNamePlaceholder')" />
|
<NInput v-model:value="model.userName" :placeholder="$t('page.login.common.userNamePlaceholder')" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
@ -46,7 +46,7 @@ async function handleSubmit() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false">
|
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
|
||||||
<NFormItem path="phone">
|
<NFormItem path="phone">
|
||||||
<NInput v-model:value="model.phone" :placeholder="$t('page.login.common.phonePlaceholder')" />
|
<NInput v-model:value="model.phone" :placeholder="$t('page.login.common.phonePlaceholder')" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
@ -45,7 +45,7 @@ async function handleSubmit() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false">
|
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
|
||||||
<NFormItem path="phone">
|
<NFormItem path="phone">
|
||||||
<NInput v-model:value="model.phone" :placeholder="$t('page.login.common.phonePlaceholder')" />
|
<NInput v-model:value="model.phone" :placeholder="$t('page.login.common.phonePlaceholder')" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
@ -22,7 +22,8 @@ export default defineConfig(configEnv => {
|
|||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
scss: {
|
scss: {
|
||||||
additionalData: `@use "./src/styles/scss/global.scss" as *;`
|
api: 'modern-compiler',
|
||||||
|
additionalData: `@use "@/styles/scss/global.scss" as *;`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user