mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-12-14 22:30:31 +08:00
Compare commits
76 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2395bb11b5 | ||
|
|
00256f7843 | ||
|
|
0ac157201e | ||
|
|
1bc940500c | ||
|
|
c50bb9981b | ||
|
|
a4f9251789 | ||
|
|
3ac71be372 | ||
|
|
8c01eeab7f | ||
|
|
fa1b397c33 | ||
|
|
3ebf0bda2f | ||
|
|
31a9a10d1b | ||
|
|
1a24c56d92 | ||
|
|
c4ee2e1235 | ||
|
|
df842d93e6 | ||
|
|
67926cf915 | ||
|
|
f3e3d60e22 | ||
|
|
b4893be543 | ||
|
|
a8953d009f | ||
|
|
b76600a981 | ||
|
|
b20157fa2e | ||
|
|
a5752a0493 | ||
|
|
9d1f3089d0 | ||
|
|
b058952e45 | ||
|
|
b4c80166be | ||
|
|
5a0ce44307 | ||
|
|
12a5adb842 | ||
|
|
2cebae520c | ||
|
|
77d3923439 | ||
|
|
c819ef1ff3 | ||
|
|
70772864ac | ||
|
|
d543b57e34 | ||
|
|
a9ba7cbe61 | ||
|
|
96a39b3974 | ||
|
|
496feeb005 | ||
|
|
97f0e1531c | ||
|
|
e0f28acdc4 | ||
|
|
9b9ff10be1 | ||
|
|
94e2943608 | ||
|
|
d19e7849cc | ||
|
|
91f915462a | ||
|
|
1038f16783 | ||
|
|
dedde7d47f | ||
|
|
f220db4eed | ||
|
|
b043cf76f5 | ||
|
|
ca76b12cc6 | ||
|
|
1508afa7c3 | ||
|
|
f2cf1d0af7 | ||
|
|
14f1e8cc97 | ||
|
|
cdf4abeb58 | ||
|
|
6faffacf77 | ||
|
|
806f56d80c | ||
|
|
0b8e10f964 | ||
|
|
d4c2e139a3 | ||
|
|
17ec8c6af4 | ||
|
|
3075dc61f7 | ||
|
|
23d9cdaf81 | ||
|
|
1154c0b9f8 | ||
|
|
ab772081ec | ||
|
|
17d1b98bdf | ||
|
|
fba17f188d | ||
|
|
5cb19eec75 | ||
|
|
cac6d8071f | ||
|
|
12a003a430 | ||
|
|
d6af3e9d33 | ||
|
|
28267cf22e | ||
|
|
2e6733cbc7 | ||
|
|
2d56e471cb | ||
|
|
24b33b5401 | ||
|
|
6dc29c134f | ||
|
|
12973dcf5b | ||
|
|
d0d02d7128 | ||
|
|
9839746b00 | ||
|
|
3069785575 | ||
|
|
0bc8a4e9df | ||
|
|
ea28240d56 | ||
|
|
758a84f5c6 |
1
.vscode/extensions.json
vendored
1
.vscode/extensions.json
vendored
@@ -9,6 +9,7 @@
|
|||||||
"bradlc.vscode-tailwindcss",
|
"bradlc.vscode-tailwindcss",
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"esbenp.prettier-vscode",
|
"esbenp.prettier-vscode",
|
||||||
|
"lokalise.i18n-ally",
|
||||||
"redhat.vscode-yaml",
|
"redhat.vscode-yaml",
|
||||||
"csstools.postcss",
|
"csstools.postcss",
|
||||||
"mikestead.dotenv",
|
"mikestead.dotenv",
|
||||||
|
|||||||
13
.vscode/settings.json
vendored
13
.vscode/settings.json
vendored
@@ -28,6 +28,19 @@
|
|||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": "explicit"
|
"source.fixAll.eslint": "explicit"
|
||||||
},
|
},
|
||||||
|
"i18n-ally.localesPaths": "locales",
|
||||||
|
"i18n-ally.keystyle": "nested",
|
||||||
|
"i18n-ally.sortKeys": true,
|
||||||
|
"i18n-ally.namespace": true,
|
||||||
|
"i18n-ally.enabledParsers": [
|
||||||
|
"yaml",
|
||||||
|
"js"
|
||||||
|
],
|
||||||
|
"i18n-ally.sourceLanguage": "en",
|
||||||
|
"i18n-ally.displayLanguage": "zh-CN",
|
||||||
|
"i18n-ally.enabledFrameworks": [
|
||||||
|
"vue"
|
||||||
|
],
|
||||||
"iconify.excludes": [
|
"iconify.excludes": [
|
||||||
"el"
|
"el"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<h1>vue-pure-admin Lite Edition(no i18n version)</h1>
|
<h1>vue-pure-admin Lite Edition(i18n version)</h1>
|
||||||
|
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<h1>vue-pure-admin精简版(非国际化版本)</h1>
|
<h1>vue-pure-admin精简版(国际化版本)</h1>
|
||||||
|
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
## 版本选择
|
## 版本选择
|
||||||
|
|
||||||
当前是非国际化版本,如果您需要国际化版本 [请点击](https://github.com/pure-admin/pure-admin-thin/tree/i18n)
|
当前是国际化版本,如果您需要非国际化版本 [请点击](https://github.com/pure-admin/pure-admin-thin)
|
||||||
|
|
||||||
## 配套视频
|
## 配套视频
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ export const cdn = importToCDN({
|
|||||||
var: "VueRouter",
|
var: "VueRouter",
|
||||||
path: "vue-router.global.min.js"
|
path: "vue-router.global.min.js"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "vue-i18n",
|
||||||
|
var: "VueI18n",
|
||||||
|
path: "vue-i18n.runtime.global.prod.min.js"
|
||||||
|
},
|
||||||
// 项目中没有直接安装vue-demi,但是pinia用到了,所以需要在引入pinia前引入vue-demi(https://github.com/vuejs/pinia/blob/v2/packages/pinia/package.json#L77)
|
// 项目中没有直接安装vue-demi,但是pinia用到了,所以需要在引入pinia前引入vue-demi(https://github.com/vuejs/pinia/blob/v2/packages/pinia/package.json#L77)
|
||||||
{
|
{
|
||||||
name: "vue-demi",
|
name: "vue-demi",
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ const include = [
|
|||||||
"dayjs",
|
"dayjs",
|
||||||
"axios",
|
"axios",
|
||||||
"pinia",
|
"pinia",
|
||||||
|
"vue-i18n",
|
||||||
"vue-types",
|
"vue-types",
|
||||||
"js-cookie",
|
"js-cookie",
|
||||||
"vue-tippy",
|
"vue-tippy",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { cdn } from "./cdn";
|
import { cdn } from "./cdn";
|
||||||
import vue from "@vitejs/plugin-vue";
|
import vue from "@vitejs/plugin-vue";
|
||||||
|
import { pathResolve } from "./utils";
|
||||||
import { viteBuildInfo } from "./info";
|
import { viteBuildInfo } from "./info";
|
||||||
import svgLoader from "vite-svg-loader";
|
import svgLoader from "vite-svg-loader";
|
||||||
import Icons from "unplugin-icons/vite";
|
import Icons from "unplugin-icons/vite";
|
||||||
@@ -10,6 +11,7 @@ import { configCompressPlugin } from "./compress";
|
|||||||
import removeNoMatch from "vite-plugin-router-warn";
|
import removeNoMatch from "vite-plugin-router-warn";
|
||||||
import { visualizer } from "rollup-plugin-visualizer";
|
import { visualizer } from "rollup-plugin-visualizer";
|
||||||
import removeConsole from "vite-plugin-remove-console";
|
import removeConsole from "vite-plugin-remove-console";
|
||||||
|
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
|
||||||
import { codeInspectorPlugin } from "code-inspector-plugin";
|
import { codeInspectorPlugin } from "code-inspector-plugin";
|
||||||
import { vitePluginFakeServer } from "vite-plugin-fake-server";
|
import { vitePluginFakeServer } from "vite-plugin-fake-server";
|
||||||
|
|
||||||
@@ -23,6 +25,9 @@ export function getPluginsList(
|
|||||||
vue(),
|
vue(),
|
||||||
// jsx、tsx语法支持
|
// jsx、tsx语法支持
|
||||||
vueJsx(),
|
vueJsx(),
|
||||||
|
VueI18nPlugin({
|
||||||
|
include: [pathResolve("../locales/**")]
|
||||||
|
}),
|
||||||
/**
|
/**
|
||||||
* 在页面上按住组合键时,鼠标在页面移动即会在 DOM 上出现遮罩层并显示相关信息,点击一下将自动打开 IDE 并将光标定位到元素对应的代码位置
|
* 在页面上按住组合键时,鼠标在页面移动即会在 DOM 上出现遮罩层并显示相关信息,点击一下将自动打开 IDE 并将光标定位到元素对应的代码位置
|
||||||
* Mac 默认组合键 Option + Shift
|
* Mac 默认组合键 Option + Shift
|
||||||
|
|||||||
91
locales/en.yaml
Normal file
91
locales/en.yaml
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
buttons:
|
||||||
|
pureLoginOut: LoginOut
|
||||||
|
pureLogin: Login
|
||||||
|
pureOpenSystemSet: Open System Configs
|
||||||
|
pureReload: Reload
|
||||||
|
pureCloseCurrentTab: Close CurrentTab
|
||||||
|
pureCloseLeftTabs: Close LeftTabs
|
||||||
|
pureCloseRightTabs: Close RightTabs
|
||||||
|
pureCloseOtherTabs: Close OtherTabs
|
||||||
|
pureCloseAllTabs: Close AllTabs
|
||||||
|
pureContentFullScreen: Content FullScreen
|
||||||
|
pureContentExitFullScreen: Content ExitFullScreen
|
||||||
|
pureClickCollapse: Collapse
|
||||||
|
pureClickExpand: Expand
|
||||||
|
pureConfirm: Confirm
|
||||||
|
pureSwitch: Switch
|
||||||
|
pureClose: Close
|
||||||
|
pureBackTop: BackTop
|
||||||
|
pureOpenText: Open
|
||||||
|
pureCloseText: Close
|
||||||
|
search:
|
||||||
|
pureTotal: Total
|
||||||
|
pureHistory: History
|
||||||
|
pureCollect: Collect
|
||||||
|
pureDragSort: (Drag Sort)
|
||||||
|
pureEmpty: Empty
|
||||||
|
purePlaceholder: Search Menu
|
||||||
|
panel:
|
||||||
|
pureSystemSet: System Configs
|
||||||
|
pureCloseSystemSet: Close System Configs
|
||||||
|
pureClearCacheAndToLogin: Clear cache and return to login page
|
||||||
|
pureClearCache: Clear Cache
|
||||||
|
pureOverallStyle: Overall Style
|
||||||
|
pureOverallStyleLight: Light
|
||||||
|
pureOverallStyleLightTip: Set sail freshly and light up the comfortable work interface
|
||||||
|
pureOverallStyleDark: Dark
|
||||||
|
pureOverallStyleDarkTip: Moonlight Overture, indulge in the tranquility and elegance of the night
|
||||||
|
pureOverallStyleSystem: Auto
|
||||||
|
pureOverallStyleSystemTip: Synchronize time, the interface naturally responds to morning and dusk
|
||||||
|
pureThemeColor: Theme Color
|
||||||
|
pureLayoutModel: Layout Model
|
||||||
|
pureVerticalTip: The menu on the left is familiar and friendly
|
||||||
|
pureHorizontalTip: Top menu, concise overview
|
||||||
|
pureMixTip: Mixed menu, flexible
|
||||||
|
pureStretch: Stretch Page
|
||||||
|
pureStretchFixed: Fixed
|
||||||
|
pureStretchFixedTip: Compact pages make it easy to find the information you need
|
||||||
|
pureStretchCustom: Custom
|
||||||
|
pureStretchCustomTip: Minimum 1280, maximum 1600
|
||||||
|
pureTagsStyle: Tags Style
|
||||||
|
pureTagsStyleSmart: Smart
|
||||||
|
pureTagsStyleSmartTip: Smart tags add fun and brilliance
|
||||||
|
pureTagsStyleCard: Card
|
||||||
|
pureTagsStyleCardTip: Card tags for efficient browsing
|
||||||
|
pureTagsStyleChrome: Chrome
|
||||||
|
pureTagsStyleChromeTip: Chrome style is classic and elegant
|
||||||
|
pureInterfaceDisplay: Interface Display
|
||||||
|
pureGreyModel: Grey Model
|
||||||
|
pureWeakModel: Weak Model
|
||||||
|
pureHiddenTags: Hidden Tags
|
||||||
|
pureHiddenFooter: Hidden Footer
|
||||||
|
pureMultiTagsCache: MultiTags Cache
|
||||||
|
menus:
|
||||||
|
pureHome: Home
|
||||||
|
pureLogin: Login
|
||||||
|
pureAbnormal: Abnormal Page
|
||||||
|
purePageNotFound: "404"
|
||||||
|
pureAccessDenied: "403"
|
||||||
|
pureServerError: "500"
|
||||||
|
purePermission: Permission Manage
|
||||||
|
purePermissionPage: Page Permission
|
||||||
|
purePermissionButton: Button Permission
|
||||||
|
purePermissionButtonRouter: Route return button permission
|
||||||
|
purePermissionButtonLogin: Login interface return button permission
|
||||||
|
status:
|
||||||
|
pureLoad: Loading...
|
||||||
|
pureMessage: Message
|
||||||
|
pureNotify: Notify
|
||||||
|
pureTodo: Todo
|
||||||
|
pureNoMessage: No Message
|
||||||
|
pureNoNotify: No Notify
|
||||||
|
pureNoTodo: No Todo
|
||||||
|
login:
|
||||||
|
pureUsername: Username
|
||||||
|
purePassword: Password
|
||||||
|
pureLogin: Login
|
||||||
|
pureLoginSuccess: Login Success
|
||||||
|
pureLoginFail: Login Fail
|
||||||
|
pureUsernameReg: Please enter username
|
||||||
|
purePassWordReg: Please enter password
|
||||||
|
purePassWordRuleReg: The password format should be any combination of 8-18 digits
|
||||||
91
locales/zh-CN.yaml
Normal file
91
locales/zh-CN.yaml
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
buttons:
|
||||||
|
pureLoginOut: 退出系统
|
||||||
|
pureLogin: 登录
|
||||||
|
pureOpenSystemSet: 打开系统配置
|
||||||
|
pureReload: 重新加载
|
||||||
|
pureCloseCurrentTab: 关闭当前标签页
|
||||||
|
pureCloseLeftTabs: 关闭左侧标签页
|
||||||
|
pureCloseRightTabs: 关闭右侧标签页
|
||||||
|
pureCloseOtherTabs: 关闭其他标签页
|
||||||
|
pureCloseAllTabs: 关闭全部标签页
|
||||||
|
pureContentFullScreen: 内容区全屏
|
||||||
|
pureContentExitFullScreen: 内容区退出全屏
|
||||||
|
pureClickCollapse: 点击折叠
|
||||||
|
pureClickExpand: 点击展开
|
||||||
|
pureConfirm: 确认
|
||||||
|
pureSwitch: 切换
|
||||||
|
pureClose: 关闭
|
||||||
|
pureBackTop: 回到顶部
|
||||||
|
pureOpenText: 开
|
||||||
|
pureCloseText: 关
|
||||||
|
search:
|
||||||
|
pureTotal: 共
|
||||||
|
pureHistory: 搜索历史
|
||||||
|
pureCollect: 收藏
|
||||||
|
pureDragSort: (可拖拽排序)
|
||||||
|
pureEmpty: 暂无搜索结果
|
||||||
|
purePlaceholder: 搜索菜单(支持拼音搜索)
|
||||||
|
panel:
|
||||||
|
pureSystemSet: 系统配置
|
||||||
|
pureCloseSystemSet: 关闭配置
|
||||||
|
pureClearCacheAndToLogin: 清空缓存并返回登录页
|
||||||
|
pureClearCache: 清空缓存
|
||||||
|
pureOverallStyle: 整体风格
|
||||||
|
pureOverallStyleLight: 浅色
|
||||||
|
pureOverallStyleLightTip: 清新启航,点亮舒适的工作界面
|
||||||
|
pureOverallStyleDark: 深色
|
||||||
|
pureOverallStyleDarkTip: 月光序曲,沉醉于夜的静谧雅致
|
||||||
|
pureOverallStyleSystem: 自动
|
||||||
|
pureOverallStyleSystemTip: 同步时光,界面随晨昏自然呼应
|
||||||
|
pureThemeColor: 主题色
|
||||||
|
pureLayoutModel: 导航模式
|
||||||
|
pureVerticalTip: 左侧菜单,亲切熟悉
|
||||||
|
pureHorizontalTip: 顶部菜单,简洁概览
|
||||||
|
pureMixTip: 混合菜单,灵活多变
|
||||||
|
pureStretch: 页宽
|
||||||
|
pureStretchFixed: 固定
|
||||||
|
pureStretchFixedTip: 紧凑页面,轻松找到所需信息
|
||||||
|
pureStretchCustom: 自定义
|
||||||
|
pureStretchCustomTip: 最小1280、最大1600
|
||||||
|
pureTagsStyle: 页签风格
|
||||||
|
pureTagsStyleSmart: 灵动
|
||||||
|
pureTagsStyleSmartTip: 灵动标签,添趣生辉
|
||||||
|
pureTagsStyleCard: 卡片
|
||||||
|
pureTagsStyleCardTip: 卡片标签,高效浏览
|
||||||
|
pureTagsStyleChrome: 谷歌
|
||||||
|
pureTagsStyleChromeTip: 谷歌风格,经典美观
|
||||||
|
pureInterfaceDisplay: 界面显示
|
||||||
|
pureGreyModel: 灰色模式
|
||||||
|
pureWeakModel: 色弱模式
|
||||||
|
pureHiddenTags: 隐藏标签页
|
||||||
|
pureHiddenFooter: 隐藏页脚
|
||||||
|
pureMultiTagsCache: 页签持久化
|
||||||
|
menus:
|
||||||
|
pureHome: 首页
|
||||||
|
pureLogin: 登录
|
||||||
|
pureAbnormal: 异常页面
|
||||||
|
purePageNotFound: "404"
|
||||||
|
pureAccessDenied: "403"
|
||||||
|
pureServerError: "500"
|
||||||
|
purePermission: 权限管理
|
||||||
|
purePermissionPage: 页面权限
|
||||||
|
purePermissionButton: 按钮权限
|
||||||
|
purePermissionButtonRouter: 路由返回按钮权限
|
||||||
|
purePermissionButtonLogin: 登录接口返回按钮权限
|
||||||
|
status:
|
||||||
|
pureLoad: 加载中...
|
||||||
|
pureMessage: 消息
|
||||||
|
pureNotify: 通知
|
||||||
|
pureTodo: 待办
|
||||||
|
pureNoMessage: 暂无消息
|
||||||
|
pureNoNotify: 暂无通知
|
||||||
|
pureNoTodo: 暂无待办
|
||||||
|
login:
|
||||||
|
pureUsername: 账号
|
||||||
|
purePassword: 密码
|
||||||
|
pureLogin: 登录
|
||||||
|
pureLoginSuccess: 登录成功
|
||||||
|
pureLoginFail: 登录失败
|
||||||
|
pureUsernameReg: 请输入账号
|
||||||
|
purePassWordReg: 请输入密码
|
||||||
|
purePassWordRuleReg: 密码格式应为8-18位数字、字母、符号的任意两种组合
|
||||||
@@ -9,7 +9,7 @@ import { defineFakeRoute } from "vite-plugin-fake-server/client";
|
|||||||
const permissionRouter = {
|
const permissionRouter = {
|
||||||
path: "/permission",
|
path: "/permission",
|
||||||
meta: {
|
meta: {
|
||||||
title: "权限管理",
|
title: "menus.purePermission",
|
||||||
icon: "ep:lollipop",
|
icon: "ep:lollipop",
|
||||||
rank: 10
|
rank: 10
|
||||||
},
|
},
|
||||||
@@ -18,14 +18,14 @@ const permissionRouter = {
|
|||||||
path: "/permission/page/index",
|
path: "/permission/page/index",
|
||||||
name: "PermissionPage",
|
name: "PermissionPage",
|
||||||
meta: {
|
meta: {
|
||||||
title: "页面权限",
|
title: "menus.purePermissionPage",
|
||||||
roles: ["admin", "common"]
|
roles: ["admin", "common"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/permission/button",
|
path: "/permission/button",
|
||||||
meta: {
|
meta: {
|
||||||
title: "按钮权限",
|
title: "menus.purePermissionButton",
|
||||||
roles: ["admin", "common"]
|
roles: ["admin", "common"]
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
@@ -34,7 +34,7 @@ const permissionRouter = {
|
|||||||
component: "permission/button/index",
|
component: "permission/button/index",
|
||||||
name: "PermissionButtonRouter",
|
name: "PermissionButtonRouter",
|
||||||
meta: {
|
meta: {
|
||||||
title: "路由返回按钮权限",
|
title: "menus.purePermissionButtonRouter",
|
||||||
auths: [
|
auths: [
|
||||||
"permission:btn:add",
|
"permission:btn:add",
|
||||||
"permission:btn:edit",
|
"permission:btn:edit",
|
||||||
@@ -47,7 +47,7 @@ const permissionRouter = {
|
|||||||
component: "permission/button/perms",
|
component: "permission/button/perms",
|
||||||
name: "PermissionButtonLogin",
|
name: "PermissionButtonLogin",
|
||||||
meta: {
|
meta: {
|
||||||
title: "登录接口返回按钮权限"
|
title: "menus.purePermissionButtonLogin"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
"vite",
|
"vite",
|
||||||
"esm"
|
"esm"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/pure-admin/pure-admin-thin",
|
"homepage": "https://github.com/pure-admin/pure-admin-thin/tree/i18n",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/pure-admin/pure-admin-thin.git"
|
"url": "git+https://github.com/pure-admin/pure-admin-thin.git"
|
||||||
@@ -69,6 +69,7 @@
|
|||||||
"responsive-storage": "^2.2.0",
|
"responsive-storage": "^2.2.0",
|
||||||
"sortablejs": "^1.15.6",
|
"sortablejs": "^1.15.6",
|
||||||
"vue": "^3.5.22",
|
"vue": "^3.5.22",
|
||||||
|
"vue-i18n": "^11.1.12",
|
||||||
"vue-router": "^4.6.3",
|
"vue-router": "^4.6.3",
|
||||||
"vue-tippy": "^6.7.1",
|
"vue-tippy": "^6.7.1",
|
||||||
"vue-types": "^6.0.0"
|
"vue-types": "^6.0.0"
|
||||||
@@ -81,6 +82,7 @@
|
|||||||
"@faker-js/faker": "^10.1.0",
|
"@faker-js/faker": "^10.1.0",
|
||||||
"@iconify/json": "^2.2.400",
|
"@iconify/json": "^2.2.400",
|
||||||
"@iconify/vue": "4.2.0",
|
"@iconify/vue": "4.2.0",
|
||||||
|
"@intlify/unplugin-vue-i18n": "^11.0.1",
|
||||||
"@tailwindcss/vite": "^4.1.16",
|
"@tailwindcss/vite": "^4.1.16",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"@types/node": "^20.19.23",
|
"@types/node": "^20.19.23",
|
||||||
|
|||||||
190
pnpm-lock.yaml
generated
190
pnpm-lock.yaml
generated
@@ -71,6 +71,9 @@ importers:
|
|||||||
vue:
|
vue:
|
||||||
specifier: ^3.5.22
|
specifier: ^3.5.22
|
||||||
version: 3.5.22(typescript@5.9.3)
|
version: 3.5.22(typescript@5.9.3)
|
||||||
|
vue-i18n:
|
||||||
|
specifier: ^11.1.12
|
||||||
|
version: 11.1.12(vue@3.5.22(typescript@5.9.3))
|
||||||
vue-router:
|
vue-router:
|
||||||
specifier: ^4.6.3
|
specifier: ^4.6.3
|
||||||
version: 4.6.3(vue@3.5.22(typescript@5.9.3))
|
version: 4.6.3(vue@3.5.22(typescript@5.9.3))
|
||||||
@@ -102,6 +105,9 @@ importers:
|
|||||||
'@iconify/vue':
|
'@iconify/vue':
|
||||||
specifier: 4.2.0
|
specifier: 4.2.0
|
||||||
version: 4.2.0(vue@3.5.22(typescript@5.9.3))
|
version: 4.2.0(vue@3.5.22(typescript@5.9.3))
|
||||||
|
'@intlify/unplugin-vue-i18n':
|
||||||
|
specifier: ^11.0.1
|
||||||
|
version: 11.0.1(@vue/compiler-dom@3.5.22)(eslint@9.38.0(jiti@2.6.1))(rollup@4.52.5)(typescript@5.9.3)(vue-i18n@11.1.12(vue@3.5.22(typescript@5.9.3)))(vue@3.5.22(typescript@5.9.3))
|
||||||
'@tailwindcss/vite':
|
'@tailwindcss/vite':
|
||||||
specifier: ^4.1.16
|
specifier: ^4.1.16
|
||||||
version: 4.1.16(vite@7.1.12(@types/node@20.19.23)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.93.2)(yaml@2.8.1))
|
version: 4.1.16(vite@7.1.12(@types/node@20.19.23)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.93.2)(yaml@2.8.1))
|
||||||
@@ -884,6 +890,61 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: '>=3'
|
vue: '>=3'
|
||||||
|
|
||||||
|
'@intlify/bundle-utils@11.0.1':
|
||||||
|
resolution: {integrity: sha512-5l10G5wE2cQRsZMS9y0oSFMOLW5IG/SgbkIUltqnwF1EMRrRbUAHFiPabXdGTHeexCsMTcxj/1w9i0rzjJU9IQ==}
|
||||||
|
engines: {node: '>= 20'}
|
||||||
|
peerDependencies:
|
||||||
|
petite-vue-i18n: '*'
|
||||||
|
vue-i18n: '*'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
petite-vue-i18n:
|
||||||
|
optional: true
|
||||||
|
vue-i18n:
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@intlify/core-base@11.1.12':
|
||||||
|
resolution: {integrity: sha512-whh0trqRsSqVLNEUCwU59pyJZYpU8AmSWl8M3Jz2Mv5ESPP6kFh4juas2NpZ1iCvy7GlNRffUD1xr84gceimjg==}
|
||||||
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
|
'@intlify/message-compiler@11.1.12':
|
||||||
|
resolution: {integrity: sha512-Fv9iQSJoJaXl4ZGkOCN1LDM3trzze0AS2zRz2EHLiwenwL6t0Ki9KySYlyr27yVOj5aVz0e55JePO+kELIvfdQ==}
|
||||||
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
|
'@intlify/shared@11.1.12':
|
||||||
|
resolution: {integrity: sha512-Om86EjuQtA69hdNj3GQec9ZC0L0vPSAnXzB3gP/gyJ7+mA7t06d9aOAiqMZ+xEOsumGP4eEBlfl8zF2LOTzf2A==}
|
||||||
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
|
'@intlify/unplugin-vue-i18n@11.0.1':
|
||||||
|
resolution: {integrity: sha512-nH5NJdNjy/lO6Ne8LDtZzv4SbpVsMhPE+LbvBDmMeIeJDiino8sOJN2QB3MXzTliYTnqe3aB9Fw5+LJ/XVaXCg==}
|
||||||
|
engines: {node: '>= 20'}
|
||||||
|
peerDependencies:
|
||||||
|
petite-vue-i18n: '*'
|
||||||
|
vue: ^3.2.25
|
||||||
|
vue-i18n: '*'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
petite-vue-i18n:
|
||||||
|
optional: true
|
||||||
|
vue-i18n:
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@intlify/vue-i18n-extensions@8.0.0':
|
||||||
|
resolution: {integrity: sha512-w0+70CvTmuqbskWfzeYhn0IXxllr6mU+IeM2MU0M+j9OW64jkrvqY+pYFWrUnIIC9bEdij3NICruicwd5EgUuQ==}
|
||||||
|
engines: {node: '>= 18'}
|
||||||
|
peerDependencies:
|
||||||
|
'@intlify/shared': ^9.0.0 || ^10.0.0 || ^11.0.0
|
||||||
|
'@vue/compiler-dom': ^3.0.0
|
||||||
|
vue: ^3.0.0
|
||||||
|
vue-i18n: ^9.0.0 || ^10.0.0 || ^11.0.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@intlify/shared':
|
||||||
|
optional: true
|
||||||
|
'@vue/compiler-dom':
|
||||||
|
optional: true
|
||||||
|
vue:
|
||||||
|
optional: true
|
||||||
|
vue-i18n:
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@isaacs/balanced-match@4.0.1':
|
'@isaacs/balanced-match@4.0.1':
|
||||||
resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==}
|
resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==}
|
||||||
engines: {node: 20 || >=22}
|
engines: {node: 20 || >=22}
|
||||||
@@ -2009,6 +2070,11 @@ packages:
|
|||||||
resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
|
resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
|
|
||||||
|
escodegen@2.1.0:
|
||||||
|
resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==}
|
||||||
|
engines: {node: '>=6.0'}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
eslint-config-prettier@10.1.8:
|
eslint-config-prettier@10.1.8:
|
||||||
resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==}
|
resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@@ -2069,6 +2135,15 @@ packages:
|
|||||||
resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==}
|
resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
|
espree@9.6.1:
|
||||||
|
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
|
||||||
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
|
|
||||||
|
esprima@4.0.1:
|
||||||
|
resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==}
|
||||||
|
engines: {node: '>=4'}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
esquery@1.6.0:
|
esquery@1.6.0:
|
||||||
resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==}
|
resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==}
|
||||||
engines: {node: '>=0.10'}
|
engines: {node: '>=0.10'}
|
||||||
@@ -2452,6 +2527,10 @@ packages:
|
|||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
jsonc-eslint-parser@2.4.1:
|
||||||
|
resolution: {integrity: sha512-uuPNLJkKN8NXAlZlQ6kmUF9qO+T6Kyd7oV4+/7yy8Jz6+MZNyhPq8EdLpdfnPVzUC8qSf1b4j1azKaGnFsjmsw==}
|
||||||
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
|
|
||||||
jsonfile@6.2.0:
|
jsonfile@6.2.0:
|
||||||
resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==}
|
resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==}
|
||||||
|
|
||||||
@@ -3307,6 +3386,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
|
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
|
||||||
|
source-map@0.6.1:
|
||||||
|
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
|
||||||
source-map@0.7.6:
|
source-map@0.7.6:
|
||||||
resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==}
|
resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==}
|
||||||
engines: {node: '>= 12'}
|
engines: {node: '>= 12'}
|
||||||
@@ -3707,6 +3790,12 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.57.0 || ^9.0.0
|
eslint: ^8.57.0 || ^9.0.0
|
||||||
|
|
||||||
|
vue-i18n@11.1.12:
|
||||||
|
resolution: {integrity: sha512-BnstPj3KLHLrsqbVU2UOrPmr0+Mv11bsUZG0PyCOzsawCivk8W00GMXHeVUWIDOgNaScCuZah47CZFE+Wnl8mw==}
|
||||||
|
engines: {node: '>= 16'}
|
||||||
|
peerDependencies:
|
||||||
|
vue: ^3.0.0
|
||||||
|
|
||||||
vue-router@4.6.3:
|
vue-router@4.6.3:
|
||||||
resolution: {integrity: sha512-ARBedLm9YlbvQomnmq91Os7ck6efydTSpRP3nuOKCvgJOHNrhRoJDSKtee8kcL1Vf7nz6U+PMBL+hTvR3bTVQg==}
|
resolution: {integrity: sha512-ARBedLm9YlbvQomnmq91Os7ck6efydTSpRP3nuOKCvgJOHNrhRoJDSKtee8kcL1Vf7nz6U+PMBL+hTvR3bTVQg==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -3787,6 +3876,10 @@ packages:
|
|||||||
yallist@3.1.1:
|
yallist@3.1.1:
|
||||||
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
|
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
|
||||||
|
|
||||||
|
yaml-eslint-parser@1.3.0:
|
||||||
|
resolution: {integrity: sha512-E/+VitOorXSLiAqtTd7Yqax0/pAS3xaYMP+AUUJGOK1OZG3rhcj9fcJOM5HJ2VrP1FrStVCWr1muTfQCdj4tAA==}
|
||||||
|
engines: {node: ^14.17.0 || >=16.0.0}
|
||||||
|
|
||||||
yaml@2.8.1:
|
yaml@2.8.1:
|
||||||
resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==}
|
resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==}
|
||||||
engines: {node: '>= 14.6'}
|
engines: {node: '>= 14.6'}
|
||||||
@@ -4426,6 +4519,65 @@ snapshots:
|
|||||||
'@iconify/types': 2.0.0
|
'@iconify/types': 2.0.0
|
||||||
vue: 3.5.22(typescript@5.9.3)
|
vue: 3.5.22(typescript@5.9.3)
|
||||||
|
|
||||||
|
'@intlify/bundle-utils@11.0.1(vue-i18n@11.1.12(vue@3.5.22(typescript@5.9.3)))':
|
||||||
|
dependencies:
|
||||||
|
'@intlify/message-compiler': 11.1.12
|
||||||
|
'@intlify/shared': 11.1.12
|
||||||
|
acorn: 8.15.0
|
||||||
|
esbuild: 0.25.11
|
||||||
|
escodegen: 2.1.0
|
||||||
|
estree-walker: 2.0.2
|
||||||
|
jsonc-eslint-parser: 2.4.1
|
||||||
|
source-map-js: 1.2.1
|
||||||
|
yaml-eslint-parser: 1.3.0
|
||||||
|
optionalDependencies:
|
||||||
|
vue-i18n: 11.1.12(vue@3.5.22(typescript@5.9.3))
|
||||||
|
|
||||||
|
'@intlify/core-base@11.1.12':
|
||||||
|
dependencies:
|
||||||
|
'@intlify/message-compiler': 11.1.12
|
||||||
|
'@intlify/shared': 11.1.12
|
||||||
|
|
||||||
|
'@intlify/message-compiler@11.1.12':
|
||||||
|
dependencies:
|
||||||
|
'@intlify/shared': 11.1.12
|
||||||
|
source-map-js: 1.2.1
|
||||||
|
|
||||||
|
'@intlify/shared@11.1.12': {}
|
||||||
|
|
||||||
|
'@intlify/unplugin-vue-i18n@11.0.1(@vue/compiler-dom@3.5.22)(eslint@9.38.0(jiti@2.6.1))(rollup@4.52.5)(typescript@5.9.3)(vue-i18n@11.1.12(vue@3.5.22(typescript@5.9.3)))(vue@3.5.22(typescript@5.9.3))':
|
||||||
|
dependencies:
|
||||||
|
'@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0(jiti@2.6.1))
|
||||||
|
'@intlify/bundle-utils': 11.0.1(vue-i18n@11.1.12(vue@3.5.22(typescript@5.9.3)))
|
||||||
|
'@intlify/shared': 11.1.12
|
||||||
|
'@intlify/vue-i18n-extensions': 8.0.0(@intlify/shared@11.1.12)(@vue/compiler-dom@3.5.22)(vue-i18n@11.1.12(vue@3.5.22(typescript@5.9.3)))(vue@3.5.22(typescript@5.9.3))
|
||||||
|
'@rollup/pluginutils': 5.3.0(rollup@4.52.5)
|
||||||
|
'@typescript-eslint/scope-manager': 8.46.2
|
||||||
|
'@typescript-eslint/typescript-estree': 8.46.2(typescript@5.9.3)
|
||||||
|
debug: 4.4.3
|
||||||
|
fast-glob: 3.3.3
|
||||||
|
pathe: 2.0.3
|
||||||
|
picocolors: 1.1.1
|
||||||
|
unplugin: 2.3.10
|
||||||
|
vue: 3.5.22(typescript@5.9.3)
|
||||||
|
optionalDependencies:
|
||||||
|
vue-i18n: 11.1.12(vue@3.5.22(typescript@5.9.3))
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- '@vue/compiler-dom'
|
||||||
|
- eslint
|
||||||
|
- rollup
|
||||||
|
- supports-color
|
||||||
|
- typescript
|
||||||
|
|
||||||
|
'@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.1.12)(@vue/compiler-dom@3.5.22)(vue-i18n@11.1.12(vue@3.5.22(typescript@5.9.3)))(vue@3.5.22(typescript@5.9.3))':
|
||||||
|
dependencies:
|
||||||
|
'@babel/parser': 7.28.5
|
||||||
|
optionalDependencies:
|
||||||
|
'@intlify/shared': 11.1.12
|
||||||
|
'@vue/compiler-dom': 3.5.22
|
||||||
|
vue: 3.5.22(typescript@5.9.3)
|
||||||
|
vue-i18n: 11.1.12(vue@3.5.22(typescript@5.9.3))
|
||||||
|
|
||||||
'@isaacs/balanced-match@4.0.1': {}
|
'@isaacs/balanced-match@4.0.1': {}
|
||||||
|
|
||||||
'@isaacs/brace-expansion@5.0.0':
|
'@isaacs/brace-expansion@5.0.0':
|
||||||
@@ -5645,6 +5797,14 @@ snapshots:
|
|||||||
escape-string-regexp@5.0.0:
|
escape-string-regexp@5.0.0:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
escodegen@2.1.0:
|
||||||
|
dependencies:
|
||||||
|
esprima: 4.0.1
|
||||||
|
estraverse: 5.3.0
|
||||||
|
esutils: 2.0.3
|
||||||
|
optionalDependencies:
|
||||||
|
source-map: 0.6.1
|
||||||
|
|
||||||
eslint-config-prettier@10.1.8(eslint@9.38.0(jiti@2.6.1)):
|
eslint-config-prettier@10.1.8(eslint@9.38.0(jiti@2.6.1)):
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.38.0(jiti@2.6.1)
|
eslint: 9.38.0(jiti@2.6.1)
|
||||||
@@ -5727,6 +5887,14 @@ snapshots:
|
|||||||
acorn-jsx: 5.3.2(acorn@8.15.0)
|
acorn-jsx: 5.3.2(acorn@8.15.0)
|
||||||
eslint-visitor-keys: 4.2.1
|
eslint-visitor-keys: 4.2.1
|
||||||
|
|
||||||
|
espree@9.6.1:
|
||||||
|
dependencies:
|
||||||
|
acorn: 8.15.0
|
||||||
|
acorn-jsx: 5.3.2(acorn@8.15.0)
|
||||||
|
eslint-visitor-keys: 3.4.3
|
||||||
|
|
||||||
|
esprima@4.0.1: {}
|
||||||
|
|
||||||
esquery@1.6.0:
|
esquery@1.6.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
estraverse: 5.3.0
|
estraverse: 5.3.0
|
||||||
@@ -6067,6 +6235,13 @@ snapshots:
|
|||||||
|
|
||||||
json5@2.2.3: {}
|
json5@2.2.3: {}
|
||||||
|
|
||||||
|
jsonc-eslint-parser@2.4.1:
|
||||||
|
dependencies:
|
||||||
|
acorn: 8.15.0
|
||||||
|
eslint-visitor-keys: 3.4.3
|
||||||
|
espree: 9.6.1
|
||||||
|
semver: 7.7.3
|
||||||
|
|
||||||
jsonfile@6.2.0:
|
jsonfile@6.2.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
universalify: 2.0.1
|
universalify: 2.0.1
|
||||||
@@ -6851,6 +7026,9 @@ snapshots:
|
|||||||
|
|
||||||
source-map-js@1.2.1: {}
|
source-map-js@1.2.1: {}
|
||||||
|
|
||||||
|
source-map@0.6.1:
|
||||||
|
optional: true
|
||||||
|
|
||||||
source-map@0.7.6: {}
|
source-map@0.7.6: {}
|
||||||
|
|
||||||
sourcemap-codec@1.4.8: {}
|
sourcemap-codec@1.4.8: {}
|
||||||
@@ -7289,6 +7467,13 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
|
vue-i18n@11.1.12(vue@3.5.22(typescript@5.9.3)):
|
||||||
|
dependencies:
|
||||||
|
'@intlify/core-base': 11.1.12
|
||||||
|
'@intlify/shared': 11.1.12
|
||||||
|
'@vue/devtools-api': 6.6.4
|
||||||
|
vue: 3.5.22(typescript@5.9.3)
|
||||||
|
|
||||||
vue-router@4.6.3(vue@3.5.22(typescript@5.9.3)):
|
vue-router@4.6.3(vue@3.5.22(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-api': 6.6.4
|
'@vue/devtools-api': 6.6.4
|
||||||
@@ -7364,6 +7549,11 @@ snapshots:
|
|||||||
|
|
||||||
yallist@3.1.1: {}
|
yallist@3.1.1: {}
|
||||||
|
|
||||||
|
yaml-eslint-parser@1.3.0:
|
||||||
|
dependencies:
|
||||||
|
eslint-visitor-keys: 3.4.3
|
||||||
|
yaml: 2.8.1
|
||||||
|
|
||||||
yaml@2.8.1: {}
|
yaml@2.8.1: {}
|
||||||
|
|
||||||
yargs-parser@21.1.1: {}
|
yargs-parser@21.1.1: {}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"HiddenSideBar": false,
|
"HiddenSideBar": false,
|
||||||
"MultiTagsCache": false,
|
"MultiTagsCache": false,
|
||||||
"KeepAlive": true,
|
"KeepAlive": true,
|
||||||
|
"Locale": "zh",
|
||||||
"Layout": "vertical",
|
"Layout": "vertical",
|
||||||
"Theme": "light",
|
"Theme": "light",
|
||||||
"DarkMode": false,
|
"DarkMode": false,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import { ElConfigProvider } from "element-plus";
|
import { ElConfigProvider } from "element-plus";
|
||||||
import { ReDialog } from "@/components/ReDialog";
|
import { ReDialog } from "@/components/ReDialog";
|
||||||
|
import en from "element-plus/es/locale/lang/en";
|
||||||
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -19,7 +20,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
currentLocale() {
|
currentLocale() {
|
||||||
return zhCn;
|
return this.$storage.locale?.locale === "zh" ? zhCn : en;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
1
src/assets/svg/globalization.svg
Normal file
1
src/assets/svg/globalization.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" class="globalization" viewBox="0 0 512 512"><path fill="currentColor" d="m478.33 433.6-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362 368 281.65 401.17 362zm-66.99-19.08a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73 39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93.92 1.19 1.83 2.35 2.74 3.51-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59 22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z"/></svg>
|
||||||
|
After Width: | Height: | Size: 807 B |
@@ -1,4 +1,5 @@
|
|||||||
import Sortable from "sortablejs";
|
import Sortable from "sortablejs";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
import {
|
import {
|
||||||
type PropType,
|
type PropType,
|
||||||
@@ -147,7 +148,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleCheckColumnListChange(val: boolean, label: string) {
|
function handleCheckColumnListChange(val: boolean, label: string) {
|
||||||
dynamicColumns.value.filter(item => item.label === label)[0].hide = !val;
|
dynamicColumns.value.filter(
|
||||||
|
item => transformI18n(item.label) === transformI18n(label)
|
||||||
|
)[0].hide = !val;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onReset() {
|
async function onReset() {
|
||||||
@@ -220,7 +223,9 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isFixedColumn = (label: string) => {
|
const isFixedColumn = (label: string) => {
|
||||||
return dynamicColumns.value.filter(item => item.label === label)[0].fixed
|
return dynamicColumns.value.filter(
|
||||||
|
item => transformI18n(item.label) === transformI18n(label)
|
||||||
|
)[0].fixed
|
||||||
? true
|
? true
|
||||||
: false;
|
: false;
|
||||||
};
|
};
|
||||||
@@ -358,10 +363,10 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
title={item}
|
title={transformI18n(item)}
|
||||||
class="inline-block w-[120px] truncate hover:text-text_color_primary"
|
class="inline-block w-[120px] truncate hover:text-text_color_primary"
|
||||||
>
|
>
|
||||||
{item}
|
{transformI18n(item)}
|
||||||
</span>
|
</span>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import LayFrame from "../lay-frame/index.vue";
|
import LayFrame from "../lay-frame/index.vue";
|
||||||
import LayFooter from "../lay-footer/index.vue";
|
import LayFooter from "../lay-footer/index.vue";
|
||||||
import { useTags } from "@/layout/hooks/useTag";
|
import { useTags } from "@/layout/hooks/useTag";
|
||||||
@@ -11,6 +12,7 @@ const props = defineProps({
|
|||||||
fixedHeader: Boolean
|
fixedHeader: Boolean
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const { showModel } = useTags();
|
const { showModel } = useTags();
|
||||||
const { $storage, $config } = useGlobal<GlobalPropertiesApi>();
|
const { $storage, $config } = useGlobal<GlobalPropertiesApi>();
|
||||||
|
|
||||||
@@ -131,7 +133,7 @@ const transitionMain = defineComponent({
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<el-backtop
|
<el-backtop
|
||||||
title="回到顶部"
|
:title="t('buttons.pureBackTop')"
|
||||||
target=".app-main .el-scrollbar__wrap"
|
target=".app-main .el-scrollbar__wrap"
|
||||||
>
|
>
|
||||||
<BackTopIcon />
|
<BackTopIcon />
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ import { useNav } from "@/layout/hooks/useNav";
|
|||||||
import LaySearch from "../lay-search/index.vue";
|
import LaySearch from "../lay-search/index.vue";
|
||||||
import LayNotice from "../lay-notice/index.vue";
|
import LayNotice from "../lay-notice/index.vue";
|
||||||
import LayNavMix from "../lay-sidebar/NavMix.vue";
|
import LayNavMix from "../lay-sidebar/NavMix.vue";
|
||||||
|
import { useTranslationLang } from "@/layout/hooks/useTranslationLang";
|
||||||
import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
|
import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
|
||||||
import LaySidebarBreadCrumb from "../lay-sidebar/components/SidebarBreadCrumb.vue";
|
import LaySidebarBreadCrumb from "../lay-sidebar/components/SidebarBreadCrumb.vue";
|
||||||
import LaySidebarTopCollapse from "../lay-sidebar/components/SidebarTopCollapse.vue";
|
import LaySidebarTopCollapse from "../lay-sidebar/components/SidebarTopCollapse.vue";
|
||||||
|
|
||||||
|
import GlobalizationIcon from "@/assets/svg/globalization.svg?component";
|
||||||
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
||||||
import Setting from "~icons/ri/settings-3-line";
|
import Setting from "~icons/ri/settings-3-line";
|
||||||
|
import Check from "~icons/ep/check";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
layout,
|
layout,
|
||||||
@@ -19,8 +22,12 @@ const {
|
|||||||
username,
|
username,
|
||||||
userAvatar,
|
userAvatar,
|
||||||
avatarsStyle,
|
avatarsStyle,
|
||||||
toggleSideBar
|
toggleSideBar,
|
||||||
|
getDropdownItemStyle,
|
||||||
|
getDropdownItemClass
|
||||||
} = useNav();
|
} = useNav();
|
||||||
|
|
||||||
|
const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -42,6 +49,38 @@ const {
|
|||||||
<div v-if="layout === 'vertical'" class="vertical-header-right">
|
<div v-if="layout === 'vertical'" class="vertical-header-right">
|
||||||
<!-- 菜单搜索 -->
|
<!-- 菜单搜索 -->
|
||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
|
<!-- 国际化 -->
|
||||||
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
|
<GlobalizationIcon
|
||||||
|
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||||
|
/>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu class="translation">
|
||||||
|
<el-dropdown-item
|
||||||
|
:style="getDropdownItemStyle(locale, 'zh')"
|
||||||
|
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
||||||
|
@click="translationCh"
|
||||||
|
>
|
||||||
|
<IconifyIconOffline
|
||||||
|
v-show="locale === 'zh'"
|
||||||
|
class="check-zh"
|
||||||
|
:icon="Check"
|
||||||
|
/>
|
||||||
|
简体中文
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
:style="getDropdownItemStyle(locale, 'en')"
|
||||||
|
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
||||||
|
@click="translationEn"
|
||||||
|
>
|
||||||
|
<span v-show="locale === 'en'" class="check-en">
|
||||||
|
<IconifyIconOffline :icon="Check" />
|
||||||
|
</span>
|
||||||
|
English
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
<!-- 全屏 -->
|
<!-- 全屏 -->
|
||||||
<LaySidebarFullScreen id="full-screen" />
|
<LaySidebarFullScreen id="full-screen" />
|
||||||
<!-- 消息通知 -->
|
<!-- 消息通知 -->
|
||||||
@@ -59,14 +98,14 @@ const {
|
|||||||
:icon="LogoutCircleRLine"
|
:icon="LogoutCircleRLine"
|
||||||
style="margin: 5px"
|
style="margin: 5px"
|
||||||
/>
|
/>
|
||||||
退出系统
|
{{ t("buttons.pureLoginOut") }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover"
|
class="set-icon navbar-bg-hover"
|
||||||
title="打开系统配置"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline :icon="Setting" />
|
<IconifyIconOffline :icon="Setting" />
|
||||||
@@ -123,6 +162,22 @@ const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.translation {
|
||||||
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
|
padding: 5px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-zh {
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-en {
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.logout {
|
.logout {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { PropType } from "vue";
|
import { PropType } from "vue";
|
||||||
import { ListItem } from "../data";
|
import { ListItem } from "../data";
|
||||||
import NoticeItem from "./NoticeItem.vue";
|
import NoticeItem from "./NoticeItem.vue";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
list: {
|
list: {
|
||||||
@@ -19,5 +20,5 @@ defineProps({
|
|||||||
<div v-if="list.length">
|
<div v-if="list.length">
|
||||||
<NoticeItem v-for="(item, index) in list" :key="index" :noticeItem="item" />
|
<NoticeItem v-for="(item, index) in list" :key="index" :noticeItem="item" />
|
||||||
</div>
|
</div>
|
||||||
<el-empty v-else :description="emptyText" />
|
<el-empty v-else :description="transformI18n(emptyText)" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { $t } from "@/plugins/i18n";
|
||||||
|
|
||||||
export interface ListItem {
|
export interface ListItem {
|
||||||
avatar: string;
|
avatar: string;
|
||||||
title: string;
|
title: string;
|
||||||
@@ -18,13 +20,13 @@ export interface TabItem {
|
|||||||
export const noticesData: TabItem[] = [
|
export const noticesData: TabItem[] = [
|
||||||
{
|
{
|
||||||
key: "1",
|
key: "1",
|
||||||
name: "通知",
|
name: $t("status.pureNotify"),
|
||||||
list: [],
|
list: [],
|
||||||
emptyText: "暂无通知"
|
emptyText: $t("status.pureNoNotify")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "2",
|
key: "2",
|
||||||
name: "消息",
|
name: $t("status.pureMessage"),
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile1.svg",
|
avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile1.svg",
|
||||||
@@ -49,11 +51,11 @@ export const noticesData: TabItem[] = [
|
|||||||
type: "2"
|
type: "2"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
emptyText: "暂无消息"
|
emptyText: $t("status.pureNoMessage")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "3",
|
key: "3",
|
||||||
name: "待办",
|
name: $t("status.pureTodo"),
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
avatar: "",
|
avatar: "",
|
||||||
@@ -92,6 +94,6 @@ export const noticesData: TabItem[] = [
|
|||||||
type: "3"
|
type: "3"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
emptyText: "暂无待办"
|
emptyText: $t("status.pureNoTodo")
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { noticesData } from "./data";
|
import { noticesData } from "./data";
|
||||||
import NoticeList from "./components/NoticeList.vue";
|
import NoticeList from "./components/NoticeList.vue";
|
||||||
import BellIcon from "~icons/ep/bell";
|
import BellIcon from "~icons/ep/bell";
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const noticesNum = ref(0);
|
const noticesNum = ref(0);
|
||||||
const notices = ref(noticesData);
|
const notices = ref(noticesData);
|
||||||
const activeKey = ref(noticesData[0]?.key);
|
const activeKey = ref(noticesData[0]?.key);
|
||||||
@@ -12,7 +14,7 @@ notices.value.map(v => (noticesNum.value += v.list.length));
|
|||||||
|
|
||||||
const getLabel = computed(
|
const getLabel = computed(
|
||||||
() => item =>
|
() => item =>
|
||||||
item.name + (item.list.length > 0 ? `(${item.list.length})` : "")
|
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -42,7 +44,7 @@ const getLabel = computed(
|
|||||||
>
|
>
|
||||||
<el-empty
|
<el-empty
|
||||||
v-if="notices.length === 0"
|
v-if="notices.length === 0"
|
||||||
description="暂无消息"
|
:description="t('status.pureNoMessage')"
|
||||||
:image-size="60"
|
:image-size="60"
|
||||||
/>
|
/>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { emitter } from "@/utils/mitt";
|
import { emitter } from "@/utils/mitt";
|
||||||
import { onClickOutside } from "@vueuse/core";
|
import { onClickOutside } from "@vueuse/core";
|
||||||
import { ref, computed, onMounted, onBeforeUnmount } from "vue";
|
import { ref, computed, onMounted, onBeforeUnmount } from "vue";
|
||||||
@@ -25,6 +26,7 @@ const iconClass = computed(() => {
|
|||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const { onReset } = useDataThemeChange();
|
const { onReset } = useDataThemeChange();
|
||||||
|
|
||||||
onClickOutside(target, (event: any) => {
|
onClickOutside(target, (event: any) => {
|
||||||
@@ -51,10 +53,12 @@ onBeforeUnmount(() => {
|
|||||||
<div
|
<div
|
||||||
class="project-configuration border-0 border-b-[1px] border-solid border-[var(--pure-border-color)]"
|
class="project-configuration border-0 border-b-[1px] border-solid border-[var(--pure-border-color)]"
|
||||||
>
|
>
|
||||||
<h4 class="dark:text-white">系统配置</h4>
|
<h4 class="dark:text-white">
|
||||||
|
{{ t("panel.pureSystemSet") }}
|
||||||
|
</h4>
|
||||||
<span
|
<span
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
content: '关闭配置',
|
content: t('panel.pureCloseSystemSet'),
|
||||||
placement: 'bottom-start',
|
placement: 'bottom-start',
|
||||||
zIndex: 41000
|
zIndex: 41000
|
||||||
}"
|
}"
|
||||||
@@ -78,7 +82,7 @@ onBeforeUnmount(() => {
|
|||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
content: '清空缓存并返回登录页',
|
content: t('panel.pureClearCacheAndToLogin'),
|
||||||
placement: 'left-start',
|
placement: 'left-start',
|
||||||
zIndex: 41000
|
zIndex: 41000
|
||||||
}"
|
}"
|
||||||
@@ -87,7 +91,7 @@ onBeforeUnmount(() => {
|
|||||||
bg
|
bg
|
||||||
@click="onReset"
|
@click="onReset"
|
||||||
>
|
>
|
||||||
清空缓存
|
{{ t("panel.pureClearCache") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import MdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
import MdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
||||||
import EnterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
import EnterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||||
@@ -9,6 +10,7 @@ withDefaults(defineProps<{ total?: number }>(), {
|
|||||||
total: 0
|
total: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const { device } = useNav();
|
const { device } = useNav();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -16,19 +18,19 @@ const { device } = useNav();
|
|||||||
<div class="search-footer text-[#333] dark:text-white">
|
<div class="search-footer text-[#333] dark:text-white">
|
||||||
<span class="search-footer-item">
|
<span class="search-footer-item">
|
||||||
<EnterOutlined class="icon" />
|
<EnterOutlined class="icon" />
|
||||||
确认
|
{{ t("buttons.pureConfirm") }}
|
||||||
</span>
|
</span>
|
||||||
<span class="search-footer-item">
|
<span class="search-footer-item">
|
||||||
<IconifyIconOffline :icon="ArrowUpLine" class="icon" />
|
<IconifyIconOffline :icon="ArrowUpLine" class="icon" />
|
||||||
<IconifyIconOffline :icon="ArrowDownLine" class="icon" />
|
<IconifyIconOffline :icon="ArrowDownLine" class="icon" />
|
||||||
切换
|
{{ t("buttons.pureSwitch") }}
|
||||||
</span>
|
</span>
|
||||||
<span class="search-footer-item">
|
<span class="search-footer-item">
|
||||||
<MdiKeyboardEsc class="icon" />
|
<MdiKeyboardEsc class="icon" />
|
||||||
关闭
|
{{ t("buttons.pureClose") }}
|
||||||
</span>
|
</span>
|
||||||
<p v-if="device !== 'mobile' && total > 0" class="search-footer-total">
|
<p v-if="device !== 'mobile' && total > 0" class="search-footer-total">
|
||||||
{{ `共 ${total} 项` }}
|
{{ `${t("search.pureTotal")} ${total}` }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Sortable from "sortablejs";
|
import Sortable from "sortablejs";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import SearchHistoryItem from "./SearchHistoryItem.vue";
|
import SearchHistoryItem from "./SearchHistoryItem.vue";
|
||||||
import type { optionsItem, dragItem, Props } from "../types";
|
import type { optionsItem, dragItem, Props } from "../types";
|
||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
@@ -19,6 +20,7 @@ const innerHeight = ref();
|
|||||||
/** 判断是否停止鼠标移入事件处理 */
|
/** 判断是否停止鼠标移入事件处理 */
|
||||||
const stopMouseEvent = ref(false);
|
const stopMouseEvent = ref(false);
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
const instance = getCurrentInstance()!;
|
const instance = getCurrentInstance()!;
|
||||||
const props = withDefaults(defineProps<Props>(), {});
|
const props = withDefaults(defineProps<Props>(), {});
|
||||||
@@ -141,7 +143,9 @@ defineExpose({ handleScroll });
|
|||||||
<template>
|
<template>
|
||||||
<div ref="historyRef" class="history">
|
<div ref="historyRef" class="history">
|
||||||
<template v-if="historyList.length">
|
<template v-if="historyList.length">
|
||||||
<div :style="titleStyle">搜索历史</div>
|
<div :style="titleStyle">
|
||||||
|
{{ t("search.pureHistory") }}
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in historyList"
|
v-for="(item, index) in historyList"
|
||||||
:key="item.path"
|
:key="item.path"
|
||||||
@@ -160,7 +164,9 @@ defineExpose({ handleScroll });
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="collectList.length">
|
<template v-if="collectList.length">
|
||||||
<div :style="titleStyle">
|
<div :style="titleStyle">
|
||||||
{{ `收藏${collectList.length > 1 ? "(可拖拽排序)" : ""}` }}
|
{{
|
||||||
|
`${t("search.pureCollect")}${collectList.length > 1 ? t("search.pureDragSort") : ""}`
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="collect-container">
|
<div class="collect-container">
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { optionsItem } from "../types";
|
import type { optionsItem } from "../types";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
import StarIcon from "~icons/ep/star";
|
import StarIcon from "~icons/ep/star";
|
||||||
import CloseIcon from "~icons/ep/close";
|
import CloseIcon from "~icons/ep/close";
|
||||||
@@ -28,7 +29,7 @@ function handleDelete(item) {
|
|||||||
<template>
|
<template>
|
||||||
<component :is="useRenderIcon(item.meta?.icon)" />
|
<component :is="useRenderIcon(item.meta?.icon)" />
|
||||||
<span class="history-item-title">
|
<span class="history-item-title">
|
||||||
{{ item.meta?.title }}
|
{{ transformI18n(item.meta?.title) }}
|
||||||
</span>
|
</span>
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
v-show="item.type === 'history'"
|
v-show="item.type === 'history'"
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { match } from "pinyin-pro";
|
import { match } from "pinyin-pro";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { getConfig } from "@/config";
|
import { getConfig } from "@/config";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import SearchResult from "./SearchResult.vue";
|
import SearchResult from "./SearchResult.vue";
|
||||||
import SearchFooter from "./SearchFooter.vue";
|
import SearchFooter from "./SearchFooter.vue";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import SearchHistory from "./SearchHistory.vue";
|
import SearchHistory from "./SearchHistory.vue";
|
||||||
import type { optionsItem, dragItem } from "../types";
|
import type { optionsItem, dragItem } from "../types";
|
||||||
import { ref, computed, shallowRef, watch } from "vue";
|
import { ref, computed, shallowRef, watch } from "vue";
|
||||||
@@ -27,6 +29,7 @@ const emit = defineEmits<Emits>();
|
|||||||
const props = withDefaults(defineProps<Props>(), {});
|
const props = withDefaults(defineProps<Props>(), {});
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { t, locale } = useI18n();
|
||||||
|
|
||||||
const HISTORY_TYPE = "history";
|
const HISTORY_TYPE = "history";
|
||||||
const COLLECT_TYPE = "collect";
|
const COLLECT_TYPE = "collect";
|
||||||
@@ -107,15 +110,16 @@ function search() {
|
|||||||
const flatMenusData = flatTree(menusData.value);
|
const flatMenusData = flatTree(menusData.value);
|
||||||
resultOptions.value = flatMenusData.filter(menu =>
|
resultOptions.value = flatMenusData.filter(menu =>
|
||||||
keyword.value
|
keyword.value
|
||||||
? menu.meta?.title
|
? transformI18n(menu.meta?.title)
|
||||||
.toLocaleLowerCase()
|
.toLocaleLowerCase()
|
||||||
.includes(keyword.value.toLocaleLowerCase().trim()) ||
|
.includes(keyword.value.toLocaleLowerCase().trim()) ||
|
||||||
!isAllEmpty(
|
(locale.value === "zh" &&
|
||||||
match(
|
!isAllEmpty(
|
||||||
menu.meta?.title.toLocaleLowerCase(),
|
match(
|
||||||
keyword.value.toLocaleLowerCase().trim()
|
transformI18n(menu.meta?.title).toLocaleLowerCase(),
|
||||||
)
|
keyword.value.toLocaleLowerCase().trim()
|
||||||
)
|
)
|
||||||
|
))
|
||||||
: false
|
: false
|
||||||
);
|
);
|
||||||
activePath.value =
|
activePath.value =
|
||||||
@@ -289,7 +293,7 @@ onKeyStroke("ArrowDown", handleDown);
|
|||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
size="large"
|
size="large"
|
||||||
clearable
|
clearable
|
||||||
placeholder="搜索菜单(支持拼音搜索)"
|
:placeholder="t('search.purePlaceholder')"
|
||||||
@input="handleSearch"
|
@input="handleSearch"
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
@@ -301,7 +305,7 @@ onKeyStroke("ArrowDown", handleDown);
|
|||||||
</el-input>
|
</el-input>
|
||||||
<div class="search-content">
|
<div class="search-content">
|
||||||
<el-scrollbar ref="scrollbarRef" max-height="calc(90vh - 140px)">
|
<el-scrollbar ref="scrollbarRef" max-height="calc(90vh - 140px)">
|
||||||
<el-empty v-if="showEmpty" description="暂无搜索结果" />
|
<el-empty v-if="showEmpty" :description="t('search.pureEmpty')" />
|
||||||
<SearchHistory
|
<SearchHistory
|
||||||
v-if="showSearchHistory"
|
v-if="showSearchHistory"
|
||||||
ref="historyRef"
|
ref="historyRef"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Props } from "../types";
|
import type { Props } from "../types";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { useResizeObserver } from "@pureadmin/utils";
|
import { useResizeObserver } from "@pureadmin/utils";
|
||||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
@@ -81,7 +82,7 @@ defineExpose({ handleScroll });
|
|||||||
>
|
>
|
||||||
<component :is="useRenderIcon(item.meta?.icon)" />
|
<component :is="useRenderIcon(item.meta?.icon)" />
|
||||||
<span class="result-item-title">
|
<span class="result-item-title">
|
||||||
{{ item.meta?.title }}
|
{{ transformI18n(item.meta?.title) }}
|
||||||
</span>
|
</span>
|
||||||
<EnterOutlined />
|
<EnterOutlined />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import {
|
|||||||
onUnmounted,
|
onUnmounted,
|
||||||
onBeforeMount
|
onBeforeMount
|
||||||
} from "vue";
|
} from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { emitter } from "@/utils/mitt";
|
import { emitter } from "@/utils/mitt";
|
||||||
import LayPanel from "../lay-panel/index.vue";
|
import LayPanel from "../lay-panel/index.vue";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
@@ -25,6 +26,7 @@ import DayIcon from "@/assets/svg/day.svg?component";
|
|||||||
import DarkIcon from "@/assets/svg/dark.svg?component";
|
import DarkIcon from "@/assets/svg/dark.svg?component";
|
||||||
import SystemIcon from "@/assets/svg/system.svg?component";
|
import SystemIcon from "@/assets/svg/system.svg?component";
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const { device } = useNav();
|
const { device } = useNav();
|
||||||
const { isDark } = useDark();
|
const { isDark } = useDark();
|
||||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||||
@@ -145,13 +147,13 @@ function setFalse(Doms): any {
|
|||||||
const stretchTypeOptions = computed<Array<OptionsType>>(() => {
|
const stretchTypeOptions = computed<Array<OptionsType>>(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: "固定",
|
label: t("panel.pureStretchFixed"),
|
||||||
tip: "紧凑页面,轻松找到所需信息",
|
tip: t("panel.pureStretchFixedTip"),
|
||||||
value: "fixed"
|
value: "fixed"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "自定义",
|
label: t("panel.pureStretchCustom"),
|
||||||
tip: "最小1280、最大1600",
|
tip: t("panel.pureStretchCustomTip"),
|
||||||
value: "custom"
|
value: "custom"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -193,24 +195,24 @@ const pClass = computed(() => {
|
|||||||
const themeOptions = computed<Array<OptionsType>>(() => {
|
const themeOptions = computed<Array<OptionsType>>(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: "浅色",
|
label: t("panel.pureOverallStyleLight"),
|
||||||
icon: DayIcon,
|
icon: DayIcon,
|
||||||
theme: "light",
|
theme: "light",
|
||||||
tip: "清新启航,点亮舒适的工作界面",
|
tip: t("panel.pureOverallStyleLightTip"),
|
||||||
iconAttrs: { fill: isDark.value ? "#fff" : "#000" }
|
iconAttrs: { fill: isDark.value ? "#fff" : "#000" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "深色",
|
label: t("panel.pureOverallStyleDark"),
|
||||||
icon: DarkIcon,
|
icon: DarkIcon,
|
||||||
theme: "dark",
|
theme: "dark",
|
||||||
tip: "月光序曲,沉醉于夜的静谧雅致",
|
tip: t("panel.pureOverallStyleDarkTip"),
|
||||||
iconAttrs: { fill: isDark.value ? "#fff" : "#000" }
|
iconAttrs: { fill: isDark.value ? "#fff" : "#000" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "自动",
|
label: t("panel.pureOverallStyleSystem"),
|
||||||
icon: SystemIcon,
|
icon: SystemIcon,
|
||||||
theme: "system",
|
theme: "system",
|
||||||
tip: "同步时光,界面随晨昏自然呼应",
|
tip: t("panel.pureOverallStyleSystemTip"),
|
||||||
iconAttrs: { fill: isDark.value ? "#fff" : "#000" }
|
iconAttrs: { fill: isDark.value ? "#fff" : "#000" }
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -219,18 +221,18 @@ const themeOptions = computed<Array<OptionsType>>(() => {
|
|||||||
const markOptions = computed<Array<OptionsType>>(() => {
|
const markOptions = computed<Array<OptionsType>>(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: "灵动",
|
label: t("panel.pureTagsStyleSmart"),
|
||||||
tip: "灵动标签,添趣生辉",
|
tip: t("panel.pureTagsStyleSmartTip"),
|
||||||
value: "smart"
|
value: "smart"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "卡片",
|
label: t("panel.pureTagsStyleCard"),
|
||||||
tip: "卡片标签,高效浏览",
|
tip: t("panel.pureTagsStyleCardTip"),
|
||||||
value: "card"
|
value: "card"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "谷歌",
|
label: t("panel.pureTagsStyleChrome"),
|
||||||
tip: "谷歌风格,经典美观",
|
tip: t("panel.pureTagsStyleChromeTip"),
|
||||||
value: "chrome"
|
value: "chrome"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -315,7 +317,7 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
<template>
|
<template>
|
||||||
<LayPanel>
|
<LayPanel>
|
||||||
<div class="p-5">
|
<div class="p-5">
|
||||||
<p :class="pClass">整体风格</p>
|
<p :class="pClass">{{ t("panel.pureOverallStyle") }}</p>
|
||||||
<Segmented
|
<Segmented
|
||||||
resize
|
resize
|
||||||
class="select-none"
|
class="select-none"
|
||||||
@@ -333,7 +335,7 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<p :class="['mt-5!', pClass]">主题色</p>
|
<p :class="['mt-5!', pClass]">{{ t("panel.pureThemeColor") }}</p>
|
||||||
<ul class="theme-color">
|
<ul class="theme-color">
|
||||||
<li
|
<li
|
||||||
v-for="(item, index) in themeColors"
|
v-for="(item, index) in themeColors"
|
||||||
@@ -352,12 +354,12 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p :class="['mt-5!', pClass]">导航模式</p>
|
<p :class="['mt-5!', pClass]">{{ t("panel.pureLayoutModel") }}</p>
|
||||||
<ul class="pure-theme">
|
<ul class="pure-theme">
|
||||||
<li
|
<li
|
||||||
ref="verticalRef"
|
ref="verticalRef"
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
content: '左侧菜单,亲切熟悉',
|
content: t('panel.pureVerticalTip'),
|
||||||
zIndex: 41000
|
zIndex: 41000
|
||||||
}"
|
}"
|
||||||
:class="layoutTheme.layout === 'vertical' ? 'is-select' : ''"
|
:class="layoutTheme.layout === 'vertical' ? 'is-select' : ''"
|
||||||
@@ -370,7 +372,7 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
v-if="device !== 'mobile'"
|
v-if="device !== 'mobile'"
|
||||||
ref="horizontalRef"
|
ref="horizontalRef"
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
content: '顶部菜单,简洁概览',
|
content: t('panel.pureHorizontalTip'),
|
||||||
zIndex: 41000
|
zIndex: 41000
|
||||||
}"
|
}"
|
||||||
:class="layoutTheme.layout === 'horizontal' ? 'is-select' : ''"
|
:class="layoutTheme.layout === 'horizontal' ? 'is-select' : ''"
|
||||||
@@ -383,7 +385,7 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
v-if="device !== 'mobile'"
|
v-if="device !== 'mobile'"
|
||||||
ref="mixRef"
|
ref="mixRef"
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
content: '混合菜单,灵活多变',
|
content: t('panel.pureMixTip'),
|
||||||
zIndex: 41000
|
zIndex: 41000
|
||||||
}"
|
}"
|
||||||
:class="layoutTheme.layout === 'mix' ? 'is-select' : ''"
|
:class="layoutTheme.layout === 'mix' ? 'is-select' : ''"
|
||||||
@@ -395,7 +397,7 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<span v-if="useAppStoreHook().getViewportWidth > 1280">
|
<span v-if="useAppStoreHook().getViewportWidth > 1280">
|
||||||
<p :class="['mt-5!', pClass]">页宽</p>
|
<p :class="['mt-5!', pClass]">{{ t("panel.pureStretch") }}</p>
|
||||||
<Segmented
|
<Segmented
|
||||||
resize
|
resize
|
||||||
class="mb-2 select-none"
|
class="mb-2 select-none"
|
||||||
@@ -436,7 +438,7 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<p :class="['mt-4!', pClass]">页签风格</p>
|
<p :class="['mt-4!', pClass]">{{ t("panel.pureTagsStyle") }}</p>
|
||||||
<Segmented
|
<Segmented
|
||||||
resize
|
resize
|
||||||
class="select-none"
|
class="select-none"
|
||||||
@@ -445,45 +447,47 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
@change="onChange"
|
@change="onChange"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<p class="mt-5! font-medium text-sm dark:text-white">界面显示</p>
|
<p class="mt-5! font-medium text-sm dark:text-white">
|
||||||
|
{{ t("panel.pureInterfaceDisplay") }}
|
||||||
|
</p>
|
||||||
<ul class="setting">
|
<ul class="setting">
|
||||||
<li>
|
<li>
|
||||||
<span class="dark:text-white">灰色模式</span>
|
<span class="dark:text-white">{{ t("panel.pureGreyModel") }}</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="settings.greyVal"
|
v-model="settings.greyVal"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
active-text="开"
|
:active-text="t('buttons.pureOpenText')"
|
||||||
inactive-text="关"
|
:inactive-text="t('buttons.pureCloseText')"
|
||||||
@change="greyChange"
|
@change="greyChange"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="dark:text-white">色弱模式</span>
|
<span class="dark:text-white">{{ t("panel.pureWeakModel") }}</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="settings.weakVal"
|
v-model="settings.weakVal"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
active-text="开"
|
:active-text="t('buttons.pureOpenText')"
|
||||||
inactive-text="关"
|
:inactive-text="t('buttons.pureCloseText')"
|
||||||
@change="weekChange"
|
@change="weekChange"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="dark:text-white">隐藏标签页</span>
|
<span class="dark:text-white">{{ t("panel.pureHiddenTags") }}</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="settings.tabsVal"
|
v-model="settings.tabsVal"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
active-text="开"
|
:active-text="t('buttons.pureOpenText')"
|
||||||
inactive-text="关"
|
:inactive-text="t('buttons.pureCloseText')"
|
||||||
@change="tagsChange"
|
@change="tagsChange"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="dark:text-white">隐藏页脚</span>
|
<span class="dark:text-white">{{ t("panel.pureHiddenFooter") }}</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="settings.hideFooter"
|
v-model="settings.hideFooter"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
active-text="开"
|
:active-text="t('buttons.pureOpenText')"
|
||||||
inactive-text="关"
|
:inactive-text="t('buttons.pureCloseText')"
|
||||||
@change="hideFooterChange"
|
@change="hideFooterChange"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
@@ -494,18 +498,20 @@ onUnmounted(() => removeMatchMedia);
|
|||||||
inline-prompt
|
inline-prompt
|
||||||
:active-value="true"
|
:active-value="true"
|
||||||
:inactive-value="false"
|
:inactive-value="false"
|
||||||
active-text="开"
|
:active-text="t('buttons.pureOpenText')"
|
||||||
inactive-text="关"
|
:inactive-text="t('buttons.pureCloseText')"
|
||||||
@change="logoChange"
|
@change="logoChange"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="dark:text-white">页签持久化</span>
|
<span class="dark:text-white">
|
||||||
|
{{ t("panel.pureMultiTagsCache") }}
|
||||||
|
</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="settings.multiTagsCache"
|
v-model="settings.multiTagsCache"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
active-text="开"
|
:active-text="t('buttons.pureOpenText')"
|
||||||
inactive-text="关"
|
:inactive-text="t('buttons.pureCloseText')"
|
||||||
@change="multiTagsCacheChange"
|
@change="multiTagsCacheChange"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -6,12 +6,15 @@ import LayNotice from "../lay-notice/index.vue";
|
|||||||
import { responsiveStorageNameSpace } from "@/config";
|
import { responsiveStorageNameSpace } from "@/config";
|
||||||
import { ref, nextTick, computed, onMounted } from "vue";
|
import { ref, nextTick, computed, onMounted } from "vue";
|
||||||
import { storageLocal, isAllEmpty } from "@pureadmin/utils";
|
import { storageLocal, isAllEmpty } from "@pureadmin/utils";
|
||||||
|
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
import LaySidebarItem from "../lay-sidebar/components/SidebarItem.vue";
|
import LaySidebarItem from "../lay-sidebar/components/SidebarItem.vue";
|
||||||
import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
|
import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
|
||||||
|
|
||||||
|
import GlobalizationIcon from "@/assets/svg/globalization.svg?component";
|
||||||
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
||||||
import Setting from "~icons/ri/settings-3-line";
|
import Setting from "~icons/ri/settings-3-line";
|
||||||
|
import Check from "~icons/ep/check";
|
||||||
|
|
||||||
const menuRef = ref();
|
const menuRef = ref();
|
||||||
const showLogo = ref(
|
const showLogo = ref(
|
||||||
@@ -20,8 +23,9 @@ const showLogo = ref(
|
|||||||
)?.showLogo ?? true
|
)?.showLogo ?? true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const { t, route, locale, translationCh, translationEn } =
|
||||||
|
useTranslationLang(menuRef);
|
||||||
const {
|
const {
|
||||||
route,
|
|
||||||
title,
|
title,
|
||||||
logout,
|
logout,
|
||||||
onPanel,
|
onPanel,
|
||||||
@@ -29,7 +33,9 @@ const {
|
|||||||
username,
|
username,
|
||||||
userAvatar,
|
userAvatar,
|
||||||
backTopMenu,
|
backTopMenu,
|
||||||
avatarsStyle
|
avatarsStyle,
|
||||||
|
getDropdownItemStyle,
|
||||||
|
getDropdownItemClass
|
||||||
} = useNav();
|
} = useNav();
|
||||||
|
|
||||||
const defaultActive = computed(() =>
|
const defaultActive = computed(() =>
|
||||||
@@ -73,6 +79,36 @@ onMounted(() => {
|
|||||||
<div class="horizontal-header-right">
|
<div class="horizontal-header-right">
|
||||||
<!-- 菜单搜索 -->
|
<!-- 菜单搜索 -->
|
||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
|
<!-- 国际化 -->
|
||||||
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
|
<GlobalizationIcon
|
||||||
|
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||||
|
/>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu class="translation">
|
||||||
|
<el-dropdown-item
|
||||||
|
:style="getDropdownItemStyle(locale, 'zh')"
|
||||||
|
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
||||||
|
@click="translationCh"
|
||||||
|
>
|
||||||
|
<span v-show="locale === 'zh'" class="check-zh">
|
||||||
|
<IconifyIconOffline :icon="Check" />
|
||||||
|
</span>
|
||||||
|
简体中文
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
:style="getDropdownItemStyle(locale, 'en')"
|
||||||
|
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
||||||
|
@click="translationEn"
|
||||||
|
>
|
||||||
|
<span v-show="locale === 'en'" class="check-en">
|
||||||
|
<IconifyIconOffline :icon="Check" />
|
||||||
|
</span>
|
||||||
|
English
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
<!-- 全屏 -->
|
<!-- 全屏 -->
|
||||||
<LaySidebarFullScreen id="full-screen" />
|
<LaySidebarFullScreen id="full-screen" />
|
||||||
<!-- 消息通知 -->
|
<!-- 消息通知 -->
|
||||||
@@ -90,14 +126,14 @@ onMounted(() => {
|
|||||||
:icon="LogoutCircleRLine"
|
:icon="LogoutCircleRLine"
|
||||||
style="margin: 5px"
|
style="margin: 5px"
|
||||||
/>
|
/>
|
||||||
退出系统
|
{{ t("buttons.pureLoginOut") }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover"
|
class="set-icon navbar-bg-hover"
|
||||||
title="打开系统配置"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline :icon="Setting" />
|
<IconifyIconOffline :icon="Setting" />
|
||||||
@@ -111,6 +147,22 @@ onMounted(() => {
|
|||||||
opacity: 0.45;
|
opacity: 0.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.translation {
|
||||||
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
|
padding: 5px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-zh {
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-en {
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.logout {
|
.logout {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,28 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { isAllEmpty } from "@pureadmin/utils";
|
import { isAllEmpty } from "@pureadmin/utils";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import LaySearch from "../lay-search/index.vue";
|
import LaySearch from "../lay-search/index.vue";
|
||||||
import LayNotice from "../lay-notice/index.vue";
|
import LayNotice from "../lay-notice/index.vue";
|
||||||
import { ref, toRaw, watch, onMounted, nextTick } from "vue";
|
import { ref, toRaw, watch, onMounted, nextTick } from "vue";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
import { getParentPaths, findRouteByPath } from "@/router/utils";
|
import { getParentPaths, findRouteByPath } from "@/router/utils";
|
||||||
|
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
import LaySidebarExtraIcon from "../lay-sidebar/components/SidebarExtraIcon.vue";
|
import LaySidebarExtraIcon from "../lay-sidebar/components/SidebarExtraIcon.vue";
|
||||||
import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
|
import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
|
||||||
|
|
||||||
|
import GlobalizationIcon from "@/assets/svg/globalization.svg?component";
|
||||||
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
||||||
import Setting from "~icons/ri/settings-3-line";
|
import Setting from "~icons/ri/settings-3-line";
|
||||||
|
import Check from "~icons/ep/check";
|
||||||
|
|
||||||
const menuRef = ref();
|
const menuRef = ref();
|
||||||
const defaultActive = ref(null);
|
const defaultActive = ref(null);
|
||||||
|
|
||||||
|
const { t, route, locale, translationCh, translationEn } =
|
||||||
|
useTranslationLang(menuRef);
|
||||||
const {
|
const {
|
||||||
route,
|
|
||||||
device,
|
device,
|
||||||
logout,
|
logout,
|
||||||
onPanel,
|
onPanel,
|
||||||
@@ -25,7 +30,9 @@ const {
|
|||||||
username,
|
username,
|
||||||
userAvatar,
|
userAvatar,
|
||||||
getDivStyle,
|
getDivStyle,
|
||||||
avatarsStyle
|
avatarsStyle,
|
||||||
|
getDropdownItemStyle,
|
||||||
|
getDropdownItemClass
|
||||||
} = useNav();
|
} = useNav();
|
||||||
|
|
||||||
function getDefaultActive(routePath) {
|
function getDefaultActive(routePath) {
|
||||||
@@ -83,7 +90,7 @@ watch(
|
|||||||
</div>
|
</div>
|
||||||
<div :style="getDivStyle">
|
<div :style="getDivStyle">
|
||||||
<span class="select-none">
|
<span class="select-none">
|
||||||
{{ route.meta.title }}
|
{{ transformI18n(route.meta.title) }}
|
||||||
</span>
|
</span>
|
||||||
<LaySidebarExtraIcon :extraIcon="route.meta.extraIcon" />
|
<LaySidebarExtraIcon :extraIcon="route.meta.extraIcon" />
|
||||||
</div>
|
</div>
|
||||||
@@ -93,6 +100,36 @@ watch(
|
|||||||
<div class="horizontal-header-right">
|
<div class="horizontal-header-right">
|
||||||
<!-- 菜单搜索 -->
|
<!-- 菜单搜索 -->
|
||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
|
<!-- 国际化 -->
|
||||||
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
|
<GlobalizationIcon
|
||||||
|
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||||
|
/>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu class="translation">
|
||||||
|
<el-dropdown-item
|
||||||
|
:style="getDropdownItemStyle(locale, 'zh')"
|
||||||
|
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
||||||
|
@click="translationCh"
|
||||||
|
>
|
||||||
|
<span v-show="locale === 'zh'" class="check-zh">
|
||||||
|
<IconifyIconOffline :icon="Check" />
|
||||||
|
</span>
|
||||||
|
简体中文
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
:style="getDropdownItemStyle(locale, 'en')"
|
||||||
|
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
||||||
|
@click="translationEn"
|
||||||
|
>
|
||||||
|
<span v-show="locale === 'en'" class="check-en">
|
||||||
|
<IconifyIconOffline :icon="Check" />
|
||||||
|
</span>
|
||||||
|
English
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
<!-- 全屏 -->
|
<!-- 全屏 -->
|
||||||
<LaySidebarFullScreen id="full-screen" />
|
<LaySidebarFullScreen id="full-screen" />
|
||||||
<!-- 消息通知 -->
|
<!-- 消息通知 -->
|
||||||
@@ -110,14 +147,14 @@ watch(
|
|||||||
:icon="LogoutCircleRLine"
|
:icon="LogoutCircleRLine"
|
||||||
style="margin: 5px"
|
style="margin: 5px"
|
||||||
/>
|
/>
|
||||||
退出系统
|
{{ t("buttons.pureLoginOut") }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover"
|
class="set-icon navbar-bg-hover"
|
||||||
title="打开系统配置"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline :icon="Setting" />
|
<IconifyIconOffline :icon="Setting" />
|
||||||
@@ -131,6 +168,22 @@ watch(
|
|||||||
opacity: 0.45;
|
opacity: 0.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.translation {
|
||||||
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
|
padding: 5px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-zh {
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-en {
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.logout {
|
.logout {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { isEqual } from "@pureadmin/utils";
|
import { isEqual } from "@pureadmin/utils";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { ref, watch, onMounted, toRaw } from "vue";
|
import { ref, watch, onMounted, toRaw } from "vue";
|
||||||
import { getParentPaths, findRouteByPath } from "@/router/utils";
|
import { getParentPaths, findRouteByPath } from "@/router/utils";
|
||||||
@@ -112,7 +113,7 @@ watch(
|
|||||||
class="inline! items-stretch!"
|
class="inline! items-stretch!"
|
||||||
>
|
>
|
||||||
<a @click.prevent="handleLink(item)">
|
<a @click.prevent="handleLink(item)">
|
||||||
{{ item.meta.title }}
|
{{ transformI18n(item.meta.title) }}
|
||||||
</a>
|
</a>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { useGlobal } from "@pureadmin/utils";
|
import { useGlobal } from "@pureadmin/utils";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ withDefaults(defineProps<Props>(), {
|
|||||||
isActive: false
|
isActive: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const { tooltipEffect } = useNav();
|
const { tooltipEffect } = useNav();
|
||||||
|
|
||||||
const iconClass = computed(() => {
|
const iconClass = computed(() => {
|
||||||
@@ -34,7 +36,9 @@ const toggleClick = () => {
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
content: isActive ? '点击折叠' : '点击展开',
|
content: isActive
|
||||||
|
? t('buttons.pureClickCollapse')
|
||||||
|
: t('buttons.pureClickExpand'),
|
||||||
theme: tooltipEffect,
|
theme: tooltipEffect,
|
||||||
hideOnClick: 'toggle',
|
hideOnClick: 'toggle',
|
||||||
placement: 'right'
|
placement: 'right'
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { posix } from "path-browserify";
|
|||||||
import { menuType } from "@/layout/types";
|
import { menuType } from "@/layout/types";
|
||||||
import { ReText } from "@/components/ReText";
|
import { ReText } from "@/components/ReText";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import SidebarLinkItem from "./SidebarLinkItem.vue";
|
import SidebarLinkItem from "./SidebarLinkItem.vue";
|
||||||
import SidebarExtraIcon from "./SidebarExtraIcon.vue";
|
import SidebarExtraIcon from "./SidebarExtraIcon.vue";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
@@ -160,7 +161,7 @@ function resolvePath(routePath) {
|
|||||||
truncated
|
truncated
|
||||||
class="w-full! px-3! min-w-[54px]! text-center! text-inherit!"
|
class="w-full! px-3! min-w-[54px]! text-center! text-inherit!"
|
||||||
>
|
>
|
||||||
{{ onlyOneChild.meta.title }}
|
{{ transformI18n(onlyOneChild.meta.title) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
|
|
||||||
<template #title>
|
<template #title>
|
||||||
@@ -172,7 +173,7 @@ function resolvePath(routePath) {
|
|||||||
}"
|
}"
|
||||||
class="w-full! text-inherit!"
|
class="w-full! text-inherit!"
|
||||||
>
|
>
|
||||||
{{ onlyOneChild.meta.title }}
|
{{ transformI18n(onlyOneChild.meta.title) }}
|
||||||
</ReText>
|
</ReText>
|
||||||
<SidebarExtraIcon :extraIcon="onlyOneChild.meta.extraIcon" />
|
<SidebarExtraIcon :extraIcon="onlyOneChild.meta.extraIcon" />
|
||||||
</div>
|
</div>
|
||||||
@@ -211,7 +212,7 @@ function resolvePath(routePath) {
|
|||||||
}"
|
}"
|
||||||
:class="textClass"
|
:class="textClass"
|
||||||
>
|
>
|
||||||
{{ item.meta.title }}
|
{{ transformI18n(item.meta.title) }}
|
||||||
</ReText>
|
</ReText>
|
||||||
<SidebarExtraIcon v-if="!isCollapse" :extraIcon="item.meta.extraIcon" />
|
<SidebarExtraIcon v-if="!isCollapse" :extraIcon="item.meta.extraIcon" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { useGlobal } from "@pureadmin/utils";
|
import { useGlobal } from "@pureadmin/utils";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ withDefaults(defineProps<Props>(), {
|
|||||||
isActive: false
|
isActive: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const { tooltipEffect } = useNav();
|
const { tooltipEffect } = useNav();
|
||||||
|
|
||||||
const iconClass = computed(() => {
|
const iconClass = computed(() => {
|
||||||
@@ -44,7 +46,9 @@ const toggleClick = () => {
|
|||||||
<div class="left-collapse">
|
<div class="left-collapse">
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
content: isActive ? '点击折叠' : '点击展开',
|
content: isActive
|
||||||
|
? t('buttons.pureClickCollapse')
|
||||||
|
: t('buttons.pureClickExpand'),
|
||||||
theme: tooltipEffect,
|
theme: tooltipEffect,
|
||||||
hideOnClick: 'toggle',
|
hideOnClick: 'toggle',
|
||||||
placement: 'right'
|
placement: 'right'
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import MenuFold from "~icons/ri/menu-fold-fill";
|
import MenuFold from "~icons/ri/menu-fold-fill";
|
||||||
import MenuUnfold from "~icons/ri/menu-unfold-fill";
|
import MenuUnfold from "~icons/ri/menu-unfold-fill";
|
||||||
|
|
||||||
@@ -10,6 +11,8 @@ withDefaults(defineProps<Props>(), {
|
|||||||
isActive: false
|
isActive: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: "toggleClick"): void;
|
(e: "toggleClick"): void;
|
||||||
}>();
|
}>();
|
||||||
@@ -22,7 +25,9 @@ const toggleClick = () => {
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="px-3 mr-1 navbar-bg-hover"
|
class="px-3 mr-1 navbar-bg-hover"
|
||||||
:title="isActive ? '点击折叠' : '点击展开'"
|
:title="
|
||||||
|
isActive ? t('buttons.pureClickCollapse') : t('buttons.pureClickExpand')
|
||||||
|
"
|
||||||
@click="toggleClick"
|
@click="toggleClick"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { $t } from "@/plugins/i18n";
|
||||||
import { emitter } from "@/utils/mitt";
|
import { emitter } from "@/utils/mitt";
|
||||||
import NProgress from "@/utils/progress";
|
import NProgress from "@/utils/progress";
|
||||||
import { RouteConfigs } from "../../types";
|
import { RouteConfigs } from "../../types";
|
||||||
@@ -51,6 +52,7 @@ const {
|
|||||||
onMounted,
|
onMounted,
|
||||||
onMouseenter,
|
onMouseenter,
|
||||||
onMouseleave,
|
onMouseleave,
|
||||||
|
transformI18n,
|
||||||
onContentFullScreen
|
onContentFullScreen
|
||||||
} = useTags();
|
} = useTags();
|
||||||
|
|
||||||
@@ -345,10 +347,10 @@ function onClickDrop(key, item, selectRoute?: RouteConfigs) {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (pureSetting.hiddenSideBar) {
|
if (pureSetting.hiddenSideBar) {
|
||||||
tagsViews[6].icon = ExitFullscreen;
|
tagsViews[6].icon = ExitFullscreen;
|
||||||
tagsViews[6].text = "内容区退出全屏";
|
tagsViews[6].text = $t("buttons.pureContentExitFullScreen");
|
||||||
} else {
|
} else {
|
||||||
tagsViews[6].icon = Fullscreen;
|
tagsViews[6].icon = Fullscreen;
|
||||||
tagsViews[6].text = "内容区全屏";
|
tagsViews[6].text = $t("buttons.pureContentFullScreen");
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
break;
|
break;
|
||||||
@@ -595,7 +597,7 @@ onBeforeUnmount(() => {
|
|||||||
<span
|
<span
|
||||||
class="tag-title dark:text-text_color_primary! dark:hover:text-primary!"
|
class="tag-title dark:text-text_color_primary! dark:hover:text-primary!"
|
||||||
>
|
>
|
||||||
{{ item.meta.title }}
|
{{ transformI18n(item.meta.title) }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
@@ -620,7 +622,7 @@ onBeforeUnmount(() => {
|
|||||||
<TagChrome />
|
<TagChrome />
|
||||||
</div>
|
</div>
|
||||||
<span class="tag-title">
|
<span class="tag-title">
|
||||||
{{ item.meta.title }}
|
{{ transformI18n(item.meta.title) }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="isFixedTag(item) ? false : index !== 0"
|
v-if="isFixedTag(item) ? false : index !== 0"
|
||||||
@@ -653,7 +655,7 @@ onBeforeUnmount(() => {
|
|||||||
>
|
>
|
||||||
<li v-if="item.show" @click="selectTag(key, item)">
|
<li v-if="item.show" @click="selectTag(key, item)">
|
||||||
<IconifyIconOffline :icon="item.icon" />
|
<IconifyIconOffline :icon="item.icon" />
|
||||||
{{ item.text }}
|
{{ transformI18n(item.text) }}
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -677,7 +679,7 @@ onBeforeUnmount(() => {
|
|||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline :icon="item.icon" />
|
<IconifyIconOffline :icon="item.icon" />
|
||||||
{{ item.text }}
|
{{ transformI18n(item.text) }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { ref, unref, watch, onMounted, nextTick } from "vue";
|
import { ref, unref, watch, onMounted, nextTick } from "vue";
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ const props = defineProps<{
|
|||||||
};
|
};
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const currentRoute = useRoute();
|
const currentRoute = useRoute();
|
||||||
const frameSrc = ref<string>("");
|
const frameSrc = ref<string>("");
|
||||||
@@ -85,7 +87,11 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" class="frame" element-loading-text="加载中...">
|
<div
|
||||||
|
v-loading="loading"
|
||||||
|
class="frame"
|
||||||
|
:element-loading-text="t('status.pureLoad')"
|
||||||
|
>
|
||||||
<iframe ref="frameRef" :src="frameSrc" class="frame-iframe" />
|
<iframe ref="frameRef" :src="frameSrc" class="frame-iframe" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { routerArrays } from "../types";
|
import { routerArrays } from "../types";
|
||||||
import { useGlobal } from "@pureadmin/utils";
|
import { useGlobal } from "@pureadmin/utils";
|
||||||
import { useMultiTagsStore } from "@/store/modules/multiTags";
|
import { useMultiTagsStore } from "@/store/modules/multiTags";
|
||||||
@@ -14,6 +15,11 @@ export function useLayout() {
|
|||||||
) {
|
) {
|
||||||
$storage.tags = routerArrays;
|
$storage.tags = routerArrays;
|
||||||
}
|
}
|
||||||
|
/** 国际化 */
|
||||||
|
if (!$storage.locale) {
|
||||||
|
$storage.locale = { locale: $config?.Locale ?? "zh" };
|
||||||
|
useI18n().locale.value = $config?.Locale ?? "zh";
|
||||||
|
}
|
||||||
/** 导航 */
|
/** 导航 */
|
||||||
if (!$storage.layout) {
|
if (!$storage.layout) {
|
||||||
$storage.layout = {
|
$storage.layout = {
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { getConfig } from "@/config";
|
import { getConfig } from "@/config";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
import { emitter } from "@/utils/mitt";
|
import { emitter } from "@/utils/mitt";
|
||||||
import Avatar from "@/assets/user.jpg";
|
import Avatar from "@/assets/user.jpg";
|
||||||
import { getTopMenu } from "@/router/utils";
|
import { getTopMenu } from "@/router/utils";
|
||||||
import { useFullscreen } from "@vueuse/core";
|
import { useFullscreen } from "@vueuse/core";
|
||||||
import type { routeMetaType } from "../types";
|
import type { routeMetaType } from "../types";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { router, remainingPaths } from "@/router";
|
import { router, remainingPaths } from "@/router";
|
||||||
import { computed, type CSSProperties } from "vue";
|
import { computed, type CSSProperties } from "vue";
|
||||||
import { useAppStoreHook } from "@/store/modules/app";
|
import { useAppStoreHook } from "@/store/modules/app";
|
||||||
import { useUserStoreHook } from "@/store/modules/user";
|
import { useUserStoreHook } from "@/store/modules/user";
|
||||||
import { useGlobal, isAllEmpty } from "@pureadmin/utils";
|
import { useGlobal, isAllEmpty } from "@pureadmin/utils";
|
||||||
|
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
||||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||||
@@ -19,7 +21,6 @@ const errorInfo =
|
|||||||
"The current routing configuration is incorrect, please check the configuration";
|
"The current routing configuration is incorrect, please check the configuration";
|
||||||
|
|
||||||
export function useNav() {
|
export function useNav() {
|
||||||
const route = useRoute();
|
|
||||||
const pureApp = useAppStoreHook();
|
const pureApp = useAppStoreHook();
|
||||||
const routers = useRouter().options.routes;
|
const routers = useRouter().options.routes;
|
||||||
const { isFullscreen, toggle } = useFullscreen();
|
const { isFullscreen, toggle } = useFullscreen();
|
||||||
@@ -51,6 +52,22 @@ export function useNav() {
|
|||||||
: useUserStoreHook()?.nickname;
|
: useUserStoreHook()?.nickname;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** 设置国际化选中后的样式 */
|
||||||
|
const getDropdownItemStyle = computed(() => {
|
||||||
|
return (locale, t) => {
|
||||||
|
return {
|
||||||
|
background: locale === t ? useEpThemeStoreHook().epThemeColor : "",
|
||||||
|
color: locale === t ? "#f4f4f5" : "#000"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
const getDropdownItemClass = computed(() => {
|
||||||
|
return (locale, t) => {
|
||||||
|
return locale === t ? "" : "dark:hover:text-primary!";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
const avatarsStyle = computed(() => {
|
const avatarsStyle = computed(() => {
|
||||||
return username.value ? { marginRight: "10px" } : "";
|
return username.value ? { marginRight: "10px" } : "";
|
||||||
});
|
});
|
||||||
@@ -75,8 +92,8 @@ export function useNav() {
|
|||||||
/** 动态title */
|
/** 动态title */
|
||||||
function changeTitle(meta: routeMetaType) {
|
function changeTitle(meta: routeMetaType) {
|
||||||
const Title = getConfig().Title;
|
const Title = getConfig().Title;
|
||||||
if (Title) document.title = `${meta.title} | ${Title}`;
|
if (Title) document.title = `${transformI18n(meta.title)} | ${Title}`;
|
||||||
else document.title = meta.title;
|
else document.title = transformI18n(meta.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 退出登录 */
|
/** 退出登录 */
|
||||||
@@ -127,7 +144,6 @@ export function useNav() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
route,
|
|
||||||
title,
|
title,
|
||||||
device,
|
device,
|
||||||
layout,
|
layout,
|
||||||
@@ -152,6 +168,8 @@ export function useNav() {
|
|||||||
username,
|
username,
|
||||||
userAvatar,
|
userAvatar,
|
||||||
avatarsStyle,
|
avatarsStyle,
|
||||||
tooltipEffect
|
tooltipEffect,
|
||||||
|
getDropdownItemStyle,
|
||||||
|
getDropdownItemClass
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import {
|
|||||||
} from "vue";
|
} from "vue";
|
||||||
import type { tagsViewsType } from "../types";
|
import type { tagsViewsType } from "../types";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
import { transformI18n, $t } from "@/plugins/i18n";
|
||||||
import { responsiveStorageNameSpace } from "@/config";
|
import { responsiveStorageNameSpace } from "@/config";
|
||||||
import { useSettingStoreHook } from "@/store/modules/settings";
|
import { useSettingStoreHook } from "@/store/modules/settings";
|
||||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||||
@@ -63,49 +64,49 @@ export function useTags() {
|
|||||||
const tagsViews = reactive<Array<tagsViewsType>>([
|
const tagsViews = reactive<Array<tagsViewsType>>([
|
||||||
{
|
{
|
||||||
icon: RefreshRight,
|
icon: RefreshRight,
|
||||||
text: "重新加载",
|
text: $t("buttons.pureReload"),
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: Close,
|
icon: Close,
|
||||||
text: "关闭当前标签页",
|
text: $t("buttons.pureCloseCurrentTab"),
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: multiTags.value.length > 1 ? false : true,
|
disabled: multiTags.value.length > 1 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: CloseLeftTags,
|
icon: CloseLeftTags,
|
||||||
text: "关闭左侧标签页",
|
text: $t("buttons.pureCloseLeftTabs"),
|
||||||
divided: true,
|
divided: true,
|
||||||
disabled: multiTags.value.length > 1 ? false : true,
|
disabled: multiTags.value.length > 1 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: CloseRightTags,
|
icon: CloseRightTags,
|
||||||
text: "关闭右侧标签页",
|
text: $t("buttons.pureCloseRightTabs"),
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: multiTags.value.length > 1 ? false : true,
|
disabled: multiTags.value.length > 1 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: CloseOtherTags,
|
icon: CloseOtherTags,
|
||||||
text: "关闭其他标签页",
|
text: $t("buttons.pureCloseOtherTabs"),
|
||||||
divided: true,
|
divided: true,
|
||||||
disabled: multiTags.value.length > 2 ? false : true,
|
disabled: multiTags.value.length > 2 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: CloseAllTags,
|
icon: CloseAllTags,
|
||||||
text: "关闭全部标签页",
|
text: $t("buttons.pureCloseAllTabs"),
|
||||||
divided: false,
|
divided: false,
|
||||||
disabled: multiTags.value.length > 1 ? false : true,
|
disabled: multiTags.value.length > 1 ? false : true,
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: Fullscreen,
|
icon: Fullscreen,
|
||||||
text: "内容区全屏",
|
text: $t("buttons.pureContentFullScreen"),
|
||||||
divided: true,
|
divided: true,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
show: true
|
show: true
|
||||||
@@ -243,10 +244,12 @@ export function useTags() {
|
|||||||
currentSelect,
|
currentSelect,
|
||||||
scheduleIsActive,
|
scheduleIsActive,
|
||||||
getContextMenuStyle,
|
getContextMenuStyle,
|
||||||
|
$t,
|
||||||
closeMenu,
|
closeMenu,
|
||||||
onMounted,
|
onMounted,
|
||||||
onMouseenter,
|
onMouseenter,
|
||||||
onMouseleave,
|
onMouseleave,
|
||||||
|
transformI18n,
|
||||||
onContentFullScreen
|
onContentFullScreen
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
41
src/layout/hooks/useTranslationLang.ts
Normal file
41
src/layout/hooks/useTranslationLang.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import { useNav } from "./useNav";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { watch, onBeforeMount, type Ref } from "vue";
|
||||||
|
|
||||||
|
export function useTranslationLang(ref?: Ref) {
|
||||||
|
const { $storage, changeTitle, handleResize } = useNav();
|
||||||
|
const { locale, t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
|
function translationCh() {
|
||||||
|
$storage.locale = { locale: "zh" };
|
||||||
|
locale.value = "zh";
|
||||||
|
ref && handleResize(ref.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function translationEn() {
|
||||||
|
$storage.locale = { locale: "en" };
|
||||||
|
locale.value = "en";
|
||||||
|
ref && handleResize(ref.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => locale.value,
|
||||||
|
() => {
|
||||||
|
changeTitle(route.meta);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
locale.value = $storage.locale?.locale ?? "zh";
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
t,
|
||||||
|
route,
|
||||||
|
locale,
|
||||||
|
translationCh,
|
||||||
|
translationEn
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ import "animate.css";
|
|||||||
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
||||||
import "@/components/ReIcon/src/offlineIcon";
|
import "@/components/ReIcon/src/offlineIcon";
|
||||||
import { setType } from "./types";
|
import { setType } from "./types";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { useLayout } from "./hooks/useLayout";
|
import { useLayout } from "./hooks/useLayout";
|
||||||
import { useAppStoreHook } from "@/store/modules/app";
|
import { useAppStoreHook } from "@/store/modules/app";
|
||||||
import { useSettingStoreHook } from "@/store/modules/settings";
|
import { useSettingStoreHook } from "@/store/modules/settings";
|
||||||
@@ -31,6 +32,7 @@ import NavVertical from "./components/lay-sidebar/NavVertical.vue";
|
|||||||
import NavHorizontal from "./components/lay-sidebar/NavHorizontal.vue";
|
import NavHorizontal from "./components/lay-sidebar/NavHorizontal.vue";
|
||||||
import BackTopIcon from "@/assets/svg/back_top.svg?component";
|
import BackTopIcon from "@/assets/svg/back_top.svg?component";
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const appWrapperRef = ref();
|
const appWrapperRef = ref();
|
||||||
const { isDark } = useDark();
|
const { isDark } = useDark();
|
||||||
const { layout } = useLayout();
|
const { layout } = useLayout();
|
||||||
@@ -186,7 +188,7 @@ const LayHeader = defineComponent({
|
|||||||
</div>
|
</div>
|
||||||
<el-scrollbar v-else>
|
<el-scrollbar v-else>
|
||||||
<el-backtop
|
<el-backtop
|
||||||
title="回到顶部"
|
:title="t('buttons.pureBackTop')"
|
||||||
target=".main-container .el-scrollbar__wrap"
|
target=".main-container .el-scrollbar__wrap"
|
||||||
>
|
>
|
||||||
<BackTopIcon />
|
<BackTopIcon />
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export const routerArrays: Array<RouteConfigs> =
|
|||||||
path: "/welcome",
|
path: "/welcome",
|
||||||
name: "Welcome",
|
name: "Welcome",
|
||||||
meta: {
|
meta: {
|
||||||
title: "首页",
|
title: "menus.pureHome",
|
||||||
icon: "ep/home-filled"
|
icon: "ep/home-filled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import router from "./router";
|
import router from "./router";
|
||||||
import { setupStore } from "@/store";
|
import { setupStore } from "@/store";
|
||||||
|
import { useI18n } from "@/plugins/i18n";
|
||||||
import { getPlatformConfig } from "./config";
|
import { getPlatformConfig } from "./config";
|
||||||
import { MotionPlugin } from "@vueuse/motion";
|
import { MotionPlugin } from "@vueuse/motion";
|
||||||
// import { useEcharts } from "@/plugins/echarts";
|
// import { useEcharts } from "@/plugins/echarts";
|
||||||
@@ -57,7 +58,7 @@ getPlatformConfig(app).then(async config => {
|
|||||||
app.use(router);
|
app.use(router);
|
||||||
await router.isReady();
|
await router.isReady();
|
||||||
injectResponsiveStorage(app, config);
|
injectResponsiveStorage(app, config);
|
||||||
app.use(MotionPlugin).use(useElementPlus).use(Table);
|
app.use(MotionPlugin).use(useI18n).use(useElementPlus).use(Table);
|
||||||
// .use(PureDescriptions)
|
// .use(PureDescriptions)
|
||||||
// .use(useEcharts);
|
// .use(useEcharts);
|
||||||
app.mount("#app");
|
app.mount("#app");
|
||||||
|
|||||||
116
src/plugins/i18n.ts
Normal file
116
src/plugins/i18n.ts
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
// 多组件库的国际化和本地项目国际化兼容
|
||||||
|
import { type I18n, createI18n } from "vue-i18n";
|
||||||
|
import type { App, WritableComputedRef } from "vue";
|
||||||
|
import { responsiveStorageNameSpace } from "@/config";
|
||||||
|
import { storageLocal, isObject } from "@pureadmin/utils";
|
||||||
|
|
||||||
|
// element-plus国际化
|
||||||
|
import enLocale from "element-plus/es/locale/lang/en";
|
||||||
|
import zhLocale from "element-plus/es/locale/lang/zh-cn";
|
||||||
|
|
||||||
|
const siphonI18n = (function () {
|
||||||
|
// 仅初始化一次国际化配置
|
||||||
|
const cache = Object.fromEntries(
|
||||||
|
Object.entries(
|
||||||
|
import.meta.glob("../../locales/*.y(a)?ml", { eager: true })
|
||||||
|
).map(([key, value]: any) => {
|
||||||
|
const matched = key.match(/([A-Za-z0-9-_]+)\./i)[1];
|
||||||
|
return [matched, value.default];
|
||||||
|
})
|
||||||
|
);
|
||||||
|
return (prefix = "zh-CN") => {
|
||||||
|
return cache[prefix];
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
export const localesConfigs = {
|
||||||
|
zh: {
|
||||||
|
...siphonI18n("zh-CN"),
|
||||||
|
...zhLocale
|
||||||
|
},
|
||||||
|
en: {
|
||||||
|
...siphonI18n("en"),
|
||||||
|
...enLocale
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 获取对象中所有嵌套对象的key键,并将它们用点号分割组成字符串 */
|
||||||
|
function getObjectKeys(obj) {
|
||||||
|
const stack = [];
|
||||||
|
const keys: Set<string> = new Set();
|
||||||
|
|
||||||
|
stack.push({ obj, key: "" });
|
||||||
|
|
||||||
|
while (stack.length > 0) {
|
||||||
|
const { obj, key } = stack.pop();
|
||||||
|
|
||||||
|
for (const k in obj) {
|
||||||
|
const newKey = key ? `${key}.${k}` : k;
|
||||||
|
|
||||||
|
if (obj[k] && isObject(obj[k])) {
|
||||||
|
stack.push({ obj: obj[k], key: newKey });
|
||||||
|
} else {
|
||||||
|
keys.add(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return keys;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 将展开的key缓存 */
|
||||||
|
const keysCache: Map<string, Set<string>> = new Map();
|
||||||
|
const flatI18n = (prefix = "zh-CN") => {
|
||||||
|
let cache = keysCache.get(prefix);
|
||||||
|
if (!cache) {
|
||||||
|
cache = getObjectKeys(siphonI18n(prefix));
|
||||||
|
keysCache.set(prefix, cache);
|
||||||
|
}
|
||||||
|
return cache;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际化转换工具函数(自动读取根目录locales文件夹下文件进行国际化匹配)
|
||||||
|
* @param message message
|
||||||
|
* @returns 转化后的message
|
||||||
|
*/
|
||||||
|
export function transformI18n(message: any = "") {
|
||||||
|
if (!message) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理存储动态路由的title,格式 {zh:"",en:""}
|
||||||
|
if (typeof message === "object") {
|
||||||
|
const locale: string | WritableComputedRef<string> | any =
|
||||||
|
i18n.global.locale;
|
||||||
|
return message[locale?.value];
|
||||||
|
}
|
||||||
|
|
||||||
|
const key = message.match(/(\S*)\./)?.input;
|
||||||
|
|
||||||
|
if (key && flatI18n("zh-CN").has(key)) {
|
||||||
|
return i18n.global.t.call(i18n.global.locale, message);
|
||||||
|
} else if (!key && Object.hasOwn(siphonI18n("zh-CN"), message)) {
|
||||||
|
// 兼容非嵌套形式的国际化写法
|
||||||
|
return i18n.global.t.call(i18n.global.locale, message);
|
||||||
|
} else {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此函数只是配合i18n Ally插件来进行国际化智能提示,并无实际意义(只对提示起作用),如果不需要国际化可删除 */
|
||||||
|
export const $t = (key: string) => key;
|
||||||
|
|
||||||
|
export const i18n: I18n = createI18n({
|
||||||
|
legacy: false,
|
||||||
|
locale:
|
||||||
|
storageLocal().getItem<StorageConfigs>(
|
||||||
|
`${responsiveStorageNameSpace()}locale`
|
||||||
|
)?.locale ?? "zh",
|
||||||
|
fallbackLocale: "en",
|
||||||
|
messages: localesConfigs
|
||||||
|
});
|
||||||
|
|
||||||
|
export function useI18n(app: App) {
|
||||||
|
app.use(i18n);
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { getConfig } from "@/config";
|
import { getConfig } from "@/config";
|
||||||
import NProgress from "@/utils/progress";
|
import NProgress from "@/utils/progress";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { buildHierarchyTree } from "@/utils/tree";
|
import { buildHierarchyTree } from "@/utils/tree";
|
||||||
import remainingRouter from "./modules/remaining";
|
import remainingRouter from "./modules/remaining";
|
||||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||||
@@ -139,8 +140,9 @@ router.beforeEach((to: ToRouteType, _from, next) => {
|
|||||||
to.matched.some(item => {
|
to.matched.some(item => {
|
||||||
if (!item.meta.title) return "";
|
if (!item.meta.title) return "";
|
||||||
const Title = getConfig().Title;
|
const Title = getConfig().Title;
|
||||||
if (Title) document.title = `${item.meta.title} | ${Title}`;
|
if (Title)
|
||||||
else document.title = item.meta.title as string;
|
document.title = `${transformI18n(item.meta.title)} | ${Title}`;
|
||||||
|
else document.title = transformI18n(item.meta.title);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 如果已经登录并存在登录信息后不能跳转到路由白名单,而是继续保持在当前页面 */
|
/** 如果已经登录并存在登录信息后不能跳转到路由白名单,而是继续保持在当前页面 */
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
|
import { $t } from "@/plugins/i18n";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: "/error",
|
path: "/error",
|
||||||
redirect: "/error/403",
|
redirect: "/error/403",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "ri/information-line",
|
icon: "ri/information-line",
|
||||||
// showLink: false,
|
// showLink: false,
|
||||||
title: "异常页面",
|
title: $t("menus.pureAbnormal"),
|
||||||
rank: 9
|
rank: 9
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
@@ -13,7 +15,7 @@ export default {
|
|||||||
name: "403",
|
name: "403",
|
||||||
component: () => import("@/views/error/403.vue"),
|
component: () => import("@/views/error/403.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "403"
|
title: $t("menus.pureAccessDenied")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -21,7 +23,7 @@ export default {
|
|||||||
name: "404",
|
name: "404",
|
||||||
component: () => import("@/views/error/404.vue"),
|
component: () => import("@/views/error/404.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "404"
|
title: $t("menus.purePageNotFound")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -29,7 +31,7 @@ export default {
|
|||||||
name: "500",
|
name: "500",
|
||||||
component: () => import("@/views/error/500.vue"),
|
component: () => import("@/views/error/500.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "500"
|
title: $t("menus.pureServerError")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { $t } from "@/plugins/i18n";
|
||||||
const { VITE_HIDE_HOME } = import.meta.env;
|
const { VITE_HIDE_HOME } = import.meta.env;
|
||||||
const Layout = () => import("@/layout/index.vue");
|
const Layout = () => import("@/layout/index.vue");
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ export default {
|
|||||||
redirect: "/welcome",
|
redirect: "/welcome",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "ep/home-filled",
|
icon: "ep/home-filled",
|
||||||
title: "首页",
|
title: $t("menus.pureHome"),
|
||||||
rank: 0
|
rank: 0
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
@@ -17,7 +18,7 @@ export default {
|
|||||||
name: "Welcome",
|
name: "Welcome",
|
||||||
component: () => import("@/views/welcome/index.vue"),
|
component: () => import("@/views/welcome/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "首页",
|
title: $t("menus.pureHome"),
|
||||||
showLink: VITE_HIDE_HOME === "true" ? false : true
|
showLink: VITE_HIDE_HOME === "true" ? false : true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { $t } from "@/plugins/i18n";
|
||||||
const Layout = () => import("@/layout/index.vue");
|
const Layout = () => import("@/layout/index.vue");
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
@@ -6,7 +7,7 @@ export default [
|
|||||||
name: "Login",
|
name: "Login",
|
||||||
component: () => import("@/views/login/index.vue"),
|
component: () => import("@/views/login/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "登录",
|
title: $t("menus.pureLogin"),
|
||||||
showLink: false
|
showLink: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -16,7 +17,7 @@ export default [
|
|||||||
name: "AccessDenied",
|
name: "AccessDenied",
|
||||||
component: () => import("@/views/error/403.vue"),
|
component: () => import("@/views/error/403.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "403",
|
title: $t("menus.pureAccessDenied"),
|
||||||
showLink: false
|
showLink: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -26,7 +27,7 @@ export default [
|
|||||||
name: "ServerError",
|
name: "ServerError",
|
||||||
component: () => import("@/views/error/500.vue"),
|
component: () => import("@/views/error/500.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "500",
|
title: $t("menus.pureServerError"),
|
||||||
showLink: false
|
showLink: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -34,7 +35,7 @@ export default [
|
|||||||
path: "/redirect",
|
path: "/redirect",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
meta: {
|
meta: {
|
||||||
title: "加载中...",
|
title: $t("status.pureLoad"),
|
||||||
showLink: false
|
showLink: false
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ function addPathMatch() {
|
|||||||
name: "PageNotFound",
|
name: "PageNotFound",
|
||||||
component: () => import("@/views/error/404.vue"),
|
component: () => import("@/views/error/404.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "404",
|
title: "menus.purePageNotFound",
|
||||||
showLink: false
|
showLink: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -448,6 +448,8 @@
|
|||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
.search-container,
|
.search-container,
|
||||||
|
/* 国际化 */
|
||||||
|
.globalization,
|
||||||
/* 全屏 */
|
/* 全屏 */
|
||||||
.fullscreen-icon,
|
.fullscreen-icon,
|
||||||
/* 消息通知 */
|
/* 消息通知 */
|
||||||
@@ -466,6 +468,15 @@
|
|||||||
color: var(--pure-theme-sub-menu-active-text);
|
color: var(--pure-theme-sub-menu-active-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.globalization {
|
||||||
|
width: 40px;
|
||||||
|
height: 48px;
|
||||||
|
padding: 11px;
|
||||||
|
color: var(--pure-theme-sub-menu-active-text);
|
||||||
|
cursor: pointer;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
.el-dropdown-link {
|
.el-dropdown-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -618,6 +629,8 @@ body[layout="vertical"] {
|
|||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
.search-container,
|
.search-container,
|
||||||
|
/* 国际化 */
|
||||||
|
.globalization,
|
||||||
/* 全屏 */
|
/* 全屏 */
|
||||||
.fullscreen-icon,
|
.fullscreen-icon,
|
||||||
/* 消息通知 */
|
/* 消息通知 */
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ export const injectResponsiveStorage = (app: App, config: PlatformConfigs) => {
|
|||||||
const nameSpace = responsiveStorageNameSpace();
|
const nameSpace = responsiveStorageNameSpace();
|
||||||
const configObj = Object.assign(
|
const configObj = Object.assign(
|
||||||
{
|
{
|
||||||
|
// 国际化 默认中文zh
|
||||||
|
locale: Storage.getData("locale", nameSpace) ?? {
|
||||||
|
locale: config.Locale ?? "zh"
|
||||||
|
},
|
||||||
// layout模式以及主题
|
// layout模式以及主题
|
||||||
layout: Storage.getData("layout", nameSpace) ?? {
|
layout: Storage.getData("layout", nameSpace) ?? {
|
||||||
layout: config.Layout ?? "vertical",
|
layout: config.Layout ?? "vertical",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import Motion from "./utils/motion";
|
import Motion from "./utils/motion";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { message } from "@/utils/message";
|
import { message } from "@/utils/message";
|
||||||
@@ -8,16 +9,20 @@ import { debounce } from "@pureadmin/utils";
|
|||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import { useEventListener } from "@vueuse/core";
|
import { useEventListener } from "@vueuse/core";
|
||||||
import type { FormInstance } from "element-plus";
|
import type { FormInstance } from "element-plus";
|
||||||
|
import { $t, transformI18n } from "@/plugins/i18n";
|
||||||
import { useLayout } from "@/layout/hooks/useLayout";
|
import { useLayout } from "@/layout/hooks/useLayout";
|
||||||
import { useUserStoreHook } from "@/store/modules/user";
|
import { useUserStoreHook } from "@/store/modules/user";
|
||||||
import { initRouter, getTopMenu } from "@/router/utils";
|
import { initRouter, getTopMenu } from "@/router/utils";
|
||||||
import { bg, avatar, illustration } from "./utils/static";
|
import { bg, avatar, illustration } from "./utils/static";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
|
import { useTranslationLang } from "@/layout/hooks/useTranslationLang";
|
||||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
||||||
|
|
||||||
import dayIcon from "@/assets/svg/day.svg?component";
|
import dayIcon from "@/assets/svg/day.svg?component";
|
||||||
import darkIcon from "@/assets/svg/dark.svg?component";
|
import darkIcon from "@/assets/svg/dark.svg?component";
|
||||||
|
import globalization from "@/assets/svg/globalization.svg?component";
|
||||||
import Lock from "~icons/ri/lock-fill";
|
import Lock from "~icons/ri/lock-fill";
|
||||||
|
import Check from "~icons/ep/check";
|
||||||
import User from "~icons/ri/user-3-fill";
|
import User from "~icons/ri/user-3-fill";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -32,9 +37,11 @@ const ruleFormRef = ref<FormInstance>();
|
|||||||
const { initStorage } = useLayout();
|
const { initStorage } = useLayout();
|
||||||
initStorage();
|
initStorage();
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const { dataTheme, overallStyle, dataThemeChange } = useDataThemeChange();
|
const { dataTheme, overallStyle, dataThemeChange } = useDataThemeChange();
|
||||||
dataThemeChange(overallStyle.value);
|
dataThemeChange(overallStyle.value);
|
||||||
const { title } = useNav();
|
const { title, getDropdownItemStyle, getDropdownItemClass } = useNav();
|
||||||
|
const { locale, translationCh, translationEn } = useTranslationLang();
|
||||||
|
|
||||||
const ruleForm = reactive({
|
const ruleForm = reactive({
|
||||||
username: "admin",
|
username: "admin",
|
||||||
@@ -59,12 +66,12 @@ const onLogin = async (formEl: FormInstance | undefined) => {
|
|||||||
router
|
router
|
||||||
.push(getTopMenu(true).path)
|
.push(getTopMenu(true).path)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
message("登录成功", { type: "success" });
|
message(t("login.pureLoginSuccess"), { type: "success" });
|
||||||
})
|
})
|
||||||
.finally(() => (disabled.value = false));
|
.finally(() => (disabled.value = false));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
message("登录失败", { type: "error" });
|
message(t("login.pureLoginFail"), { type: "error" });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => (loading.value = false));
|
.finally(() => (loading.value = false));
|
||||||
@@ -100,6 +107,38 @@ useEventListener(document, "keydown", ({ code }) => {
|
|||||||
:inactive-icon="darkIcon"
|
:inactive-icon="darkIcon"
|
||||||
@change="dataThemeChange"
|
@change="dataThemeChange"
|
||||||
/>
|
/>
|
||||||
|
<!-- 国际化 -->
|
||||||
|
<el-dropdown trigger="click">
|
||||||
|
<globalization
|
||||||
|
class="hover:text-primary hover:bg-[transparent]! w-[20px] h-[20px] ml-1.5 cursor-pointer outline-hidden duration-300"
|
||||||
|
/>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu class="translation">
|
||||||
|
<el-dropdown-item
|
||||||
|
:style="getDropdownItemStyle(locale, 'zh')"
|
||||||
|
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
||||||
|
@click="translationCh"
|
||||||
|
>
|
||||||
|
<IconifyIconOffline
|
||||||
|
v-show="locale === 'zh'"
|
||||||
|
class="check-zh"
|
||||||
|
:icon="Check"
|
||||||
|
/>
|
||||||
|
简体中文
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
:style="getDropdownItemStyle(locale, 'en')"
|
||||||
|
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
||||||
|
@click="translationEn"
|
||||||
|
>
|
||||||
|
<span v-show="locale === 'en'" class="check-en">
|
||||||
|
<IconifyIconOffline :icon="Check" />
|
||||||
|
</span>
|
||||||
|
English
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<div class="img">
|
<div class="img">
|
||||||
@@ -123,7 +162,7 @@ useEventListener(document, "keydown", ({ code }) => {
|
|||||||
:rules="[
|
:rules="[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入账号',
|
message: transformI18n($t('login.pureUsernameReg')),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
@@ -132,7 +171,7 @@ useEventListener(document, "keydown", ({ code }) => {
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="ruleForm.username"
|
v-model="ruleForm.username"
|
||||||
clearable
|
clearable
|
||||||
placeholder="账号"
|
:placeholder="t('login.pureUsername')"
|
||||||
:prefix-icon="useRenderIcon(User)"
|
:prefix-icon="useRenderIcon(User)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -144,7 +183,7 @@ useEventListener(document, "keydown", ({ code }) => {
|
|||||||
v-model="ruleForm.password"
|
v-model="ruleForm.password"
|
||||||
clearable
|
clearable
|
||||||
show-password
|
show-password
|
||||||
placeholder="密码"
|
:placeholder="t('login.purePassword')"
|
||||||
:prefix-icon="useRenderIcon(Lock)"
|
:prefix-icon="useRenderIcon(Lock)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -159,7 +198,7 @@ useEventListener(document, "keydown", ({ code }) => {
|
|||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@click="onLogin(ruleFormRef)"
|
@click="onLogin(ruleFormRef)"
|
||||||
>
|
>
|
||||||
登录
|
{{ t("login.pureLogin") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</Motion>
|
</Motion>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -177,4 +216,20 @@ useEventListener(document, "keydown", ({ code }) => {
|
|||||||
:deep(.el-input-group__append, .el-input-group__prepend) {
|
:deep(.el-input-group__append, .el-input-group__prepend) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.translation {
|
||||||
|
::v-deep(.el-dropdown-menu__item) {
|
||||||
|
padding: 5px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-zh {
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-en {
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { reactive } from "vue";
|
import { reactive } from "vue";
|
||||||
import type { FormRules } from "element-plus";
|
import type { FormRules } from "element-plus";
|
||||||
|
import { $t, transformI18n } from "@/plugins/i18n";
|
||||||
|
|
||||||
/** 密码正则(密码格式应为8-18位数字、字母、符号的任意两种组合) */
|
/** 密码正则(密码格式应为8-18位数字、字母、符号的任意两种组合) */
|
||||||
export const REGEXP_PWD =
|
export const REGEXP_PWD =
|
||||||
@@ -11,11 +12,9 @@ const loginRules = reactive<FormRules>({
|
|||||||
{
|
{
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
callback(new Error("请输入密码"));
|
callback(new Error(transformI18n($t("login.purePassWordReg"))));
|
||||||
} else if (!REGEXP_PWD.test(value)) {
|
} else if (!REGEXP_PWD.test(value)) {
|
||||||
callback(
|
callback(new Error(transformI18n($t("login.purePassWordRuleReg"))));
|
||||||
new Error("密码格式应为8-18位数字、字母、符号的任意两种组合")
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ defineOptions({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<h1>Pure-Admin-Thin(非国际化版本)</h1>
|
<h1>Pure-Admin-Thin(国际化版本)</h1>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user