mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2026-04-26 03:54:26 +08:00
Compare commits
8 Commits
v1.3.11
...
c5a34e2ff5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5a34e2ff5 | ||
|
|
e97b905ae5 | ||
|
|
a03becdaed | ||
|
|
15163d7011 | ||
|
|
132e101243 | ||
|
|
9b9455d945 | ||
|
|
86da767e24 | ||
|
|
54e7d6d00a |
34
package.json
34
package.json
@@ -54,7 +54,7 @@
|
|||||||
"@sa/hooks": "workspace:*",
|
"@sa/hooks": "workspace:*",
|
||||||
"@sa/materials": "workspace:*",
|
"@sa/materials": "workspace:*",
|
||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"@vueuse/core": "12.4.0",
|
"@vueuse/core": "12.5.0",
|
||||||
"clipboard": "2.0.11",
|
"clipboard": "2.0.11",
|
||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"defu": "6.1.4",
|
"defu": "6.1.4",
|
||||||
@@ -62,42 +62,42 @@
|
|||||||
"json5": "2.2.3",
|
"json5": "2.2.3",
|
||||||
"naive-ui": "2.41.0",
|
"naive-ui": "2.41.0",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"pinia": "2.3.0",
|
"pinia": "3.0.0",
|
||||||
"tailwind-merge": "2.6.0",
|
"tailwind-merge": "3.0.1",
|
||||||
"vue": "3.5.13",
|
"vue": "3.5.13",
|
||||||
"vue-draggable-plus": "0.6.0",
|
"vue-draggable-plus": "0.6.0",
|
||||||
"vue-i18n": "11.0.1",
|
"vue-i18n": "11.1.1",
|
||||||
"vue-router": "4.5.0"
|
"vue-router": "4.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@elegant-router/vue": "0.3.8",
|
"@elegant-router/vue": "0.3.8",
|
||||||
"@iconify/json": "2.2.297",
|
"@iconify/json": "2.2.305",
|
||||||
"@sa/scripts": "workspace:*",
|
"@sa/scripts": "workspace:*",
|
||||||
"@sa/uno-preset": "workspace:*",
|
"@sa/uno-preset": "workspace:*",
|
||||||
"@soybeanjs/eslint-config": "1.4.4",
|
"@soybeanjs/eslint-config": "1.4.4",
|
||||||
"@types/node": "22.10.7",
|
"@types/node": "22.13.1",
|
||||||
"@types/nprogress": "0.2.3",
|
"@types/nprogress": "0.2.3",
|
||||||
"@unocss/eslint-config": "65.4.2",
|
"@unocss/eslint-config": "65.4.3",
|
||||||
"@unocss/preset-icons": "65.4.2",
|
"@unocss/preset-icons": "65.4.3",
|
||||||
"@unocss/preset-uno": "65.4.2",
|
"@unocss/preset-uno": "65.4.3",
|
||||||
"@unocss/transformer-directives": "65.4.2",
|
"@unocss/transformer-directives": "65.4.3",
|
||||||
"@unocss/transformer-variant-group": "65.4.2",
|
"@unocss/transformer-variant-group": "65.4.3",
|
||||||
"@unocss/vite": "65.4.2",
|
"@unocss/vite": "65.4.3",
|
||||||
"@vitejs/plugin-vue": "5.2.1",
|
"@vitejs/plugin-vue": "5.2.1",
|
||||||
"@vitejs/plugin-vue-jsx": "4.1.1",
|
"@vitejs/plugin-vue-jsx": "4.1.1",
|
||||||
"eslint": "9.18.0",
|
"eslint": "9.20.0",
|
||||||
"eslint-plugin-vue": "9.32.0",
|
"eslint-plugin-vue": "9.32.0",
|
||||||
"lint-staged": "15.4.1",
|
"lint-staged": "15.4.3",
|
||||||
"sass": "1.83.4",
|
"sass": "1.84.0",
|
||||||
"simple-git-hooks": "2.11.1",
|
"simple-git-hooks": "2.11.1",
|
||||||
"tsx": "4.19.2",
|
"tsx": "4.19.2",
|
||||||
"typescript": "5.7.3",
|
"typescript": "5.7.3",
|
||||||
"unplugin-icons": "22.0.0",
|
"unplugin-icons": "22.0.0",
|
||||||
"unplugin-vue-components": "28.0.0",
|
"unplugin-vue-components": "28.0.0",
|
||||||
"vite": "6.0.7",
|
"vite": "6.1.0",
|
||||||
"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.0",
|
"vite-plugin-vue-devtools": "7.7.1",
|
||||||
"vue-eslint-parser": "9.4.3",
|
"vue-eslint-parser": "9.4.3",
|
||||||
"vue-tsc": "2.2.0"
|
"vue-tsc": "2.2.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@soybeanjs/changelog": "0.3.24",
|
"@soybeanjs/changelog": "0.3.24",
|
||||||
"bumpp": "9.10.1",
|
"bumpp": "10.0.3",
|
||||||
"c12": "2.0.1",
|
"c12": "2.0.2",
|
||||||
"cac": "6.7.14",
|
"cac": "6.7.14",
|
||||||
"consola": "3.4.0",
|
"consola": "3.4.0",
|
||||||
"enquirer": "2.4.1",
|
"enquirer": "2.4.1",
|
||||||
|
|||||||
1548
pnpm-lock.yaml
generated
1548
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,12 @@ const columns = defineModel<NaiveUI.TableColumnCheck[]>('columns', {
|
|||||||
<div v-for="item in columns" :key="item.key" class="h-36px flex-y-center rd-4px hover:(bg-primary bg-opacity-20)">
|
<div v-for="item in columns" :key="item.key" class="h-36px flex-y-center rd-4px hover:(bg-primary bg-opacity-20)">
|
||||||
<icon-mdi-drag class="mr-8px h-full cursor-move text-icon" />
|
<icon-mdi-drag class="mr-8px h-full cursor-move text-icon" />
|
||||||
<NCheckbox v-model:checked="item.checked" class="none_draggable flex-1">
|
<NCheckbox v-model:checked="item.checked" class="none_draggable flex-1">
|
||||||
{{ item.title }}
|
<template v-if="typeof item.title === 'function'">
|
||||||
|
<component :is="item.title" />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ item.title }}
|
||||||
|
</template>
|
||||||
</NCheckbox>
|
</NCheckbox>
|
||||||
</div>
|
</div>
|
||||||
</VueDraggable>
|
</VueDraggable>
|
||||||
|
|||||||
@@ -61,3 +61,5 @@ export const resetCacheStrategyRecord: Record<UnionKey.ResetCacheStrategy, App.I
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const resetCacheStrategyOptions = transformRecordToOption(resetCacheStrategyRecord);
|
export const resetCacheStrategyOptions = transformRecordToOption(resetCacheStrategyRecord);
|
||||||
|
|
||||||
|
export const DARK_CLASS = 'dark';
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ init();
|
|||||||
:active="tab.id === tabStore.activeTabId"
|
:active="tab.id === tabStore.activeTabId"
|
||||||
:active-color="themeStore.themeColor"
|
:active-color="themeStore.themeColor"
|
||||||
:closable="!tabStore.isTabRetain(tab.id)"
|
:closable="!tabStore.isTabRetain(tab.id)"
|
||||||
@click="tabStore.switchRouteByTab(tab)"
|
@pointerdown="tabStore.switchRouteByTab(tab)"
|
||||||
@close="handleCloseTab(tab)"
|
@close="handleCloseTab(tab)"
|
||||||
@contextmenu="handleContextMenu($event, tab.id)"
|
@contextmenu="handleContextMenu($event, tab.id)"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -3,14 +3,20 @@ import { getRgb } from '@sa/color';
|
|||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import { localStg } from '@/utils/storage';
|
import { localStg } from '@/utils/storage';
|
||||||
import systemLogo from '@/assets/svg-icon/logo.svg?raw';
|
import systemLogo from '@/assets/svg-icon/logo.svg?raw';
|
||||||
|
import { DARK_CLASS } from '@/constants/app';
|
||||||
|
import { toggleHtmlClass } from '@/utils/common';
|
||||||
|
|
||||||
export function setupLoading() {
|
export function setupLoading() {
|
||||||
const themeColor = localStg.get('themeColor') || '#646cff';
|
const themeColor = localStg.get('themeColor') || '#646cff';
|
||||||
|
const darkMode = localStg.get('darkMode') || false;
|
||||||
const { r, g, b } = getRgb(themeColor);
|
const { r, g, b } = getRgb(themeColor);
|
||||||
|
|
||||||
const primaryColor = `--primary-color: ${r} ${g} ${b}`;
|
const primaryColor = `--primary-color: ${r} ${g} ${b}`;
|
||||||
|
|
||||||
|
if (darkMode) {
|
||||||
|
toggleHtmlClass(DARK_CLASS).add();
|
||||||
|
}
|
||||||
|
|
||||||
const loadingClasses = [
|
const loadingClasses = [
|
||||||
'left-0 top-0',
|
'left-0 top-0',
|
||||||
'left-0 bottom-0 animate-delay-500',
|
'left-0 bottom-0 animate-delay-500',
|
||||||
@@ -27,14 +33,14 @@ export function setupLoading() {
|
|||||||
.join('\n');
|
.join('\n');
|
||||||
|
|
||||||
const loading = `
|
const loading = `
|
||||||
<div class="fixed-center flex-col" style="${primaryColor}">
|
<div class="fixed-center flex-col bg-layout" style="${primaryColor}">
|
||||||
${logoWithClass}
|
${logoWithClass}
|
||||||
<div class="w-56px h-56px my-36px">
|
<div class="w-56px h-56px my-36px">
|
||||||
<div class="relative h-full animate-spin">
|
<div class="relative h-full animate-spin">
|
||||||
${dot}
|
${dot}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="text-28px font-500 text-#646464">${$t('system.title')}</h2>
|
<h2 class="text-28px font-500 text-primary">${$t('system.title')}</h2>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
const app = document.getElementById('app');
|
const app = document.getElementById('app');
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ export const useThemeStore = defineStore(SetupStoreId.Theme, () => {
|
|||||||
darkMode,
|
darkMode,
|
||||||
val => {
|
val => {
|
||||||
toggleCssDarkMode(val);
|
toggleCssDarkMode(val);
|
||||||
|
localStg.set('darkMode', val);
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import { overrideThemeSettings, themeSettings } from '@/theme/settings';
|
|||||||
import { themeVars } from '@/theme/vars';
|
import { themeVars } from '@/theme/vars';
|
||||||
import { toggleHtmlClass } from '@/utils/common';
|
import { toggleHtmlClass } from '@/utils/common';
|
||||||
import { localStg } from '@/utils/storage';
|
import { localStg } from '@/utils/storage';
|
||||||
|
import { DARK_CLASS } from '@/constants/app';
|
||||||
const DARK_CLASS = 'dark';
|
|
||||||
|
|
||||||
/** Init theme settings */
|
/** Init theme settings */
|
||||||
export function initThemeSettings() {
|
export function initThemeSettings() {
|
||||||
|
|||||||
2
src/typings/storage.d.ts
vendored
2
src/typings/storage.d.ts
vendored
@@ -20,6 +20,8 @@ declare namespace StorageType {
|
|||||||
refreshToken: string;
|
refreshToken: string;
|
||||||
/** The theme color */
|
/** The theme color */
|
||||||
themeColor: string;
|
themeColor: string;
|
||||||
|
/** The dark mode */
|
||||||
|
darkMode: boolean;
|
||||||
/** The theme settings */
|
/** The theme settings */
|
||||||
themeSettings: App.Theme.ThemeSetting;
|
themeSettings: App.Theme.ThemeSetting;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ const bgColor = computed(() => {
|
|||||||
@switch="themeStore.toggleThemeScheme"
|
@switch="themeStore.toggleThemeScheme"
|
||||||
/>
|
/>
|
||||||
<LangSwitch
|
<LangSwitch
|
||||||
|
v-if="themeStore.header.multilingual.visible"
|
||||||
:lang="appStore.locale"
|
:lang="appStore.locale"
|
||||||
:lang-options="appStore.localeOptions"
|
:lang-options="appStore.localeOptions"
|
||||||
:show-tooltip="false"
|
:show-tooltip="false"
|
||||||
|
|||||||
Reference in New Issue
Block a user