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