Merge branch 'main' into example

This commit is contained in:
Soybean 2025-06-24 22:37:58 +08:00
commit a63a343e9c
33 changed files with 1122 additions and 1099 deletions

View File

@ -1,6 +1,41 @@
# Changelog # Changelog
## [v1.3.15](https://github.com/soybeanjs/soybean-admin/compare/v1.3.14...v1.3.15) (2025-06-24)
###    🚀 Features
- **projects**: add configurable user name watermark option &nbsp;-&nbsp; by @wenyuanw [<samp>(7c3da)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7c3dac42)
### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes
- **app**: replace console.error with window.console.error for consistency &nbsp;-&nbsp; by @soybeanjs [<samp>(7d840)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7d84062e)
- **projects**: ensure proper text color when themes are inverted &nbsp;-&nbsp; by @wenyuanw [<samp>(afd60)</samp>](https://github.com/soybeanjs/soybean-admin/commit/afd60421)
- **types**: The environment variable VITE_ICON_LOCAL_PREFIX has the wrong type. &nbsp;-&nbsp; by **chenziwen** [<samp>(da149)</samp>](https://github.com/soybeanjs/soybean-admin/commit/da149e5b)
### &nbsp;&nbsp;&nbsp;🛠 Optimizations
- **components**: optimize spacing for lang-switch dropdown options &nbsp;-&nbsp; by @wenyuanw [<samp>(fcb89)</samp>](https://github.com/soybeanjs/soybean-admin/commit/fcb89883)
### &nbsp;&nbsp;&nbsp;💅 Refactors
- **iframe-page**: remove unused lifecycle hooks and clean up script setup &nbsp;-&nbsp; by @soybeanjs [<samp>(276d8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/276d836c)
### &nbsp;&nbsp;&nbsp;📖 Documentation
- **other**: update docs with video tutorial link. &nbsp;-&nbsp; by **Azir** [<samp>(7b2e5)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7b2e510a)
- **readme**: add warning about upcoming `V2` version and link to plan list &nbsp;-&nbsp; by @soybeanjs [<samp>(4d42d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4d42dcbe)
### &nbsp;&nbsp;&nbsp;🏡 Chore
- **deps**: update deps &nbsp;-&nbsp; by @soybeanjs [<samp>(dc674)</samp>](https://github.com/soybeanjs/soybean-admin/commit/dc674ce8)
- **projects**: update deps & fix `moduleResolution` &nbsp;-&nbsp; by @soybeanjs [<samp>(dbd99)</samp>](https://github.com/soybeanjs/soybean-admin/commit/dbd995c1)
### &nbsp;&nbsp;&nbsp;❤️ Contributors
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![wenyuanw](https://github.com/wenyuanw.png?size=48)](https://github.com/wenyuanw)&nbsp;&nbsp;
[Azir](mailto:2075125282@qq.com),&nbsp;[chenziwen](mailto:chenziwen@qesong.com)
## [v1.3.14](https://github.com/soybeanjs/soybean-admin/compare/v1.3.13...v1.3.14) (2025-06-09) ## [v1.3.14](https://github.com/soybeanjs/soybean-admin/compare/v1.3.13...v1.3.14) (2025-06-09)
### &nbsp;&nbsp;&nbsp;🚀 Features ### &nbsp;&nbsp;&nbsp;🚀 Features

View File

@ -19,6 +19,12 @@
> [!NOTE] > [!NOTE]
> If you think `SoybeanAdmin` is helpful to you, or you like our project, please give us a ⭐️ on GitHub. Your support is the driving force for us to continue to improve and add new features! Thank you for your support! > If you think `SoybeanAdmin` is helpful to you, or you like our project, please give us a ⭐️ on GitHub. Your support is the driving force for us to continue to improve and add new features! Thank you for your support!
> [!NOTE]
> The `SoybeanAdmin` quick start series videos have been uploaded to [Bilibili](https://www.bilibili.com/video/BV1YKdRYXELC) Go online [click here](https://www.bilibili.com/video/BV1YKdRYXELC) Go check it out
> [!WARNING]
> `SoybeanAdmin` is planning to develop a `V2` version, see [plan list](https://github.com/soybeanjs/soybean-admin/issues/767)
## Introduction ## Introduction
[`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) is a clean, elegant, beautiful and powerful admin template, based on the latest front-end technology stack, including Vue3, Vite6, TypeScript, Pinia and UnoCSS. It has built-in rich theme configuration and components, strict code specifications, and an automated file routing system. In addition, it also uses the online mock data solution based on ApiFox. `SoybeanAdmin` provides you with a one-stop admin solution, no additional configuration, and out of the box. It is also a best practice for learning cutting-edge technologies quickly. [`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) is a clean, elegant, beautiful and powerful admin template, based on the latest front-end technology stack, including Vue3, Vite6, TypeScript, Pinia and UnoCSS. It has built-in rich theme configuration and components, strict code specifications, and an automated file routing system. In addition, it also uses the online mock data solution based on ApiFox. `SoybeanAdmin` provides you with a one-stop admin solution, no additional configuration, and out of the box. It is also a best practice for learning cutting-edge technologies quickly.

View File

@ -18,6 +18,12 @@
> [!NOTE] > [!NOTE]
> 如果您觉得 `SoybeanAdmin`对您有所帮助,或者您喜欢我们的项目,请在 GitHub 上给我们一个 ⭐️。您的支持是我们持续改进和增加新功能的动力!感谢您的支持! > 如果您觉得 `SoybeanAdmin`对您有所帮助,或者您喜欢我们的项目,请在 GitHub 上给我们一个 ⭐️。您的支持是我们持续改进和增加新功能的动力!感谢您的支持!
> [!NOTE]
> `SoybeanAdmin` 快速上手系列视频已在 [Bilibili](https://www.bilibili.com/video/BV1YKdRYXELC) 上线 [点击这里](https://www.bilibili.com/video/BV1YKdRYXELC) 前往查看
> [!WARNING]
> `SoybeanAdmin` 正在计划开发 `V2` 版本,详情见[计划清单](https://github.com/soybeanjs/soybean-admin/issues/767)
## 简介 ## 简介
[`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) 是一个清新优雅、高颜值且功能强大的后台管理模板,基于最新的前端技术栈,包括 Vue3, Vite6, TypeScript, Pinia 和 UnoCSS。它内置了丰富的主题配置和组件代码规范严谨实现了自动化的文件路由系统。此外它还采用了基于 ApiFox 的在线Mock数据方案。`SoybeanAdmin` 为您提供了一站式的后台管理解决方案,无需额外配置,开箱即用。同样是一个快速学习前沿技术的最佳实践。 [`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) 是一个清新优雅、高颜值且功能强大的后台管理模板,基于最新的前端技术栈,包括 Vue3, Vite6, TypeScript, Pinia 和 UnoCSS。它内置了丰富的主题配置和组件代码规范严谨实现了自动化的文件路由系统。此外它还采用了基于 ApiFox 的在线Mock数据方案。`SoybeanAdmin` 为您提供了一站式的后台管理解决方案,无需额外配置,开箱即用。同样是一个快速学习前沿技术的最佳实践。

View File

@ -1,7 +1,7 @@
{ {
"name": "soybean-admin", "name": "soybean-admin",
"type": "module", "type": "module",
"version": "1.3.14", "version": "1.3.15",
"description": "A fresh and elegant admin template, based on Vue3、Vite6、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite6、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。", "description": "A fresh and elegant admin template, based on Vue3、Vite6、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite6、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
"author": { "author": {
"name": "Soybean", "name": "Soybean",
@ -58,34 +58,34 @@
"@sa/hooks": "workspace:*", "@sa/hooks": "workspace:*",
"@sa/materials": "workspace:*", "@sa/materials": "workspace:*",
"@sa/utils": "workspace:*", "@sa/utils": "workspace:*",
"@visactor/vchart": "1.13.11", "@visactor/vchart": "2.0.0",
"@visactor/vchart-theme": "1.12.2", "@visactor/vchart-theme": "1.12.2",
"@visactor/vtable-editors": "1.18.5", "@visactor/vtable-editors": "1.19.1",
"@visactor/vtable-gantt": "1.18.5", "@visactor/vtable-gantt": "1.19.1",
"@visactor/vue-vtable": "1.18.5", "@visactor/vue-vtable": "1.19.1",
"@vueuse/components": "13.3.0", "@vueuse/components": "13.4.0",
"@vueuse/core": "13.3.0", "@vueuse/core": "13.4.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",
"dhtmlx-gantt": "9.0.11", "dhtmlx-gantt": "9.0.12",
"dompurify": "3.2.6", "dompurify": "3.2.6",
"echarts": "5.6.0", "echarts": "5.6.0",
"jsbarcode": "3.11.6", "jsbarcode": "3.12.1",
"json5": "2.2.3", "json5": "2.2.3",
"naive-ui": "2.41.1", "naive-ui": "2.42.0",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"pinia": "3.0.3", "pinia": "3.0.3",
"pinyin-pro": "3.26.0", "pinyin-pro": "3.26.0",
"print-js": "1.6.0", "print-js": "1.6.0",
"pro-naive-ui": "2.1.6", "pro-naive-ui": "2.2.0",
"swiper": "11.2.8", "swiper": "11.2.8",
"tailwind-merge": "3.3.0", "tailwind-merge": "3.3.1",
"typeit": "8.8.7", "typeit": "8.8.7",
"vditor": "3.11.1", "vditor": "3.11.1",
"vue": "3.5.16", "vue": "3.5.17",
"vue-draggable-plus": "0.6.0", "vue-draggable-plus": "0.6.0",
"vue-i18n": "11.1.5", "vue-i18n": "11.1.7",
"vue-pdf-embed": "2.1.2", "vue-pdf-embed": "2.1.2",
"vue-router": "4.5.1", "vue-router": "4.5.1",
"wangeditor": "4.7.15", "wangeditor": "4.7.15",
@ -95,38 +95,38 @@
"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.347", "@iconify/json": "2.2.352",
"@sa/scripts": "workspace:*", "@sa/scripts": "workspace:*",
"@sa/uno-preset": "workspace:*", "@sa/uno-preset": "workspace:*",
"@soybeanjs/eslint-config": "1.6.1", "@soybeanjs/eslint-config": "1.6.1",
"@types/bmapgl": "0.0.7", "@types/bmapgl": "0.0.7",
"@types/node": "22.15.30", "@types/node": "24.0.3",
"@types/nprogress": "0.2.3", "@types/nprogress": "0.2.3",
"@unocss/eslint-config": "66.1.4", "@unocss/eslint-config": "66.2.3",
"@unocss/preset-icons": "66.1.4", "@unocss/preset-icons": "66.2.3",
"@unocss/preset-uno": "66.1.4", "@unocss/preset-uno": "66.2.3",
"@unocss/transformer-directives": "66.1.4", "@unocss/transformer-directives": "66.2.3",
"@unocss/transformer-variant-group": "66.1.4", "@unocss/transformer-variant-group": "66.2.3",
"@unocss/vite": "66.1.4", "@unocss/vite": "66.2.3",
"@vitejs/plugin-vue": "5.2.4", "@vitejs/plugin-vue": "6.0.0",
"@vitejs/plugin-vue-jsx": "4.2.0", "@vitejs/plugin-vue-jsx": "5.0.0",
"consola": "3.4.2", "consola": "3.4.2",
"eslint": "9.28.0", "eslint": "9.29.0",
"eslint-plugin-vue": "10.2.0", "eslint-plugin-vue": "10.2.0",
"kolorist": "1.8.0", "kolorist": "1.8.0",
"lint-staged": "16.1.0", "lint-staged": "16.1.2",
"pro-naive-ui-resolver": "1.0.2", "pro-naive-ui-resolver": "1.0.2",
"sass": "1.89.1", "sass": "1.89.2",
"simple-git-hooks": "2.13.0", "simple-git-hooks": "2.13.0",
"tsx": "4.19.4", "tsx": "4.20.3",
"typescript": "5.8.3", "typescript": "5.8.3",
"unplugin-icons": "22.1.0", "unplugin-icons": "22.1.0",
"unplugin-vue-components": "28.7.0", "unplugin-vue-components": "28.7.0",
"vite": "6.3.5", "vite": "7.0.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.6", "vite-plugin-vue-devtools": "7.7.7",
"vue-eslint-parser": "10.1.3", "vue-eslint-parser": "10.1.4",
"vue-tsc": "2.2.10" "vue-tsc": "2.2.10"
}, },
"simple-git-hooks": { "simple-git-hooks": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/alova", "name": "@sa/alova",
"version": "1.3.14", "version": "1.3.15",
"exports": { "exports": {
".": "./src/index.ts", ".": "./src/index.ts",
"./fetch": "./src/fetch.ts", "./fetch": "./src/fetch.ts",
@ -13,8 +13,8 @@
} }
}, },
"dependencies": { "dependencies": {
"@alova/mock": "2.0.16", "@alova/mock": "2.0.17",
"@sa/utils": "workspace:*", "@sa/utils": "workspace:*",
"alova": "3.3.0" "alova": "3.3.3"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/axios", "name": "@sa/axios",
"version": "1.3.14", "version": "1.3.15",
"exports": { "exports": {
".": "./src/index.ts" ".": "./src/index.ts"
}, },
@ -11,7 +11,7 @@
}, },
"dependencies": { "dependencies": {
"@sa/utils": "workspace:*", "@sa/utils": "workspace:*",
"axios": "1.9.0", "axios": "1.10.0",
"axios-retry": "4.5.0", "axios-retry": "4.5.0",
"qs": "6.14.0" "qs": "6.14.0"
}, },

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/scripts", "name": "@sa/scripts",
"version": "1.3.14", "version": "1.3.15",
"bin": { "bin": {
"sa": "./bin.ts" "sa": "./bin.ts"
}, },
@ -14,7 +14,7 @@
}, },
"devDependencies": { "devDependencies": {
"@soybeanjs/changelog": "0.3.24", "@soybeanjs/changelog": "0.3.24",
"bumpp": "10.1.1", "bumpp": "10.2.0",
"c12": "3.0.4", "c12": "3.0.4",
"cac": "6.7.14", "cac": "6.7.14",
"consola": "3.4.2", "consola": "3.4.2",

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@sa/utils", "name": "@sa/utils",
"version": "1.3.14", "version": "1.3.15",
"exports": { "exports": {
".": "./src/index.ts" ".": "./src/index.ts"
}, },

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@ import { NConfigProvider, darkTheme } from 'naive-ui';
import type { WatermarkProps } from 'naive-ui'; import type { WatermarkProps } from 'naive-ui';
import { useAppStore } from './store/modules/app'; import { useAppStore } from './store/modules/app';
import { useThemeStore } from './store/modules/theme'; import { useThemeStore } from './store/modules/theme';
import { useAuthStore } from './store/modules/auth';
import { naiveDateLocales, naiveLocales } from './locales/naive'; import { naiveDateLocales, naiveLocales } from './locales/naive';
defineOptions({ defineOptions({
@ -12,6 +13,7 @@ defineOptions({
const appStore = useAppStore(); const appStore = useAppStore();
const themeStore = useThemeStore(); const themeStore = useThemeStore();
const authStore = useAuthStore();
const naiveDarkTheme = computed(() => (themeStore.darkMode ? darkTheme : undefined)); const naiveDarkTheme = computed(() => (themeStore.darkMode ? darkTheme : undefined));
@ -24,8 +26,13 @@ const naiveDateLocale = computed(() => {
}); });
const watermarkProps = computed<WatermarkProps>(() => { const watermarkProps = computed<WatermarkProps>(() => {
const content =
themeStore.watermark.enableUserName && authStore.userInfo.userName
? authStore.userInfo.userName
: themeStore.watermark.text;
return { return {
content: themeStore.watermark.text, content,
cross: true, cross: true,
fullscreen: true, fullscreen: true,
fontSize: 16, fontSize: 16,

View File

@ -31,13 +31,25 @@ const tooltipContent = computed(() => {
return $t('icon.lang'); return $t('icon.lang');
}); });
/** Add bottom margin to all options except the last one for proper visual separation */
const dropdownOptions = computed(() => {
const lastIndex = props.langOptions.length - 1;
return props.langOptions.map((option, index) => ({
...option,
props: {
class: index < lastIndex ? 'mb-1' : undefined
}
}));
});
function changeLang(lang: App.I18n.LangType) { function changeLang(lang: App.I18n.LangType) {
emit('changeLang', lang); emit('changeLang', lang);
} }
</script> </script>
<template> <template>
<NDropdown :value="lang" :options="langOptions" trigger="hover" @select="changeLang"> <NDropdown :value="lang" :options="dropdownOptions" trigger="hover" @select="changeLang">
<div> <div>
<ButtonIcon :tooltip-content="tooltipContent" tooltip-placement="left"> <ButtonIcon :tooltip-content="tooltipContent" tooltip-placement="left">
<SvgIcon icon="heroicons:language" /> <SvgIcon icon="heroicons:language" />

View File

@ -117,7 +117,10 @@ const isWrapperScrollMode = computed(() => themeStore.layout.scrollMode === 'wra
<SettingItem key="8" :label="$t('theme.watermark.visible')"> <SettingItem key="8" :label="$t('theme.watermark.visible')">
<NSwitch v-model:value="themeStore.watermark.visible" /> <NSwitch v-model:value="themeStore.watermark.visible" />
</SettingItem> </SettingItem>
<SettingItem v-if="themeStore.watermark.visible" key="8-1" :label="$t('theme.watermark.text')"> <SettingItem v-if="themeStore.watermark.visible" key="8-1" :label="$t('theme.watermark.enableUserName')">
<NSwitch v-model:value="themeStore.watermark.enableUserName" />
</SettingItem>
<SettingItem v-if="themeStore.watermark.visible" key="8-2" :label="$t('theme.watermark.text')">
<NInput <NInput
v-model:value="themeStore.watermark.text" v-model:value="themeStore.watermark.text"
autosize autosize

View File

@ -143,7 +143,8 @@ const local: App.I18n.Schema = {
}, },
watermark: { watermark: {
visible: 'Watermark Full Screen Visible', visible: 'Watermark Full Screen Visible',
text: 'Watermark Text' text: 'Watermark Text',
enableUserName: 'Enable User Name Watermark'
}, },
themeDrawerTitle: 'Theme Configuration', themeDrawerTitle: 'Theme Configuration',
pageFunTitle: 'Page Function', pageFunTitle: 'Page Function',

View File

@ -143,7 +143,8 @@ const local: App.I18n.Schema = {
}, },
watermark: { watermark: {
visible: '显示全屏水印', visible: '显示全屏水印',
text: '水印文本' text: '水印文本',
enableUserName: '启用用户名水印'
}, },
themeDrawerTitle: '主题配置', themeDrawerTitle: '主题配置',
pageFunTitle: '页面功能', pageFunTitle: '页面功能',

View File

@ -95,7 +95,6 @@ async function getHtmlBuildTime(): Promise<string | null> {
const res = await fetch(`${baseUrl}index.html?time=${Date.now()}`); const res = await fetch(`${baseUrl}index.html?time=${Date.now()}`);
if (!res.ok) { if (!res.ok) {
console.error('getHtmlBuildTime error:', res.status, res.statusText);
return null; return null;
} }
@ -103,7 +102,7 @@ async function getHtmlBuildTime(): Promise<string | null> {
const match = html.match(/<meta name="buildTime" content="(.*)">/); const match = html.match(/<meta name="buildTime" content="(.*)">/);
return match?.[1] || null; return match?.[1] || null;
} catch (error) { } catch (error) {
console.error('getHtmlBuildTime error:', error); window.console.error('getHtmlBuildTime error:', error);
return null; return null;
} }
} }

View File

@ -10,4 +10,5 @@ body,
html { html {
overflow-x: hidden; overflow-x: hidden;
color: rgb(var(--base-text-color));
} }

View File

@ -58,7 +58,8 @@ export const themeSettings: App.Theme.ThemeSetting = {
}, },
watermark: { watermark: {
visible: false, visible: false,
text: 'SoybeanAdmin' text: 'SoybeanAdmin',
enableUserName: false
}, },
tokens: { tokens: {
light: { light: {

View File

@ -112,6 +112,8 @@ declare namespace App {
visible: boolean; visible: boolean;
/** Watermark text */ /** Watermark text */
text: string; text: string;
/** Whether to use user name as watermark text */
enableUserName: boolean;
}; };
/** define some theme settings tokens, will transform to css variables */ /** define some theme settings tokens, will transform to css variables */
tokens: { tokens: {
@ -408,6 +410,7 @@ declare namespace App {
watermark: { watermark: {
visible: string; visible: string;
text: string; text: string;
enableUserName: string;
}; };
themeDrawerTitle: string; themeDrawerTitle: string;
pageFunTitle: string; pageFunTitle: string;

View File

@ -25,7 +25,7 @@ declare namespace Env {
* *
* This prefix is start with the icon prefix * This prefix is start with the icon prefix
*/ */
readonly VITE_ICON_LOCAL_PREFIX: 'local-icon'; readonly VITE_ICON_LOCAL_PREFIX: 'icon-local';
/** backend service base url */ /** backend service base url */
readonly VITE_SERVICE_BASE_URL: string; readonly VITE_SERVICE_BASE_URL: string;
/** /**

View File

@ -1,19 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import { onActivated, onMounted } from 'vue';
interface Props { interface Props {
url: string; url: string;
} }
defineProps<Props>(); defineProps<Props>();
onMounted(() => {
console.log('mounted');
});
onActivated(() => {
console.log('activated');
});
</script> </script>
<template> <template>

View File

@ -177,7 +177,7 @@ const { columnChecks, columns } = useCheckedColumns<typeof fetchGetUserList>(()
<template> <template>
<div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"> <div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto">
<UserSearch v-model:model="searchParams" @search="getDataByPage" /> <UserSearch v-model:model="searchParams" @search="getDataByPage" />
<NCard :title="$t('page.manage.user.title')" :bordered="false" size="small" class="sm:flex-1-hidden card-wrapper"> <NCard :title="$t('page.manage.user.title')" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
<template #header-extra> <template #header-extra>
<TableHeaderOperation <TableHeaderOperation
v-model:columns="columnChecks" v-model:columns="columnChecks"

View File

@ -228,7 +228,7 @@ init();
<template> <template>
<div ref="wrapperRef" class="flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"> <div ref="wrapperRef" class="flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto">
<NCard :title="$t('page.manage.menu.title')" :bordered="false" size="small" class="sm:flex-1-hidden card-wrapper"> <NCard :title="$t('page.manage.menu.title')" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
<template #header-extra> <template #header-extra>
<TableHeaderOperation <TableHeaderOperation
v-model:columns="columnChecks" v-model:columns="columnChecks"

View File

@ -140,7 +140,7 @@ function edit(id: number) {
<template> <template>
<div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"> <div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto">
<RoleSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getDataByPage" /> <RoleSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getDataByPage" />
<NCard :title="$t('page.manage.role.title')" :bordered="false" size="small" class="sm:flex-1-hidden card-wrapper"> <NCard :title="$t('page.manage.role.title')" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
<template #header-extra> <template #header-extra>
<TableHeaderOperation <TableHeaderOperation
v-model:columns="columnChecks" v-model:columns="columnChecks"

View File

@ -171,7 +171,7 @@ function edit(id: number) {
<template> <template>
<div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"> <div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto">
<UserSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getDataByPage" /> <UserSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getDataByPage" />
<NCard :title="$t('page.manage.user.title')" :bordered="false" size="small" class="sm:flex-1-hidden card-wrapper"> <NCard :title="$t('page.manage.user.title')" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
<template #header-extra> <template #header-extra>
<TableHeaderOperation <TableHeaderOperation
v-model:columns="columnChecks" v-model:columns="columnChecks"

View File

@ -1,4 +1,5 @@
import type { import type {
IAnimationConfig,
IAreaChartSpec, IAreaChartSpec,
IBarChartSpec, IBarChartSpec,
ICircularProgressChartSpec, ICircularProgressChartSpec,
@ -7,7 +8,6 @@ import type {
ILiquidChartSpec, ILiquidChartSpec,
IWordCloudChartSpec IWordCloudChartSpec
} from '@visactor/vchart'; } from '@visactor/vchart';
import type { IAnimationConfig } from '@visactor/vgrammar-core';
export const shapeWordCloudSpec: IWordCloudChartSpec = { export const shapeWordCloudSpec: IWordCloudChartSpec = {
type: 'wordCloud', type: 'wordCloud',

View File

@ -167,7 +167,7 @@ function isTableColumnHasTitle<T>(column: NaiveUI.TableColumn<T>): column is Nai
<template> <template>
<div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"> <div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto">
<NCard title="Excel导出" :bordered="false" size="small" class="sm:flex-1-hidden card-wrapper"> <NCard title="Excel导出" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
<template #header-extra> <template #header-extra>
<NSpace align="end" wrap justify="end" class="lt-sm:w-200px"> <NSpace align="end" wrap justify="end" class="lt-sm:w-200px">
<NButton size="small" ghost type="primary" @click="exportExcel"> <NButton size="small" ghost type="primary" @click="exportExcel">

View File

@ -62,7 +62,7 @@ async function handleDownload() {
<NSkeleton v-if="loading" size="small" class="mt-12px" text :repeat="12" /> <NSkeleton v-if="loading" size="small" class="mt-12px" text :repeat="12" />
<VuePdfEmbed <VuePdfEmbed
ref="pdfRef" ref="pdfRef"
class="overflow-auto container" class="container overflow-auto"
:class="{ 'h-0': loading }" :class="{ 'h-0': loading }"
:rotation="rotations[currentRotation]" :rotation="rotations[currentRotation]"
:page="currentPage" :page="currentPage"

View File

@ -6,7 +6,7 @@
"lib": ["DOM", "ESNext"], "lib": ["DOM", "ESNext"],
"baseUrl": ".", "baseUrl": ".",
"module": "ESNext", "module": "ESNext",
"moduleResolution": "node", "moduleResolution": "bundler",
"paths": { "paths": {
"@/*": ["./src/*"], "@/*": ["./src/*"],
"~/*": ["./*"] "~/*": ["./*"]