mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-02-13 17:30:27 +08:00
Compare commits
33 Commits
6fe45b2539
...
perf/tailw
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d2e121eef | ||
|
|
ff007fbc03 | ||
|
|
82ecbb8ab4 | ||
|
|
593739cf77 | ||
|
|
8119144205 | ||
|
|
add85a8a56 | ||
|
|
d7c049d821 | ||
|
|
debe617664 | ||
|
|
9f707170e8 | ||
|
|
4c3ad7acce | ||
|
|
ee4ec7d944 | ||
|
|
18ae47a569 | ||
|
|
bc1469d330 | ||
|
|
4c805b3668 | ||
|
|
f3756089fd | ||
|
|
42076a2247 | ||
|
|
f2616fdfaf | ||
|
|
ebc92ba61c | ||
|
|
fcd28837b2 | ||
|
|
b7a9cb0755 | ||
|
|
4c07d84463 | ||
|
|
4f59013b61 | ||
|
|
ace4c07590 | ||
|
|
b20323e627 | ||
|
|
30459741d4 | ||
|
|
324caafb10 | ||
|
|
3d86eded69 | ||
|
|
97bd47efca | ||
|
|
d794c7965c | ||
|
|
aeb4feb6f9 | ||
|
|
d56211996f | ||
|
|
fb744dbab7 | ||
|
|
080ccae0ff |
@@ -5,4 +5,4 @@
|
||||
|
||||
PATH="/usr/local/bin:$PATH"
|
||||
|
||||
npx --no-install commitlint --edit "$1"
|
||||
pnpm dlx commitlint --edit "$1"
|
||||
@@ -1,3 +1,27 @@
|
||||
# 6.3.0 (2025-12-10)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- Renamed "Overall Style" in system configuration to "Theme Mode" and "Navigation Mode" to "Menu Layout" to improve naming professionalism and clarity.
|
||||
- Migrated the deprecated `tseslint.config` configuration method of `typescript-eslint`.
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Added a color picker panel component.
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed an issue where the selected/activated state style of the navigation menu was displayed incorrectly when using `iconfont` icons.
|
||||
- Fixed a style issue with the column settings pop-up of the `RePureTableBar` and `ReVxeTableBar` components.
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Adapting the `ReDialog` component to the latest version of `el-dialog` with API changes and supplementary examples
|
||||
- Adapting the `ReDrawer` component to the latest version of `el-drawer` with API changes and supplementary examples
|
||||
- Adapting the `message` utility function to the latest version of `ElMessage` with API changes and supplementary examples
|
||||
- Importing the latest version of `element-plus` components
|
||||
- Optimizing the tab layout and style for Google Chrome mode
|
||||
|
||||
# 6.2.0 (2025-10-16)
|
||||
|
||||
### 🎫 Features
|
||||
|
||||
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1,3 +1,27 @@
|
||||
# 6.3.0 (2025-12-10)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- Renamed "Overall Style" in system configuration to "Theme Mode" and "Navigation Mode" to "Menu Layout" to improve naming professionalism and clarity.
|
||||
- Migrated the deprecated `tseslint.config` configuration method of `typescript-eslint`.
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Added a color picker panel component.
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed an issue where the selected/activated state style of the navigation menu was displayed incorrectly when using `iconfont` icons.
|
||||
- Fixed a style issue with the column settings pop-up of the `RePureTableBar` and `ReVxeTableBar` components.
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Adapting the `ReDialog` component to the latest version of `el-dialog` with API changes and supplementary examples
|
||||
- Adapting the `ReDrawer` component to the latest version of `el-drawer` with API changes and supplementary examples
|
||||
- Adapting the `message` utility function to the latest version of `ElMessage` with API changes and supplementary examples
|
||||
- Importing the latest version of `element-plus` components
|
||||
- Optimizing the tab layout and style for Google Chrome mode
|
||||
|
||||
# 6.2.0 (2025-10-16)
|
||||
|
||||
### 🎫 Features
|
||||
|
||||
@@ -1,8 +1,32 @@
|
||||
# 6.3.0 (2025-12-10)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- 将系统配置中的“整体风格”更名为“主题模式”,“导航模式”更名为“菜单布局”,以提升命名的专业性与清晰度
|
||||
- 迁移`typescript-eslint`已弃用的`tseslint.config`配置方式
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 添加颜色选择器面板组件
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复导航菜单在使用`iconfont`图标时,选中/激活状态的样式显示异常问题
|
||||
- 修复`RePureTableBar`和`ReVxeTableBar`组件的列设置弹窗样式问题
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- `ReDialog`组件适配`el-dialog`最新版本的`API`变更以及补充相关示例
|
||||
- `ReDrawer`组件适配`el-drawer`最新版本的`API`变更以及补充相关示例
|
||||
- `message`工具函数适配`ElMessage`最新版本的`API`变更以及补充相关示例
|
||||
- 导入`element-plus`最新版本的新组件
|
||||
- 优化页签风格为谷歌模式下的布局和样式
|
||||
|
||||
# 6.2.0 (2025-10-16)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 添加全屏`403`、`404`、`500`页面,全屏错误页面清晰且安全,提升用户体验
|
||||
- 添加全屏`403`、`404`、`500`页面,全屏错误页面清晰且安全,提升用户体验
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
@@ -26,7 +50,7 @@
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复`ReSegmented`分段控制器组件在浅色和深色整体风格切换时的闪烁问题
|
||||
- 修复`ReSegmented`分段控制器组件在浅色和深色主题模式切换时的闪烁问题
|
||||
- 修复`resetRouter`未清空全部路由数据问题
|
||||
- 修复标签页-关闭左侧标签页关闭异常问题
|
||||
|
||||
@@ -231,8 +255,8 @@
|
||||
|
||||
- 修复`windwos`下点击注册页面会出现滚动条问题
|
||||
- 修复`windows`下页面切换,内容区会出现滚动条问题
|
||||
- 修复`pure-table`带状态表格在深色整体风格下状态样式消失的问题
|
||||
- 修复系统配置中开启灰色模式和深色整体风格,刷新页面整体风格异常
|
||||
- 修复`pure-table`带状态表格在深色主题模式下状态样式消失的问题
|
||||
- 修复系统配置中开启灰色模式和深色主题模式,刷新页面主题模式异常
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
@@ -285,7 +309,7 @@
|
||||
- 内嵌`iframe`页支持设置`keepAlive`,保持页面状态
|
||||
- 优化导航,弹出的菜单超出内容区自适应且可滚动
|
||||
- 添加文件上传示例
|
||||
- 添加整体风格自适应操作系统浅色、深色、自动主题功能
|
||||
- 添加主题模式自适应操作系统浅色、深色、自动主题功能
|
||||
- 添加页脚
|
||||
- 支持多标签页打开已经登录的系统后无需再登录并添加内免登录功能(用户可选择免登录的天数)
|
||||
- 带来高级感的终端命令行
|
||||
@@ -485,7 +509,7 @@
|
||||
- 修复菜单搜索功能弹框打开后搜索框未自动聚集的问题
|
||||
- 修复按 `ESC` 退出全屏后,工具栏按钮文案展示问题
|
||||
- 修复移动端通知栏 `tooltip` 点击穿透问题
|
||||
- 修复当左侧菜单收起后,切换到 `horizontal` 导航模式时文字不展示的问题
|
||||
- 修复当左侧菜单收起后,切换到 `horizontal` 菜单布局时文字不展示的问题
|
||||
- 修复导航 `tab` 关闭其他标签页无法重置状态问题
|
||||
- 修复 `getHistoryMode` 函数中环境变量未初始化带来的页面热更新报错
|
||||
- 修复导航 `tab` 过多导致关闭左侧标签页无法正常显示
|
||||
|
||||
@@ -5,6 +5,7 @@ import * as parserVue from "vue-eslint-parser";
|
||||
import configPrettier from "eslint-config-prettier";
|
||||
import pluginPrettier from "eslint-plugin-prettier";
|
||||
import { defineConfig, globalIgnores } from "eslint/config";
|
||||
import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores([
|
||||
@@ -72,8 +73,11 @@ export default defineConfig([
|
||||
]
|
||||
}
|
||||
},
|
||||
...tseslint.config({
|
||||
extends: [...tseslint.configs.recommended],
|
||||
...tseslint.configs.recommended.map(config => ({
|
||||
...config,
|
||||
files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"]
|
||||
})),
|
||||
{
|
||||
files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-redeclare": "error",
|
||||
@@ -102,7 +106,7 @@ export default defineConfig([
|
||||
}
|
||||
]
|
||||
}
|
||||
}),
|
||||
},
|
||||
{
|
||||
files: ["**/*.d.ts"],
|
||||
rules: {
|
||||
@@ -169,5 +173,21 @@ export default defineConfig([
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ["**/*.vue", "**/*.tsx"],
|
||||
plugins: {
|
||||
"better-tailwindcss": eslintPluginBetterTailwindcss
|
||||
},
|
||||
rules: {
|
||||
"better-tailwindcss/enforce-consistent-variable-syntax": "warn",
|
||||
"better-tailwindcss/enforce-canonical-classes": "warn"
|
||||
},
|
||||
settings: {
|
||||
"better-tailwindcss": {
|
||||
entryPoint: "src/style/tailwind.css",
|
||||
rootFontSize: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -31,15 +31,15 @@ panel:
|
||||
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
|
||||
pureThemeMode: Theme Mode
|
||||
pureThemeModeLight: Light
|
||||
pureThemeModeLightTip: Set sail freshly and light up the comfortable work interface
|
||||
pureThemeModeDark: Dark
|
||||
pureThemeModeDarkTip: Moonlight Overture, indulge in the tranquility and elegance of the night
|
||||
pureThemeModeSystem: Auto
|
||||
pureThemeModeSystemTip: Synchronize time, the interface naturally responds to morning and dusk
|
||||
pureThemeColor: Theme Color
|
||||
pureLayoutModel: Layout Model
|
||||
pureMenuLayout: Menu Layout
|
||||
pureVerticalTip: The menu on the left is familiar and friendly
|
||||
pureHorizontalTip: Top menu, concise overview
|
||||
pureMixTip: Mixed menu, flexible
|
||||
@@ -239,3 +239,18 @@ login:
|
||||
purePassWordSureReg: Please enter confirm password
|
||||
purePassWordDifferentReg: The two passwords do not match!
|
||||
purePassWordUpdateReg: Password has been updated
|
||||
pureLoginExpired: Login expired, please login again
|
||||
tableBar:
|
||||
pureList: List
|
||||
pureLarge: Large
|
||||
pureDefault: Default
|
||||
pureSmall: Small
|
||||
pureColumnSettings: ColumnSettings
|
||||
pureCollapse: Collapse
|
||||
pureExpand: Expand
|
||||
pureRefresh: Refresh
|
||||
pureDensity: Density
|
||||
pureColumnDisplay: ColumnDisplay
|
||||
pureReset: Reset
|
||||
pureExitFullScreen: ExitFullScreen
|
||||
pureFullScreen: FullScreen
|
||||
@@ -31,15 +31,15 @@ panel:
|
||||
pureCloseSystemSet: 关闭配置
|
||||
pureClearCacheAndToLogin: 清空缓存并返回登录页
|
||||
pureClearCache: 清空缓存
|
||||
pureOverallStyle: 整体风格
|
||||
pureOverallStyleLight: 浅色
|
||||
pureOverallStyleLightTip: 清新启航,点亮舒适的工作界面
|
||||
pureOverallStyleDark: 深色
|
||||
pureOverallStyleDarkTip: 月光序曲,沉醉于夜的静谧雅致
|
||||
pureOverallStyleSystem: 自动
|
||||
pureOverallStyleSystemTip: 同步时光,界面随晨昏自然呼应
|
||||
pureThemeMode: 主题模式
|
||||
pureThemeModeLight: 浅色
|
||||
pureThemeModeLightTip: 清新启航,点亮舒适的工作界面
|
||||
pureThemeModeDark: 深色
|
||||
pureThemeModeDarkTip: 月光序曲,沉醉于夜的静谧雅致
|
||||
pureThemeModeSystem: 自动
|
||||
pureThemeModeSystemTip: 同步时光,界面随晨昏自然呼应
|
||||
pureThemeColor: 主题色
|
||||
pureLayoutModel: 导航模式
|
||||
pureMenuLayout: 菜单布局
|
||||
pureVerticalTip: 左侧菜单,亲切熟悉
|
||||
pureHorizontalTip: 顶部菜单,简洁概览
|
||||
pureMixTip: 混合菜单,灵活多变
|
||||
@@ -239,3 +239,18 @@ login:
|
||||
purePassWordSureReg: 请输入确认密码
|
||||
purePassWordDifferentReg: 两次密码不一致!
|
||||
purePassWordUpdateReg: 修改密码成功
|
||||
pureLoginExpired: 登录已过期,请重新登录
|
||||
tableBar:
|
||||
pureList: 列表
|
||||
pureLarge: 宽松
|
||||
pureDefault: 默认
|
||||
pureSmall: 紧凑
|
||||
pureColumnSettings: 列设置
|
||||
pureCollapse: 折叠
|
||||
pureExpand: 展开
|
||||
pureRefresh: 刷新
|
||||
pureDensity: 密度
|
||||
pureColumnDisplay: 列展示
|
||||
pureReset: 重置
|
||||
pureExitFullScreen: 退出全屏
|
||||
pureFullScreen: 全屏
|
||||
@@ -326,7 +326,8 @@ export default defineFakeRoute([
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [
|
||||
systemManagementRouter,
|
||||
systemMonitorRouter,
|
||||
|
||||
@@ -6,7 +6,8 @@ export default defineFakeRoute([
|
||||
method: "post",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
|
||||
@@ -8,7 +8,8 @@ export default defineFakeRoute([
|
||||
response: ({ body }) => {
|
||||
if (body.username === "admin") {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||
username: "admin",
|
||||
@@ -24,7 +25,8 @@ export default defineFakeRoute([
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/52823142",
|
||||
username: "common",
|
||||
|
||||
@@ -33,7 +33,8 @@ export default defineFakeRoute([
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: mapList()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,7 +8,8 @@ export default defineFakeRoute([
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||
username: "admin",
|
||||
@@ -46,7 +47,8 @@ export default defineFakeRoute([
|
||||
}
|
||||
];
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
|
||||
@@ -8,7 +8,8 @@ export default defineFakeRoute([
|
||||
response: ({ body }) => {
|
||||
if (body.refreshToken) {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.newAdmin",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.newAdminRefresh",
|
||||
@@ -18,7 +19,8 @@ export default defineFakeRoute([
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: false,
|
||||
code: 10001,
|
||||
message: "请求参数缺失或格式不正确",
|
||||
data: {}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ export default defineFakeRoute([
|
||||
if (body.phone) list = list.filter(item => item.phone === body.phone);
|
||||
if (body.deptId) list = list.filter(item => item.dept.id === body.deptId);
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -66,7 +67,8 @@ export default defineFakeRoute([
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [
|
||||
{ id: 1, name: "超级管理员" },
|
||||
{ id: 2, name: "普通角色" }
|
||||
@@ -82,18 +84,21 @@ export default defineFakeRoute([
|
||||
if (body.userId) {
|
||||
if (body.userId == 1) {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [1]
|
||||
};
|
||||
} else if (body.userId == 2) {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [2]
|
||||
};
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
success: false,
|
||||
code: 10001,
|
||||
message: "请求参数缺失或格式不正确",
|
||||
data: []
|
||||
};
|
||||
}
|
||||
@@ -130,7 +135,8 @@ export default defineFakeRoute([
|
||||
);
|
||||
if (body.code) list = list.filter(item => item.code === body.code);
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -146,7 +152,8 @@ export default defineFakeRoute([
|
||||
method: "post",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [
|
||||
// 外部页面
|
||||
{
|
||||
@@ -350,7 +357,8 @@ export default defineFakeRoute([
|
||||
response: ({ body }) => {
|
||||
if (body.id == 1) {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [
|
||||
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 200, 201,
|
||||
202, 203, 204, 205, 300, 301, 302, 303, 304, 400, 401, 402, 403,
|
||||
@@ -359,7 +367,8 @@ export default defineFakeRoute([
|
||||
};
|
||||
} else if (body.id == 2) {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [
|
||||
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 404, 500,
|
||||
501, 502, 503
|
||||
@@ -374,7 +383,8 @@ export default defineFakeRoute([
|
||||
method: "post",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [
|
||||
// 外部页面
|
||||
{
|
||||
@@ -1255,7 +1265,8 @@ export default defineFakeRoute([
|
||||
method: "post",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [
|
||||
{
|
||||
name: "杭州总公司",
|
||||
@@ -1418,7 +1429,8 @@ export default defineFakeRoute([
|
||||
];
|
||||
list = list.filter(item => item.username.includes(body?.username));
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -1462,7 +1474,8 @@ export default defineFakeRoute([
|
||||
String(item.status).includes(String(body?.status))
|
||||
);
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -1508,7 +1521,8 @@ export default defineFakeRoute([
|
||||
String(item.status).includes(String(body?.status))
|
||||
);
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -1566,7 +1580,8 @@ export default defineFakeRoute([
|
||||
];
|
||||
list = list.filter(item => item.module.includes(body?.module));
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
@@ -1601,7 +1616,8 @@ export default defineFakeRoute([
|
||||
"Content-Length": 17019
|
||||
},
|
||||
responseBody: {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: [
|
||||
{
|
||||
parentId: 0,
|
||||
|
||||
111
package.json
111
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-pure-admin",
|
||||
"version": "6.2.0",
|
||||
"version": "6.3.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -54,125 +54,126 @@
|
||||
"@logicflow/extension": "^1.2.28",
|
||||
"@pureadmin/descriptions": "^1.2.1",
|
||||
"@pureadmin/table": "^3.3.0",
|
||||
"@pureadmin/utils": "^2.6.2",
|
||||
"@pureadmin/utils": "^2.6.3",
|
||||
"@vue-flow/background": "^1.3.2",
|
||||
"@vue-flow/core": "^1.47.0",
|
||||
"@vueuse/core": "^13.9.0",
|
||||
"@vue-flow/core": "^1.48.1",
|
||||
"@vueuse/core": "^14.1.0",
|
||||
"@vueuse/motion": "^3.0.3",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"@zxcvbn-ts/core": "^3.0.4",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.12.2",
|
||||
"axios": "^1.13.2",
|
||||
"china-area-data": "^5.0.1",
|
||||
"codemirror": "^5.65.20",
|
||||
"codemirror-editor-vue3": "^2.8.0",
|
||||
"cropperjs": "^1.6.2",
|
||||
"dayjs": "^1.11.18",
|
||||
"deep-chat": "^2.2.2",
|
||||
"dayjs": "^1.11.19",
|
||||
"deep-chat": "^2.4.1",
|
||||
"echarts": "^6.0.0",
|
||||
"el-table-infinite-scroll": "^3.0.7",
|
||||
"element-plus": "^2.11.7",
|
||||
"el-table-infinite-scroll": "^3.0.8",
|
||||
"element-plus": "^2.13.1",
|
||||
"highlight.js": "^11.11.1",
|
||||
"intro.js": "^7.2.0",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jsbarcode": "^3.12.1",
|
||||
"jsbarcode": "^3.12.3",
|
||||
"localforage": "^1.10.0",
|
||||
"mint-filter": "^4.0.3",
|
||||
"mitt": "^3.0.1",
|
||||
"mqtt": "4.3.7",
|
||||
"nprogress": "^0.2.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"pinia": "^3.0.3",
|
||||
"pinia": "^3.0.4",
|
||||
"pinyin-pro": "^3.27.0",
|
||||
"plus-pro-components": "^0.1.29",
|
||||
"plus-pro-components": "^0.1.30",
|
||||
"qrcode": "^1.5.4",
|
||||
"qs": "^6.14.0",
|
||||
"qs": "^6.14.1",
|
||||
"responsive-storage": "^2.2.0",
|
||||
"sortablejs": "^1.15.6",
|
||||
"swiper": "^12.0.2",
|
||||
"swiper": "^12.0.3",
|
||||
"typeit": "^8.8.7",
|
||||
"v-contextmenu": "^3.2.0",
|
||||
"v3-infinite-loading": "^1.3.2",
|
||||
"vditor": "^3.11.2",
|
||||
"version-rocket": "^1.7.4",
|
||||
"vue": "^3.5.22",
|
||||
"vue-i18n": "^11.1.12",
|
||||
"vue-json-pretty": "^2.5.0",
|
||||
"vue": "^3.5.26",
|
||||
"vue-i18n": "^11.2.8",
|
||||
"vue-json-pretty": "^2.6.0",
|
||||
"vue-pdf-embed": "^2.1.3",
|
||||
"vue-router": "^4.5.1",
|
||||
"vue-router": "^4.6.4",
|
||||
"vue-tippy": "^6.7.1",
|
||||
"vue-types": "^6.0.0",
|
||||
"vue-virtual-scroller": "2.0.0-beta.8",
|
||||
"vue-waterfall-plugin-next": "^2.6.9",
|
||||
"vue3-danmaku": "^1.6.6",
|
||||
"vue3-danmaku": "^1.6.7",
|
||||
"vue3-puzzle-vcode": "^1.1.7",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vxe-table": "4.6.25",
|
||||
"wavesurfer.js": "^7.11.0",
|
||||
"wavesurfer.js": "^7.12.1",
|
||||
"xgplayer": "^3.0.23",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^20.1.0",
|
||||
"@commitlint/config-conventional": "^20.0.0",
|
||||
"@commitlint/types": "^20.0.0",
|
||||
"@eslint/js": "^9.37.0",
|
||||
"@faker-js/faker": "^10.0.0",
|
||||
"@iconify/json": "^2.2.393",
|
||||
"@commitlint/cli": "^20.3.1",
|
||||
"@commitlint/config-conventional": "^20.3.1",
|
||||
"@commitlint/types": "^20.3.1",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@faker-js/faker": "^10.2.0",
|
||||
"@iconify/json": "^2.2.428",
|
||||
"@iconify/vue": "4.2.0",
|
||||
"@intlify/unplugin-vue-i18n": "^11.0.1",
|
||||
"@tailwindcss/vite": "^4.1.14",
|
||||
"@types/codemirror": "^5.60.16",
|
||||
"@intlify/unplugin-vue-i18n": "^11.0.3",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@types/codemirror": "^5.60.17",
|
||||
"@types/dagre": "^0.7.53",
|
||||
"@types/intro.js": "^5.1.5",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/node": "^20.19.19",
|
||||
"@types/node": "^20.19.30",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/qrcode": "^1.5.6",
|
||||
"@types/qs": "^6.14.0",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.1",
|
||||
"@types/sortablejs": "^1.15.9",
|
||||
"@vitejs/plugin-vue": "^6.0.3",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.3",
|
||||
"boxen": "^8.0.1",
|
||||
"code-inspector-plugin": "^1.2.10",
|
||||
"cssnano": "^7.1.1",
|
||||
"code-inspector-plugin": "^1.3.4",
|
||||
"cssnano": "^7.1.2",
|
||||
"dagre": "^0.8.5",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"eslint-plugin-vue": "^10.5.0",
|
||||
"eslint-plugin-better-tailwindcss": "^4.0.1",
|
||||
"eslint-plugin-prettier": "^5.5.5",
|
||||
"eslint-plugin-vue": "^10.6.2",
|
||||
"gradient-string": "^3.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^16.2.3",
|
||||
"lint-staged": "^16.2.7",
|
||||
"postcss": "^8.5.6",
|
||||
"postcss-html": "^1.8.0",
|
||||
"postcss-html": "^1.8.1",
|
||||
"postcss-load-config": "^6.0.1",
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "^3.6.2",
|
||||
"rimraf": "^6.0.1",
|
||||
"rollup-plugin-visualizer": "^6.0.4",
|
||||
"sass": "^1.93.2",
|
||||
"stylelint": "^16.25.0",
|
||||
"stylelint-config-recess-order": "^7.3.0",
|
||||
"prettier": "^3.8.0",
|
||||
"rimraf": "^6.1.2",
|
||||
"rollup-plugin-visualizer": "^6.0.5",
|
||||
"sass": "^1.97.2",
|
||||
"stylelint": "^17.0.0",
|
||||
"stylelint-config-recess-order": "^7.4.0",
|
||||
"stylelint-config-recommended-vue": "^1.6.1",
|
||||
"stylelint-config-standard-scss": "^14.0.0",
|
||||
"stylelint-config-standard-scss": "^17.0.0",
|
||||
"stylelint-prettier": "^5.0.3",
|
||||
"svgo": "^4.0.0",
|
||||
"tailwindcss": "^4.1.14",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.46.0",
|
||||
"unplugin-icons": "^22.4.2",
|
||||
"vite": "^7.1.9",
|
||||
"typescript-eslint": "^8.53.0",
|
||||
"unplugin-icons": "^23.0.1",
|
||||
"vite": "^7.3.1",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-fake-server": "^2.2.0",
|
||||
"vite-plugin-fake-server": "^2.2.2",
|
||||
"vite-plugin-remove-console": "^2.2.0",
|
||||
"vite-plugin-router-warn": "^1.0.0",
|
||||
"vite-plugin-router-warn": "^2.0.0",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
"vue-tsc": "^3.1.1"
|
||||
"vue-tsc": "^3.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.13.0",
|
||||
|
||||
4652
pnpm-lock.yaml
generated
4652
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "6.2.0",
|
||||
"Version": "6.3.0",
|
||||
"Title": "PureAdmin",
|
||||
"FixedHeader": true,
|
||||
"HiddenSideBar": false,
|
||||
@@ -9,7 +9,7 @@
|
||||
"Layout": "vertical",
|
||||
"Theme": "light",
|
||||
"DarkMode": false,
|
||||
"OverallStyle": "light",
|
||||
"ThemeMode": "light",
|
||||
"Grey": false,
|
||||
"Weak": false,
|
||||
"HideTabs": false,
|
||||
|
||||
15
src/App.vue
15
src/App.vue
@@ -7,8 +7,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { useGlobal } from "@pureadmin/utils";
|
||||
import { checkVersion } from "version-rocket";
|
||||
import { defineComponent, computed } from "vue";
|
||||
import { ElConfigProvider } from "element-plus";
|
||||
import { ReDialog } from "@/components/ReDialog";
|
||||
import { ReDrawer } from "@/components/ReDrawer";
|
||||
@@ -24,12 +25,16 @@ export default defineComponent({
|
||||
ReDialog,
|
||||
ReDrawer
|
||||
},
|
||||
computed: {
|
||||
currentLocale() {
|
||||
return this.$storage.locale?.locale === "zh"
|
||||
setup() {
|
||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||
const currentLocale = computed(() => {
|
||||
return $storage.locale?.locale === "zh"
|
||||
? { ...zhCn, ...plusZhCn }
|
||||
: { ...en, ...plusEn };
|
||||
}
|
||||
});
|
||||
return {
|
||||
currentLocale
|
||||
};
|
||||
},
|
||||
beforeCreate() {
|
||||
const { version, name: title } = __APP_INFO__.pkg;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data?: {
|
||||
/** 列表数据 */
|
||||
list: Array<any>;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
@@ -14,7 +15,7 @@ export const mapJson = (params?: object) => {
|
||||
export const formUpload = data => {
|
||||
return http.request<Result>(
|
||||
"post",
|
||||
"https://run.mocky.io/v3/3aa761d7-b0b3-4a03-96b3-6168d4f7467b",
|
||||
"https://pureadmin.free.beeceptor.com/images",
|
||||
{ data },
|
||||
{
|
||||
headers: {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data?: Array<any>;
|
||||
};
|
||||
|
||||
type ResultTable = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data?: {
|
||||
/** 列表数据 */
|
||||
list: Array<any>;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
export type UserResult = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data: {
|
||||
/** 头像 */
|
||||
avatar: string;
|
||||
@@ -23,7 +24,8 @@ export type UserResult = {
|
||||
};
|
||||
|
||||
export type RefreshTokenResult = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data: {
|
||||
/** `token` */
|
||||
accessToken: string;
|
||||
@@ -50,12 +52,14 @@ export type UserInfo = {
|
||||
};
|
||||
|
||||
export type UserInfoResult = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data: UserInfo;
|
||||
};
|
||||
|
||||
type ResultTable = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data?: {
|
||||
/** 列表数据 */
|
||||
list: Array<any>;
|
||||
|
||||
@@ -23,17 +23,15 @@ const copyAnimatesList = cloneDeep(animatesList);
|
||||
const animateClass = computed(() => {
|
||||
return [
|
||||
"mt-1",
|
||||
"flex",
|
||||
"flex-c",
|
||||
"border",
|
||||
"w-[130px]",
|
||||
"h-[100px]",
|
||||
"items-center",
|
||||
"w-32.5",
|
||||
"h-25",
|
||||
"cursor-pointer",
|
||||
"transition-all",
|
||||
"justify-center",
|
||||
"border-[#e5e7eb]",
|
||||
"hover:text-primary",
|
||||
"hover:duration-[700ms]"
|
||||
"hover:duration-700"
|
||||
];
|
||||
});
|
||||
|
||||
@@ -88,7 +86,7 @@ function onMouseleave() {
|
||||
@clear="onClear"
|
||||
>
|
||||
<template #empty>
|
||||
<div class="w-[280px]">
|
||||
<div class="w-70">
|
||||
<el-scrollbar
|
||||
noresize
|
||||
height="212px"
|
||||
|
||||
@@ -116,11 +116,10 @@ export default defineComponent({
|
||||
|
||||
const iconClass = computed(() => {
|
||||
return [
|
||||
"p-[6px]",
|
||||
"h-[30px]",
|
||||
"w-[30px]",
|
||||
"p-1.5",
|
||||
"size-7.5",
|
||||
"rounded-sm",
|
||||
"outline-hidden",
|
||||
"rounded-[4px]",
|
||||
"cursor-pointer",
|
||||
"hover:bg-[rgba(0,0,0,0.06)]"
|
||||
];
|
||||
@@ -252,7 +251,7 @@ export default defineComponent({
|
||||
},
|
||||
setup() {
|
||||
return () => (
|
||||
<div class="flex flex-wrap w-[60px] justify-between">
|
||||
<div class="flex flex-wrap w-15 justify-between">
|
||||
<ElUpload
|
||||
accept="image/*"
|
||||
show-file-list={false}
|
||||
|
||||
@@ -54,7 +54,7 @@ defineExpose({ hidePopover });
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
<div class="flex flex-wrap justify-center items-center text-center">
|
||||
<div class="flex-c flex-wrap text-center">
|
||||
<el-image
|
||||
v-if="cropperImg"
|
||||
:src="cropperImg"
|
||||
|
||||
@@ -123,10 +123,7 @@ function handleClose(
|
||||
v-if="options?.fullscreenIcon || options?.headerRenderer"
|
||||
#header="{ close, titleId, titleClass }"
|
||||
>
|
||||
<div
|
||||
v-if="options?.fullscreenIcon"
|
||||
class="flex items-center justify-between"
|
||||
>
|
||||
<div v-if="options?.fullscreenIcon" class="flex-bc">
|
||||
<span :id="titleId" :class="titleClass">{{ options?.title }}</span>
|
||||
<i
|
||||
v-if="!options?.fullscreen"
|
||||
|
||||
@@ -135,9 +135,7 @@ watch(
|
||||
@after-leave="onAfterLeave"
|
||||
>
|
||||
<template #reference>
|
||||
<div
|
||||
class="w-[40px] h-[32px] cursor-pointer flex justify-center items-center"
|
||||
>
|
||||
<div class="w-10 h-8 cursor-pointer flex-c">
|
||||
<IconifyIconOffline v-if="!icon" :icon="Search" />
|
||||
<IconifyIconOnline v-else :icon="inputValue" />
|
||||
</div>
|
||||
@@ -163,7 +161,7 @@ watch(
|
||||
v-for="(item, key) in pageList"
|
||||
:key="key"
|
||||
:title="item"
|
||||
class="icon-item p-2 cursor-pointer mr-2 mt-1 flex justify-center items-center border border-[#e5e7eb]"
|
||||
class="icon-item p-2 cursor-pointer mr-2 mt-1 flex-c border border-[#e5e7eb]"
|
||||
:style="iconItemStyle(item)"
|
||||
@click="onChangeIcon(item)"
|
||||
>
|
||||
|
||||
@@ -92,14 +92,16 @@ onBeforeMount(() => {
|
||||
|
||||
// 获取模拟车辆信息
|
||||
mapJson()
|
||||
.then(({ data }) => {
|
||||
const points: object = data.map(v => {
|
||||
return {
|
||||
lnglat: [v.lng, v.lat],
|
||||
...v
|
||||
};
|
||||
});
|
||||
if (MarkerCluster) MarkerCluster.setData(points);
|
||||
.then(({ code, data }) => {
|
||||
if (code === 0) {
|
||||
const points: object = data.map(v => {
|
||||
return {
|
||||
lnglat: [v.lng, v.lat],
|
||||
...v
|
||||
};
|
||||
});
|
||||
if (MarkerCluster) MarkerCluster.setData(points);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log("err:", err);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Sortable from "sortablejs";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { $t, transformI18n } from "@/plugins/i18n";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import {
|
||||
type PropType,
|
||||
@@ -30,7 +30,7 @@ const props = {
|
||||
/** 头部最左边的标题 */
|
||||
title: {
|
||||
type: String,
|
||||
default: "列表"
|
||||
default: $t("tableBar.pureList")
|
||||
},
|
||||
/** 对于树形表格,如果想启用展开和折叠功能,传入当前表格的ref即可 */
|
||||
tableRef: {
|
||||
@@ -97,9 +97,9 @@ export default defineComponent({
|
||||
return [
|
||||
"flex",
|
||||
"justify-between",
|
||||
"pt-[3px]",
|
||||
"px-[11px]",
|
||||
"border-b-[1px]",
|
||||
"pt-0.75",
|
||||
"px-2.75",
|
||||
"border-b",
|
||||
"border-b-solid",
|
||||
"border-[#dcdfe6]",
|
||||
"dark:border-[#303030]"
|
||||
@@ -169,19 +169,19 @@ export default defineComponent({
|
||||
style={getDropdownItemStyle.value("large")}
|
||||
onClick={() => (size.value = "large")}
|
||||
>
|
||||
宽松
|
||||
{transformI18n($t("tableBar.pureLarge"))}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("default")}
|
||||
onClick={() => (size.value = "default")}
|
||||
>
|
||||
默认
|
||||
{transformI18n($t("tableBar.pureDefault"))}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("small")}
|
||||
onClick={() => (size.value = "small")}
|
||||
>
|
||||
紧凑
|
||||
{transformI18n($t("tableBar.pureSmall"))}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
)
|
||||
@@ -244,8 +244,10 @@ export default defineComponent({
|
||||
const reference = {
|
||||
reference: () => (
|
||||
<SettingIcon
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
v-tippy={rendTippyProps("列设置")}
|
||||
class={["w-4", iconClass.value]}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureColumnSettings"))
|
||||
)}
|
||||
/>
|
||||
)
|
||||
};
|
||||
@@ -264,25 +266,27 @@ export default defineComponent({
|
||||
: "mt-2"
|
||||
]}
|
||||
>
|
||||
<div class="flex justify-between w-full h-[60px] p-4">
|
||||
<div class="flex justify-between w-full h-15 p-4">
|
||||
{slots?.title ? (
|
||||
slots.title()
|
||||
) : (
|
||||
<p class="font-bold truncate">{props.title}</p>
|
||||
<p class="font-bold truncate">{transformI18n(props.title)}</p>
|
||||
)}
|
||||
<div class="flex items-center justify-around">
|
||||
<div class="flex-ac">
|
||||
{slots?.buttons ? (
|
||||
<div class="flex mr-4">{slots.buttons()}</div>
|
||||
) : null}
|
||||
{props.tableRef?.size ? (
|
||||
<>
|
||||
<ExpandIcon
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
class={["w-4", iconClass.value]}
|
||||
style={{
|
||||
transform: isExpandAll.value ? "none" : "rotate(-90deg)"
|
||||
}}
|
||||
v-tippy={rendTippyProps(
|
||||
isExpandAll.value ? "折叠" : "展开"
|
||||
isExpandAll.value
|
||||
? transformI18n($t("tableBar.pureCollapse"))
|
||||
: transformI18n($t("tableBar.pureExpand"))
|
||||
)}
|
||||
onClick={() => onExpand()}
|
||||
/>
|
||||
@@ -291,20 +295,24 @@ export default defineComponent({
|
||||
) : null}
|
||||
<RefreshIcon
|
||||
class={[
|
||||
"w-[16px]",
|
||||
"w-4",
|
||||
iconClass.value,
|
||||
loading.value ? "animate-spin" : ""
|
||||
]}
|
||||
v-tippy={rendTippyProps("刷新")}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureRefresh"))
|
||||
)}
|
||||
onClick={() => onReFresh()}
|
||||
/>
|
||||
<el-divider direction="vertical" />
|
||||
<el-dropdown
|
||||
v-slots={dropdown}
|
||||
trigger="click"
|
||||
v-tippy={rendTippyProps("密度")}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureDensity"))
|
||||
)}
|
||||
>
|
||||
<CollapseIcon class={["w-[16px]", iconClass.value]} />
|
||||
<CollapseIcon class={["w-4", iconClass.value]} />
|
||||
</el-dropdown>
|
||||
<el-divider direction="vertical" />
|
||||
|
||||
@@ -318,17 +326,17 @@ export default defineComponent({
|
||||
<div class={[topClass.value]}>
|
||||
<el-checkbox
|
||||
class="-mr-1!"
|
||||
label="列展示"
|
||||
label={transformI18n($t("tableBar.pureColumnDisplay"))}
|
||||
v-model={checkAll.value}
|
||||
indeterminate={isIndeterminate.value}
|
||||
onChange={value => handleCheckAllChange(value)}
|
||||
/>
|
||||
<el-button type="primary" link onClick={() => onReset()}>
|
||||
重置
|
||||
{transformI18n($t("tableBar.pureReset"))}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="pt-[6px] pl-[11px]">
|
||||
<div class="pt-1.5 pl-2.75">
|
||||
<el-scrollbar max-height="36vh">
|
||||
<el-checkbox-group
|
||||
ref={`GroupRef${unref(props.tableKey)}`}
|
||||
@@ -345,7 +353,7 @@ export default defineComponent({
|
||||
<div class="flex items-center">
|
||||
<DragIcon
|
||||
class={[
|
||||
"drag-btn w-[16px] mr-2",
|
||||
"drag-btn w-4 mr-2",
|
||||
isFixedColumn(item)
|
||||
? "cursor-no-drop!"
|
||||
: "cursor-grab!"
|
||||
@@ -364,7 +372,7 @@ export default defineComponent({
|
||||
>
|
||||
<span
|
||||
title={transformI18n(item)}
|
||||
class="inline-block w-[120px] truncate hover:text-text_color_primary"
|
||||
class="inline-block w-30 truncate hover:text-text_color_primary"
|
||||
>
|
||||
{transformI18n(item)}
|
||||
</span>
|
||||
@@ -380,9 +388,13 @@ export default defineComponent({
|
||||
<el-divider direction="vertical" />
|
||||
|
||||
<iconifyIconOffline
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
class={["w-4", iconClass.value]}
|
||||
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||
v-tippy={
|
||||
isFullscreen.value
|
||||
? transformI18n($t("tableBar.pureExitFullScreen"))
|
||||
: transformI18n($t("tableBar.pureFullScreen"))
|
||||
}
|
||||
onClick={() => onFullscreen()}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -240,7 +240,7 @@ export default defineComponent({
|
||||
)}
|
||||
{props.disabled && (
|
||||
<div
|
||||
class="qrcode--disabled absolute top-0 left-0 flex w-full h-full items-center justify-center"
|
||||
class="qrcode--disabled absolute top-0 left-0 flex-c size-full"
|
||||
onClick={disabledClick}
|
||||
>
|
||||
<div class="absolute top-[50%] left-[50%] font-bold">
|
||||
|
||||
@@ -5,14 +5,10 @@ import {
|
||||
ref,
|
||||
unref,
|
||||
nextTick,
|
||||
computed
|
||||
computed,
|
||||
useTemplateRef
|
||||
} from "vue";
|
||||
import {
|
||||
tryOnMounted,
|
||||
tryOnUnmounted,
|
||||
templateRef,
|
||||
useDebounceFn
|
||||
} from "@vueuse/core";
|
||||
import { tryOnMounted, tryOnUnmounted, useDebounceFn } from "@vueuse/core";
|
||||
import * as utilsMethods from "./utils";
|
||||
const { animationFrame, copyObj } = utilsMethods;
|
||||
animationFrame();
|
||||
@@ -62,17 +58,14 @@ if (props.classOption["key"] === undefined) {
|
||||
props.classOption["key"] = 0;
|
||||
}
|
||||
|
||||
const wrap = templateRef<HTMLElement | null>(
|
||||
`wrap${props.classOption["key"]}`,
|
||||
null
|
||||
const wrap = useTemplateRef<HTMLElement | null>(
|
||||
`wrap${props.classOption["key"]}`
|
||||
);
|
||||
const slotList = templateRef<HTMLElement | null>(
|
||||
`slotList${props.classOption["key"]}`,
|
||||
null
|
||||
const slotList = useTemplateRef<HTMLElement | null>(
|
||||
`slotList${props.classOption["key"]}`
|
||||
);
|
||||
const realBox = templateRef<HTMLElement | null>(
|
||||
`realBox${props.classOption["key"]}`,
|
||||
null
|
||||
const realBox = useTemplateRef<HTMLElement | null>(
|
||||
`realBox${props.classOption["key"]}`
|
||||
);
|
||||
|
||||
const leftSwitchState = computed(() => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Sortable from "sortablejs";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { $t, transformI18n } from "@/plugins/i18n";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import { delay, cloneDeep, getKeyList } from "@pureadmin/utils";
|
||||
import {
|
||||
@@ -24,7 +24,7 @@ const props = {
|
||||
/** 头部最左边的标题 */
|
||||
title: {
|
||||
type: String,
|
||||
default: "列表"
|
||||
default: $t("tableBar.pureList")
|
||||
},
|
||||
vxeTableRef: {
|
||||
type: Object as PropType<any>
|
||||
@@ -90,9 +90,9 @@ export default defineComponent({
|
||||
return [
|
||||
"flex",
|
||||
"justify-between",
|
||||
"pt-[3px]",
|
||||
"px-[11px]",
|
||||
"border-b-[1px]",
|
||||
"pt-0.75",
|
||||
"px-2.75",
|
||||
"border-b",
|
||||
"border-b-solid",
|
||||
"border-[#dcdfe6]",
|
||||
"dark:border-[#303030]"
|
||||
@@ -161,19 +161,19 @@ export default defineComponent({
|
||||
style={getDropdownItemStyle.value("medium")}
|
||||
onClick={() => changeSize("medium")}
|
||||
>
|
||||
宽松
|
||||
{transformI18n($t("tableBar.pureLarge"))}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("small")}
|
||||
onClick={() => changeSize("small")}
|
||||
>
|
||||
默认
|
||||
{transformI18n($t("tableBar.pureDefault"))}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("mini")}
|
||||
onClick={() => changeSize("mini")}
|
||||
>
|
||||
紧凑
|
||||
{transformI18n($t("tableBar.pureSmall"))}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
)
|
||||
@@ -237,8 +237,10 @@ export default defineComponent({
|
||||
const reference = {
|
||||
reference: () => (
|
||||
<SettingIcon
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
v-tippy={rendTippyProps("列设置")}
|
||||
class={["w-4", iconClass.value]}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureColumnSettings"))
|
||||
)}
|
||||
/>
|
||||
)
|
||||
};
|
||||
@@ -257,25 +259,27 @@ export default defineComponent({
|
||||
: "mt-2"
|
||||
]}
|
||||
>
|
||||
<div class="flex justify-between w-full h-[60px] p-4">
|
||||
<div class="flex justify-between w-full h-15 p-4">
|
||||
{slots?.title ? (
|
||||
slots.title()
|
||||
) : (
|
||||
<p class="font-bold truncate">{props.title}</p>
|
||||
<p class="font-bold truncate">{transformI18n(props.title)}</p>
|
||||
)}
|
||||
<div class="flex items-center justify-around">
|
||||
<div class="flex-ac">
|
||||
{slots?.buttons ? (
|
||||
<div class="flex mr-4">{slots.buttons()}</div>
|
||||
) : null}
|
||||
{props.tree ? (
|
||||
<>
|
||||
<ExpandIcon
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
class={["w-4", iconClass.value]}
|
||||
style={{
|
||||
transform: isExpandAll.value ? "none" : "rotate(-90deg)"
|
||||
}}
|
||||
v-tippy={rendTippyProps(
|
||||
isExpandAll.value ? "折叠" : "展开"
|
||||
isExpandAll.value
|
||||
? transformI18n($t("tableBar.pureCollapse"))
|
||||
: transformI18n($t("tableBar.pureExpand"))
|
||||
)}
|
||||
onClick={() => onExpand()}
|
||||
/>
|
||||
@@ -284,20 +288,24 @@ export default defineComponent({
|
||||
) : null}
|
||||
<RefreshIcon
|
||||
class={[
|
||||
"w-[16px]",
|
||||
"w-4",
|
||||
iconClass.value,
|
||||
loading.value ? "animate-spin" : ""
|
||||
]}
|
||||
v-tippy={rendTippyProps("刷新")}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureRefresh"))
|
||||
)}
|
||||
onClick={() => onReFresh()}
|
||||
/>
|
||||
<el-divider direction="vertical" />
|
||||
<el-dropdown
|
||||
v-slots={dropdown}
|
||||
trigger="click"
|
||||
v-tippy={rendTippyProps("密度")}
|
||||
v-tippy={rendTippyProps(
|
||||
transformI18n($t("tableBar.pureDensity"))
|
||||
)}
|
||||
>
|
||||
<CollapseIcon class={["w-[16px]", iconClass.value]} />
|
||||
<CollapseIcon class={["w-4", iconClass.value]} />
|
||||
</el-dropdown>
|
||||
<el-divider direction="vertical" />
|
||||
|
||||
@@ -311,17 +319,17 @@ export default defineComponent({
|
||||
<div class={[topClass.value]}>
|
||||
<el-checkbox
|
||||
class="-mr-1!"
|
||||
label="列展示"
|
||||
label={transformI18n($t("tableBar.pureColumnDisplay"))}
|
||||
v-model={checkAll.value}
|
||||
indeterminate={isIndeterminate.value}
|
||||
onChange={value => handleCheckAllChange(value)}
|
||||
/>
|
||||
<el-button type="primary" link onClick={() => onReset()}>
|
||||
重置
|
||||
{transformI18n($t("tableBar.pureReset"))}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="pt-[6px] pl-[11px]">
|
||||
<div class="pt-1.5 pl-2.75">
|
||||
<el-scrollbar max-height="36vh">
|
||||
<el-checkbox-group
|
||||
ref={`VxeGroupRef${unref(props.tableKey)}`}
|
||||
@@ -338,7 +346,7 @@ export default defineComponent({
|
||||
<div class="flex items-center">
|
||||
<DragIcon
|
||||
class={[
|
||||
"drag-btn w-[16px] mr-2",
|
||||
"drag-btn w-4 mr-2",
|
||||
isFixedColumn(item)
|
||||
? "cursor-no-drop!"
|
||||
: "cursor-grab!"
|
||||
@@ -355,7 +363,7 @@ export default defineComponent({
|
||||
>
|
||||
<span
|
||||
title={transformI18n(item)}
|
||||
class="inline-block w-[120px] truncate hover:text-text_color_primary"
|
||||
class="inline-block w-30 truncate hover:text-text_color_primary"
|
||||
>
|
||||
{transformI18n(item)}
|
||||
</span>
|
||||
@@ -371,9 +379,13 @@ export default defineComponent({
|
||||
<el-divider direction="vertical" />
|
||||
|
||||
<iconifyIconOffline
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
class={["w-4", iconClass.value]}
|
||||
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||
v-tippy={
|
||||
isFullscreen.value
|
||||
? transformI18n($t("tableBar.pureExitFullScreen"))
|
||||
: transformI18n($t("tableBar.pureFullScreen"))
|
||||
}
|
||||
onClick={() => onFullscreen()}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -10,8 +10,10 @@ export interface RippleOptions {
|
||||
circle?: boolean;
|
||||
}
|
||||
|
||||
export interface RippleDirectiveBinding
|
||||
extends Omit<DirectiveBinding, "modifiers" | "value"> {
|
||||
export interface RippleDirectiveBinding extends Omit<
|
||||
DirectiveBinding,
|
||||
"modifiers" | "value"
|
||||
> {
|
||||
value?: boolean | { class: string };
|
||||
modifiers: {
|
||||
center?: boolean;
|
||||
|
||||
@@ -65,7 +65,7 @@ watch(
|
||||
</script>
|
||||
<template>
|
||||
<template v-for="[fullPath, Comp] in compList" :key="fullPath">
|
||||
<div v-show="fullPath === currRoute.fullPath" class="w-full h-full">
|
||||
<div v-show="fullPath === currRoute.fullPath" class="size-full">
|
||||
<slot
|
||||
:fullPath="fullPath"
|
||||
:Comp="Comp"
|
||||
@@ -73,7 +73,7 @@ watch(
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<div v-show="!keep" class="w-full h-full">
|
||||
<div v-show="!keep" class="size-full">
|
||||
<slot :Comp="normalComp" :fullPath="currRoute.fullPath" frameInfo />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -33,7 +33,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="navbar bg-[#fff] shadow-xs shadow-[rgba(0,21,41,0.08)]">
|
||||
<div class="navbar bg-white shadow-xs shadow-[rgba(0,21,41,0.08)]">
|
||||
<LaySidebarTopCollapse
|
||||
v-if="device === 'mobile'"
|
||||
class="hamburger-container"
|
||||
@@ -53,9 +53,11 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
<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"
|
||||
/>
|
||||
<div
|
||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
>
|
||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="translation">
|
||||
<el-dropdown-item
|
||||
@@ -113,7 +115,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<span
|
||||
class="set-icon navbar-bg-hover"
|
||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
:title="t('buttons.pureOpenSystemSet')"
|
||||
@click="onPanel"
|
||||
>
|
||||
@@ -172,7 +174,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
}
|
||||
|
||||
.translation {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
padding: 5px 40px;
|
||||
}
|
||||
|
||||
@@ -190,7 +192,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
.logout {
|
||||
width: 120px;
|
||||
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
min-width: 100%;
|
||||
|
||||
@@ -49,7 +49,7 @@ function hoverDescription(event, description) {
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="notice-container border-0 border-b-[1px] border-solid border-[#f0f0f0] dark:border-[#303030]"
|
||||
class="notice-container border-0 border-b border-solid border-[#f0f0f0] dark:border-[#303030]"
|
||||
>
|
||||
<el-avatar
|
||||
v-if="noticeItem.avatar"
|
||||
|
||||
@@ -3,15 +3,12 @@ import { useI18n } from "vue-i18n";
|
||||
import { ref, computed } from "vue";
|
||||
import { noticesData } from "./data";
|
||||
import NoticeList from "./components/NoticeList.vue";
|
||||
import BellIcon from "~icons/ep/bell";
|
||||
import BellIcon from "~icons/lucide/bell";
|
||||
|
||||
const { t } = useI18n();
|
||||
const noticesNum = ref(0);
|
||||
const notices = ref(noticesData);
|
||||
const activeKey = ref(noticesData[0]?.key);
|
||||
|
||||
notices.value.map(v => (noticesNum.value += v.list.length));
|
||||
|
||||
const getLabel = computed(
|
||||
() => item =>
|
||||
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
||||
@@ -21,14 +18,9 @@ const getLabel = computed(
|
||||
<template>
|
||||
<el-dropdown trigger="click" placement="bottom-end">
|
||||
<span
|
||||
:class="[
|
||||
'dropdown-badge',
|
||||
'navbar-bg-hover',
|
||||
'select-none',
|
||||
Number(noticesNum) !== 0 && 'mr-[10px]'
|
||||
]"
|
||||
:class="['dropdown-badge', 'navbar-bg-hover', 'select-none', 'mr-1.75']"
|
||||
>
|
||||
<el-badge :value="Number(noticesNum) === 0 ? '' : noticesNum" :max="99">
|
||||
<el-badge is-dot>
|
||||
<span class="header-notice-icon">
|
||||
<IconifyIconOffline :icon="BellIcon" />
|
||||
</span>
|
||||
@@ -65,6 +57,34 @@ const getLabel = computed(
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* ”铃铛“摇晃衰减动画 */
|
||||
@keyframes pure-bell-ring {
|
||||
0%,
|
||||
100% {
|
||||
transform-origin: top;
|
||||
}
|
||||
|
||||
15% {
|
||||
transform: rotateZ(10deg);
|
||||
}
|
||||
|
||||
30% {
|
||||
transform: rotateZ(-10deg);
|
||||
}
|
||||
|
||||
45% {
|
||||
transform: rotateZ(5deg);
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: rotateZ(-5deg);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: rotateZ(2deg);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -74,7 +94,13 @@ const getLabel = computed(
|
||||
cursor: pointer;
|
||||
|
||||
.header-notice-icon {
|
||||
font-size: 18px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.header-notice-icon svg {
|
||||
animation: pure-bell-ring 1s both;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,13 +11,10 @@ const show = ref<Boolean>(false);
|
||||
|
||||
const iconClass = computed(() => {
|
||||
return [
|
||||
"w-[22px]",
|
||||
"h-[22px]",
|
||||
"flex",
|
||||
"justify-center",
|
||||
"items-center",
|
||||
"size-5.5",
|
||||
"flex-c",
|
||||
"outline-hidden",
|
||||
"rounded-[4px]",
|
||||
"rounded-sm",
|
||||
"cursor-pointer",
|
||||
"transition-colors",
|
||||
"hover:bg-[#0000000f]",
|
||||
@@ -51,7 +48,7 @@ onBeforeUnmount(() => {
|
||||
<div class="right-panel-background" />
|
||||
<div ref="target" class="right-panel bg-bg_color">
|
||||
<div
|
||||
class="project-configuration border-0 border-b-[1px] border-solid border-[var(--pure-border-color)]"
|
||||
class="flex-bc py-3 px-5 border-0 border-l border-solid border-(--pure-border-color)"
|
||||
>
|
||||
<h4 class="dark:text-white">
|
||||
{{ t("panel.pureSystemSet") }}
|
||||
@@ -73,12 +70,14 @@ onBeforeUnmount(() => {
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<el-scrollbar>
|
||||
<el-scrollbar
|
||||
class="border-y border-l border-r-0 border-solid border-(--pure-border-color) h-[calc(100vh-104px)]!"
|
||||
>
|
||||
<slot />
|
||||
</el-scrollbar>
|
||||
|
||||
<div
|
||||
class="flex justify-end p-3 border-0 border-t-[1px] border-solid border-[var(--pure-border-color)]"
|
||||
class="flex justify-end p-3 border-0 border-l border-solid border-(--pure-border-color)"
|
||||
>
|
||||
<el-button
|
||||
v-tippy="{
|
||||
@@ -99,10 +98,6 @@ onBeforeUnmount(() => {
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-scrollbar) {
|
||||
height: calc(100vh - 110px);
|
||||
}
|
||||
|
||||
.right-panel-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -139,11 +134,4 @@ onBeforeUnmount(() => {
|
||||
transform: translate(0);
|
||||
}
|
||||
}
|
||||
|
||||
.project-configuration {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 14px 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -34,12 +34,12 @@ function handleDelete(item) {
|
||||
<IconifyIconOffline
|
||||
v-show="item.type === 'history'"
|
||||
:icon="StarIcon"
|
||||
class="w-[18px] h-[18px] mr-2 hover:text-[#d7d5d4]"
|
||||
class="size-4.5 mr-2 hover:text-[#d7d5d4]"
|
||||
@click.stop="handleCollect(item)"
|
||||
/>
|
||||
<IconifyIconOffline
|
||||
:icon="CloseIcon"
|
||||
class="w-[18px] h-[18px] hover:text-[#d7d5d4] cursor-pointer"
|
||||
class="size-4.5 hover:text-[#d7d5d4] cursor-pointer"
|
||||
@click.stop="handleDelete(item)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -297,10 +297,7 @@ onKeyStroke("ArrowDown", handleDown);
|
||||
@input="handleSearch"
|
||||
>
|
||||
<template #prefix>
|
||||
<IconifyIconOffline
|
||||
:icon="SearchIcon"
|
||||
class="text-primary w-[24px] h-[24px]"
|
||||
/>
|
||||
<IconifyIconOffline :icon="SearchIcon" class="text-primary size-6" />
|
||||
</template>
|
||||
</el-input>
|
||||
<div class="search-content">
|
||||
|
||||
@@ -11,7 +11,7 @@ function handleSearch() {
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
|
||||
class="search-container w-10 h-12 flex-c cursor-pointer navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
@click="handleSearch"
|
||||
>
|
||||
<IconifyIconOffline icon="ri/search-line" />
|
||||
|
||||
@@ -37,7 +37,7 @@ const horizontalRef = ref();
|
||||
|
||||
const {
|
||||
dataTheme,
|
||||
overallStyle,
|
||||
themeMode,
|
||||
layoutTheme,
|
||||
themeColors,
|
||||
toggleClass,
|
||||
@@ -50,7 +50,7 @@ if (unref(layoutTheme)) {
|
||||
const layout = unref(layoutTheme).layout;
|
||||
const theme = unref(layoutTheme).theme;
|
||||
document.documentElement.setAttribute("data-theme", theme);
|
||||
setLayoutModel(layout);
|
||||
setMenuLayout(layout);
|
||||
}
|
||||
|
||||
/** 默认灵动模式 */
|
||||
@@ -189,30 +189,30 @@ const getThemeColor = computed(() => {
|
||||
});
|
||||
|
||||
const pClass = computed(() => {
|
||||
return ["mb-[12px]!", "font-medium", "text-sm", "dark:text-white"];
|
||||
return ["mb-3!", "font-medium", "text-sm", "dark:text-white"];
|
||||
});
|
||||
|
||||
const themeOptions = computed<Array<OptionsType>>(() => {
|
||||
return [
|
||||
{
|
||||
label: t("panel.pureOverallStyleLight"),
|
||||
label: t("panel.pureThemeModeLight"),
|
||||
icon: DayIcon,
|
||||
theme: "light",
|
||||
tip: t("panel.pureOverallStyleLightTip"),
|
||||
tip: t("panel.pureThemeModeLightTip"),
|
||||
iconAttrs: { fill: isDark.value ? "#fff" : "#000" }
|
||||
},
|
||||
{
|
||||
label: t("panel.pureOverallStyleDark"),
|
||||
label: t("panel.pureThemeModeDark"),
|
||||
icon: DarkIcon,
|
||||
theme: "dark",
|
||||
tip: t("panel.pureOverallStyleDarkTip"),
|
||||
tip: t("panel.pureThemeModeDarkTip"),
|
||||
iconAttrs: { fill: isDark.value ? "#fff" : "#000" }
|
||||
},
|
||||
{
|
||||
label: t("panel.pureOverallStyleSystem"),
|
||||
label: t("panel.pureThemeModeSystem"),
|
||||
icon: SystemIcon,
|
||||
theme: "system",
|
||||
tip: t("panel.pureOverallStyleSystemTip"),
|
||||
tip: t("panel.pureThemeModeSystemTip"),
|
||||
iconAttrs: { fill: isDark.value ? "#fff" : "#000" }
|
||||
}
|
||||
];
|
||||
@@ -238,8 +238,8 @@ const markOptions = computed<Array<OptionsType>>(() => {
|
||||
];
|
||||
});
|
||||
|
||||
/** 设置导航模式 */
|
||||
function setLayoutModel(layout: string) {
|
||||
/** 设置菜单布局 */
|
||||
function setMenuLayout(layout: string) {
|
||||
layoutTheme.value.layout = layout;
|
||||
window.document.body.setAttribute("layout", layout);
|
||||
$storage.layout = {
|
||||
@@ -249,7 +249,7 @@ function setLayoutModel(layout: string) {
|
||||
sidebarStatus: $storage.layout?.sidebarStatus,
|
||||
epThemeColor: $storage.layout?.epThemeColor,
|
||||
themeColor: $storage.layout?.themeColor,
|
||||
overallStyle: $storage.layout?.overallStyle
|
||||
themeMode: $storage.layout?.themeMode
|
||||
};
|
||||
useAppStoreHook().setLayout(layout);
|
||||
}
|
||||
@@ -276,15 +276,15 @@ watch($storage, ({ layout }) => {
|
||||
|
||||
const mediaQueryList = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
|
||||
/** 根据操作系统主题设置平台整体风格 */
|
||||
/** 根据操作系统主题设置平台主题模式 */
|
||||
function updateTheme() {
|
||||
if (overallStyle.value !== "system") return;
|
||||
if (themeMode.value !== "system") return;
|
||||
if (mediaQueryList.matches) {
|
||||
dataTheme.value = true;
|
||||
} else {
|
||||
dataTheme.value = false;
|
||||
}
|
||||
dataThemeChange(overallStyle.value);
|
||||
dataThemeChange(themeMode.value);
|
||||
}
|
||||
|
||||
function removeMatchMedia() {
|
||||
@@ -317,18 +317,18 @@ onUnmounted(() => removeMatchMedia);
|
||||
<template>
|
||||
<LayPanel>
|
||||
<div class="p-5">
|
||||
<p :class="pClass">{{ t("panel.pureOverallStyle") }}</p>
|
||||
<p :class="pClass">{{ t("panel.pureThemeMode") }}</p>
|
||||
<Segmented
|
||||
resize
|
||||
class="select-none"
|
||||
:modelValue="overallStyle === 'system' ? 2 : dataTheme ? 1 : 0"
|
||||
:modelValue="themeMode === 'system' ? 2 : dataTheme ? 1 : 0"
|
||||
:options="themeOptions"
|
||||
@change="
|
||||
theme => {
|
||||
theme.index === 1 && theme.index !== 2
|
||||
? (dataTheme = true)
|
||||
: (dataTheme = false);
|
||||
overallStyle = theme.option.theme;
|
||||
themeMode = theme.option.theme;
|
||||
dataThemeChange(theme.option.theme);
|
||||
theme.index === 2 && watchSystemThemeChange();
|
||||
}
|
||||
@@ -345,8 +345,8 @@ onUnmounted(() => removeMatchMedia);
|
||||
@click="setLayoutThemeColor(item.themeColor)"
|
||||
>
|
||||
<el-icon
|
||||
style="margin: 0.1em 0.1em 0 0"
|
||||
:size="17"
|
||||
class="mt-px"
|
||||
:size="20"
|
||||
:color="getThemeColor(item.themeColor)"
|
||||
>
|
||||
<IconifyIconOffline :icon="Check" />
|
||||
@@ -354,7 +354,7 @@ onUnmounted(() => removeMatchMedia);
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p :class="['mt-5!', pClass]">{{ t("panel.pureLayoutModel") }}</p>
|
||||
<p :class="['mt-5!', pClass]">{{ t("panel.pureMenuLayout") }}</p>
|
||||
<ul class="pure-theme">
|
||||
<li
|
||||
ref="verticalRef"
|
||||
@@ -363,7 +363,7 @@ onUnmounted(() => removeMatchMedia);
|
||||
zIndex: 41000
|
||||
}"
|
||||
:class="layoutTheme.layout === 'vertical' ? 'is-select' : ''"
|
||||
@click="setLayoutModel('vertical')"
|
||||
@click="setMenuLayout('vertical')"
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
@@ -376,7 +376,7 @@ onUnmounted(() => removeMatchMedia);
|
||||
zIndex: 41000
|
||||
}"
|
||||
:class="layoutTheme.layout === 'horizontal' ? 'is-select' : ''"
|
||||
@click="setLayoutModel('horizontal')"
|
||||
@click="setMenuLayout('horizontal')"
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
@@ -389,7 +389,7 @@ onUnmounted(() => removeMatchMedia);
|
||||
zIndex: 41000
|
||||
}"
|
||||
:class="layoutTheme.layout === 'mix' ? 'is-select' : ''"
|
||||
@click="setLayoutModel('mix')"
|
||||
@click="setMenuLayout('mix')"
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
@@ -416,7 +416,7 @@ onUnmounted(() => removeMatchMedia);
|
||||
<button
|
||||
v-else
|
||||
v-ripple="{ class: 'text-gray-300' }"
|
||||
class="bg-transparent flex-c w-full h-20 rounded-md border border-[var(--pure-border-color)]"
|
||||
class="bg-transparent flex-c w-full h-20 rounded-md border border-(--pure-border-color)"
|
||||
@click="setStretch(!settings.stretch)"
|
||||
>
|
||||
<div
|
||||
@@ -538,17 +538,24 @@ onUnmounted(() => removeMatchMedia);
|
||||
}
|
||||
|
||||
.theme-color {
|
||||
height: 20px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
|
||||
li {
|
||||
float: left;
|
||||
height: 20px;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
box-shadow: rgb(0 0 0 / 15%) 0 0 0 1px inset;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:nth-child(1) {
|
||||
border: 1px solid #ddd;
|
||||
&:hover {
|
||||
box-shadow:
|
||||
rgb(0 0 0 / 25%) 0 0 0 1px inset,
|
||||
0 2px 4px rgb(0 0 0 / 15%);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,9 +83,11 @@ onMounted(() => {
|
||||
<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"
|
||||
/>
|
||||
<div
|
||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
>
|
||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="translation">
|
||||
<el-dropdown-item
|
||||
@@ -141,7 +143,7 @@ onMounted(() => {
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<span
|
||||
class="set-icon navbar-bg-hover"
|
||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
:title="t('buttons.pureOpenSystemSet')"
|
||||
@click="onPanel"
|
||||
>
|
||||
@@ -157,7 +159,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.translation {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
padding: 5px 40px;
|
||||
}
|
||||
|
||||
@@ -175,7 +177,7 @@ onMounted(() => {
|
||||
.logout {
|
||||
width: 120px;
|
||||
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
min-width: 100%;
|
||||
|
||||
@@ -104,9 +104,11 @@ watch(
|
||||
<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"
|
||||
/>
|
||||
<div
|
||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
>
|
||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="translation">
|
||||
<el-dropdown-item
|
||||
@@ -162,7 +164,7 @@ watch(
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<span
|
||||
class="set-icon navbar-bg-hover"
|
||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
:title="t('buttons.pureOpenSystemSet')"
|
||||
@click="onPanel"
|
||||
>
|
||||
@@ -178,7 +180,7 @@ watch(
|
||||
}
|
||||
|
||||
.translation {
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
padding: 5px 40px;
|
||||
}
|
||||
|
||||
@@ -196,7 +198,7 @@ watch(
|
||||
.logout {
|
||||
width: 120px;
|
||||
|
||||
::v-deep(.el-dropdown-menu__item) {
|
||||
:deep(.el-dropdown-menu__item) {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
min-width: 100%;
|
||||
|
||||
@@ -105,7 +105,7 @@ watch(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-breadcrumb class="leading-[50px]! select-none" separator="/">
|
||||
<el-breadcrumb class="leading-12.5! select-none" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item
|
||||
v-for="item in levelList"
|
||||
|
||||
@@ -18,7 +18,7 @@ const { t } = useI18n();
|
||||
const { tooltipEffect } = useNav();
|
||||
|
||||
const iconClass = computed(() => {
|
||||
return ["w-[16px]", "h-[16px]"];
|
||||
return ["size-4"];
|
||||
});
|
||||
|
||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||
|
||||
@@ -11,10 +11,7 @@ defineProps({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="extraIcon" class="flex justify-center items-center">
|
||||
<component
|
||||
:is="useRenderIcon(toRaw(extraIcon))"
|
||||
class="w-[30px] h-[30px]"
|
||||
/>
|
||||
<div v-if="extraIcon" class="flex-c">
|
||||
<component :is="useRenderIcon(toRaw(extraIcon))" class="size-7.5" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -24,7 +24,10 @@ watch(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span class="fullscreen-icon navbar-bg-hover" @click="toggle">
|
||||
<span
|
||||
class="fullscreen-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||
@click="toggle"
|
||||
>
|
||||
<IconifyIconOffline :icon="screenIcon" />
|
||||
</span>
|
||||
</template>
|
||||
|
||||
@@ -71,7 +71,7 @@ const textClass = computed(() => {
|
||||
((layout.value === "vertical" && item.parentId === null) ||
|
||||
(layout.value === "mix" && item.pathList.length === 2))
|
||||
) {
|
||||
return `${baseClass} min-w-[54px]! text-center! px-3!`;
|
||||
return `${baseClass} min-w-13.5! text-center! px-3!`;
|
||||
}
|
||||
return baseClass;
|
||||
});
|
||||
@@ -159,7 +159,7 @@ function resolvePath(routePath) {
|
||||
item?.pathList?.length === 2)
|
||||
"
|
||||
truncated
|
||||
class="w-full! px-3! min-w-[54px]! text-center! text-inherit!"
|
||||
class="w-full! px-3! min-w-13.5! text-center! text-inherit!"
|
||||
>
|
||||
{{ transformI18n(onlyOneChild.meta.title) }}
|
||||
</el-text>
|
||||
|
||||
@@ -21,12 +21,11 @@ const iconClass = computed(() => {
|
||||
return [
|
||||
"ml-4",
|
||||
"mb-1",
|
||||
"w-[16px]",
|
||||
"h-[16px]",
|
||||
"size-4",
|
||||
"inline-block!",
|
||||
"align-middle",
|
||||
"cursor-pointer",
|
||||
"duration-[100ms]"
|
||||
"duration-100"
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<svg class="w-full h-full">
|
||||
<svg class="size-full">
|
||||
<defs>
|
||||
<symbol id="geometry-left" viewBox="0 0 214 36">
|
||||
<path d="M17 0h197v36H0v-2c4.5 0 9-3.5 9-8V8c0-4.5 3.5-8 8-8z" />
|
||||
|
||||
@@ -321,10 +321,9 @@
|
||||
|
||||
.chrome-tab-divider {
|
||||
position: absolute;
|
||||
right: 7px;
|
||||
left: 7px;
|
||||
width: 1px;
|
||||
height: 14px;
|
||||
background-color: #2b2d2f;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
||||
@@ -618,6 +618,10 @@ onBeforeUnmount(() => {
|
||||
/>
|
||||
</template>
|
||||
<div v-else class="chrome-tab">
|
||||
<span
|
||||
v-if="index !== 0 && index !== activeIndex"
|
||||
class="chrome-tab-divider bg-[#e2e2e2] dark:bg-[#2d2d2d]"
|
||||
/>
|
||||
<div class="chrome-tab__bg">
|
||||
<TagChrome />
|
||||
</div>
|
||||
@@ -631,7 +635,6 @@ onBeforeUnmount(() => {
|
||||
>
|
||||
<IconifyIconOffline :icon="Close" />
|
||||
</span>
|
||||
<span class="chrome-tab-divider" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@ export function useDataThemeChange() {
|
||||
|
||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||
const dataTheme = ref<boolean>($storage?.layout?.darkMode);
|
||||
const overallStyle = ref<string>($storage?.layout?.overallStyle);
|
||||
const themeMode = ref<string>($storage?.layout?.themeMode);
|
||||
const body = document.documentElement as HTMLElement;
|
||||
|
||||
function toggleClass(flag: boolean, clsName: string, target?: HTMLElement) {
|
||||
@@ -59,7 +59,7 @@ export function useDataThemeChange() {
|
||||
sidebarStatus: $storage.layout?.sidebarStatus,
|
||||
epThemeColor: $storage.layout?.epThemeColor,
|
||||
themeColor: isClick ? theme : storageThemeColor,
|
||||
overallStyle: overallStyle.value
|
||||
themeMode: themeMode.value
|
||||
};
|
||||
|
||||
if (theme === "default" || theme === "light") {
|
||||
@@ -89,9 +89,9 @@ export function useDataThemeChange() {
|
||||
}
|
||||
};
|
||||
|
||||
/** 浅色、深色整体风格切换 */
|
||||
function dataThemeChange(overall?: string) {
|
||||
overallStyle.value = overall;
|
||||
/** 浅色、深色主题模式切换 */
|
||||
function dataThemeChange(mode?: string) {
|
||||
themeMode.value = mode;
|
||||
if (useEpThemeStoreHook().epTheme === "light" && dataTheme.value) {
|
||||
setLayoutThemeColor("default", false);
|
||||
} else {
|
||||
@@ -126,7 +126,7 @@ export function useDataThemeChange() {
|
||||
return {
|
||||
body,
|
||||
dataTheme,
|
||||
overallStyle,
|
||||
themeMode,
|
||||
layoutTheme,
|
||||
themeColors,
|
||||
onReset,
|
||||
|
||||
@@ -29,7 +29,7 @@ export function useLayout() {
|
||||
sidebarStatus: $config?.SidebarStatus ?? true,
|
||||
epThemeColor: $config?.EpThemeColor ?? "#409EFF",
|
||||
themeColor: $config?.Theme ?? "light",
|
||||
overallStyle: $config?.OverallStyle ?? "light"
|
||||
themeMode: $config?.ThemeMode ?? "light"
|
||||
};
|
||||
}
|
||||
/** 灰色模式、色弱模式、隐藏标签页 */
|
||||
|
||||
@@ -67,16 +67,16 @@ const set: setType = reactive({
|
||||
})
|
||||
});
|
||||
|
||||
function setTheme(layoutModel: string) {
|
||||
window.document.body.setAttribute("layout", layoutModel);
|
||||
function setTheme(menuLayout: string) {
|
||||
window.document.body.setAttribute("layout", menuLayout);
|
||||
$storage.layout = {
|
||||
layout: `${layoutModel}`,
|
||||
layout: `${menuLayout}`,
|
||||
theme: $storage.layout?.theme,
|
||||
darkMode: $storage.layout?.darkMode,
|
||||
sidebarStatus: $storage.layout?.sidebarStatus,
|
||||
epThemeColor: $storage.layout?.epThemeColor,
|
||||
themeColor: $storage.layout?.themeColor,
|
||||
overallStyle: $storage.layout?.overallStyle
|
||||
themeMode: $storage.layout?.themeMode
|
||||
};
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
onBeforeMount(() => {
|
||||
useDataThemeChange().dataThemeChange($storage.layout?.overallStyle);
|
||||
useDataThemeChange().dataThemeChange($storage.layout?.themeMode);
|
||||
});
|
||||
|
||||
const LayHeader = defineComponent({
|
||||
|
||||
@@ -209,18 +209,26 @@ function initRouter() {
|
||||
});
|
||||
} else {
|
||||
return new Promise(resolve => {
|
||||
getAsyncRoutes().then(({ data }) => {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
storageLocal().setItem(key, data);
|
||||
resolve(router);
|
||||
getAsyncRoutes().then(({ code, data }) => {
|
||||
if (code === 0) {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
storageLocal().setItem(key, data);
|
||||
resolve(router);
|
||||
} else {
|
||||
resolve(router);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return new Promise(resolve => {
|
||||
getAsyncRoutes().then(({ data }) => {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
resolve(router);
|
||||
getAsyncRoutes().then(({ code, data }) => {
|
||||
if (code === 0) {
|
||||
handleAsyncRoutes(cloneDeep(data));
|
||||
resolve(router);
|
||||
} else {
|
||||
resolve(router);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export const useAppStore = defineStore("pure-app", {
|
||||
withoutAnimation: false,
|
||||
isClickCollapse: false
|
||||
},
|
||||
// 这里的layout用于监听容器拖拉后恢复对应的导航模式
|
||||
// 这里的layout用于监听容器拖拉后恢复对应的菜单布局
|
||||
layout:
|
||||
storageLocal().getItem<StorageConfigs>(
|
||||
`${responsiveStorageNameSpace()}layout`
|
||||
|
||||
@@ -21,7 +21,7 @@ export const useEpThemeStore = defineStore("pure-epTheme", {
|
||||
getEpThemeColor(state) {
|
||||
return state.epThemeColor;
|
||||
},
|
||||
/** 用于mix导航模式下hamburger-svg的fill属性 */
|
||||
/** 用于mix菜单布局下hamburger-svg的fill属性 */
|
||||
fill(state) {
|
||||
if (state.epTheme === "light") {
|
||||
return "#409eff";
|
||||
|
||||
@@ -80,8 +80,12 @@ export const useUserStore = defineStore("pure-user", {
|
||||
return new Promise<UserResult>((resolve, reject) => {
|
||||
getLogin(data)
|
||||
.then(data => {
|
||||
if (data?.success) setToken(data.data);
|
||||
resolve(data);
|
||||
if (data.code === 0) {
|
||||
setToken(data.data);
|
||||
resolve(data);
|
||||
} else {
|
||||
reject(data.message);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
reject(error);
|
||||
@@ -103,9 +107,11 @@ export const useUserStore = defineStore("pure-user", {
|
||||
return new Promise<RefreshTokenResult>((resolve, reject) => {
|
||||
refreshTokenApi(data)
|
||||
.then(data => {
|
||||
if (data) {
|
||||
if (data.code === 0) {
|
||||
setToken(data.data);
|
||||
resolve(data);
|
||||
} else {
|
||||
reject(data.message);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
@@ -135,17 +135,6 @@ html.dark {
|
||||
}
|
||||
}
|
||||
|
||||
/* 系统配置面板 */
|
||||
.right-panel-items {
|
||||
.el-divider__text {
|
||||
--el-bg-color: var(--el-bg-color);
|
||||
}
|
||||
|
||||
.el-divider--horizontal {
|
||||
border-top: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* 表单设计器 */
|
||||
.design-form {
|
||||
.el-main.config-content,
|
||||
|
||||
@@ -35,3 +35,18 @@
|
||||
.html-weakness {
|
||||
filter: invert(80%);
|
||||
}
|
||||
|
||||
/* 轻微缩小,再恢复原状的平滑缩放动画 */
|
||||
@keyframes pure-scale-bounce {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(0.9);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,12 +34,14 @@
|
||||
}
|
||||
|
||||
.set-icon,
|
||||
.fullscreen-icon {
|
||||
.fullscreen-icon,
|
||||
.globalization-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 48px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -449,7 +451,7 @@
|
||||
/* 搜索 */
|
||||
.search-container,
|
||||
/* 国际化 */
|
||||
.globalization,
|
||||
.globalization-icon,
|
||||
/* 全屏 */
|
||||
.fullscreen-icon,
|
||||
/* 消息通知 */
|
||||
@@ -468,12 +470,8 @@
|
||||
color: var(--pure-theme-sub-menu-active-text);
|
||||
}
|
||||
|
||||
.globalization {
|
||||
width: 40px;
|
||||
height: 48px;
|
||||
padding: 11px;
|
||||
.globalization-icon {
|
||||
color: var(--pure-theme-sub-menu-active-text);
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@@ -630,7 +628,7 @@ body[layout="vertical"] {
|
||||
/* 搜索 */
|
||||
.search-container,
|
||||
/* 国际化 */
|
||||
.globalization,
|
||||
.globalization-icon,
|
||||
/* 全屏 */
|
||||
.fullscreen-icon,
|
||||
/* 消息通知 */
|
||||
|
||||
@@ -42,5 +42,9 @@
|
||||
}
|
||||
|
||||
@utility navbar-bg-hover {
|
||||
@apply dark:text-white dark:hover:bg-[#242424]!;
|
||||
@apply select-none dark:text-white dark:hover:bg-[#242424]!;
|
||||
}
|
||||
|
||||
@utility animate-scale-bounce {
|
||||
animation: pure-scale-bounce 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ import type {
|
||||
PureHttpRequestConfig
|
||||
} from "./types.d";
|
||||
import { stringify } from "qs";
|
||||
import { message } from "@/utils/message";
|
||||
import { $t, transformI18n } from "@/plugins/i18n";
|
||||
import { getToken, formatToken } from "@/utils/auth";
|
||||
import { useUserStoreHook } from "@/store/modules/user";
|
||||
|
||||
@@ -90,6 +92,13 @@ class PureHttp {
|
||||
PureHttp.requests.forEach(cb => cb(token));
|
||||
PureHttp.requests = [];
|
||||
})
|
||||
.catch(_err => {
|
||||
PureHttp.requests = [];
|
||||
useUserStoreHook().logOut();
|
||||
message(transformI18n($t("login.pureLoginExpired")), {
|
||||
type: "warning"
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
PureHttp.isRefreshing = false;
|
||||
});
|
||||
|
||||
6
src/utils/localforage/types.d.ts
vendored
6
src/utils/localforage/types.d.ts
vendored
@@ -65,8 +65,7 @@ interface LocalForageDbMethodsOptional {
|
||||
}
|
||||
|
||||
interface LocalForageDriverDbMethods
|
||||
extends LocalForageDbMethodsCore,
|
||||
LocalForageDriverMethodsOptional {}
|
||||
extends LocalForageDbMethodsCore, LocalForageDriverMethodsOptional {}
|
||||
|
||||
interface LocalForageDriverSupportFunc {
|
||||
(): Promise<boolean>;
|
||||
@@ -94,8 +93,7 @@ interface LocalForageSerializer {
|
||||
}
|
||||
|
||||
interface LocalForageDbMethods
|
||||
extends LocalForageDbMethodsCore,
|
||||
LocalForageDbMethodsOptional {}
|
||||
extends LocalForageDbMethodsCore, LocalForageDbMethodsOptional {}
|
||||
|
||||
export interface LocalForage extends LocalForageDbMethods {
|
||||
LOCALSTORAGE: string;
|
||||
|
||||
@@ -19,8 +19,8 @@ export const injectResponsiveStorage = (app: App, config: PlatformConfigs) => {
|
||||
darkMode: config.DarkMode ?? false,
|
||||
sidebarStatus: config.SidebarStatus ?? true,
|
||||
epThemeColor: config.EpThemeColor ?? "#409EFF",
|
||||
themeColor: config.Theme ?? "light", // 主题色(对应系统配置中的主题色,与theme不同的是它不会受到浅色、深色整体风格切换的影响,只会在手动点击主题色时改变)
|
||||
overallStyle: config.OverallStyle ?? "light" // 整体风格(浅色:light、深色:dark、自动:system)
|
||||
themeColor: config.Theme ?? "light", // 主题色(对应系统配置中的主题色,与theme不同的是它不会受到浅色、深色主题模式切换的影响,只会在手动点击主题色时改变)
|
||||
themeMode: config.ThemeMode ?? "light" // 主题模式(浅色:light、深色:dark、自动:system)
|
||||
},
|
||||
// 系统配置-界面显示
|
||||
configure: Storage.getData("configure", nameSpace) ?? {
|
||||
|
||||
@@ -76,7 +76,7 @@ function onReset() {
|
||||
immediate: true,
|
||||
timeout: 1000
|
||||
}"
|
||||
class="w-[200px]!"
|
||||
class="w-50!"
|
||||
clearable
|
||||
@clear="onInput"
|
||||
/>
|
||||
@@ -86,7 +86,7 @@ function onReset() {
|
||||
<el-input
|
||||
v-model="searchTwo"
|
||||
v-optimize="{ event: 'input', fn: onInputTwo, timeout: 400 }"
|
||||
class="w-[200px]!"
|
||||
class="w-50!"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
@@ -100,7 +100,7 @@ function onReset() {
|
||||
timeout: 400,
|
||||
params: { name: '小明', sex: '男' }
|
||||
}"
|
||||
class="w-[200px]!"
|
||||
class="w-50!"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
@@ -112,7 +112,7 @@ function onReset() {
|
||||
<el-input
|
||||
v-model="searchFour"
|
||||
v-optimize:throttle="{ event: 'input', fn: onInputFour, timeout: 1000 }"
|
||||
class="w-[200px]!"
|
||||
class="w-50!"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
@@ -125,7 +125,7 @@ function onReset() {
|
||||
fn: onInputFive,
|
||||
params: { name: '小明', sex: '男' }
|
||||
}"
|
||||
class="w-[200px]!"
|
||||
class="w-50!"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
@@ -134,7 +134,7 @@ function onReset() {
|
||||
|
||||
<div class="mb-2">
|
||||
文本复制指令(双击输入框内容即可复制)
|
||||
<el-input v-model="searchSix" v-copy="searchSix" class="w-[200px]!" />
|
||||
<el-input v-model="searchSix" v-copy="searchSix" class="w-50!" />
|
||||
</div>
|
||||
<div>
|
||||
文本复制指令(自定义触发事件,单击复制)
|
||||
|
||||
@@ -89,7 +89,7 @@ const exportExcel = () => {
|
||||
</el-link>
|
||||
</template>
|
||||
<el-button type="primary" @click="exportExcel">导出Excel</el-button>
|
||||
<div class="h-[25rem] mt-3">
|
||||
<div class="h-100 mt-3">
|
||||
<el-auto-resizer>
|
||||
<template #default="{ height, width }">
|
||||
<el-table-v2
|
||||
|
||||
@@ -39,12 +39,12 @@ const dataProps = {
|
||||
</template>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" class="mb-[20px]">
|
||||
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" class="mb-5">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<div class="card-header">普通树结构</div>
|
||||
</template>
|
||||
<div class="max-h-[550px] overflow-y-auto">
|
||||
<div class="max-h-137.5 overflow-y-auto">
|
||||
<el-tree
|
||||
:data="menusData"
|
||||
:props="dataProps"
|
||||
@@ -71,7 +71,7 @@ const dataProps = {
|
||||
<template #header>
|
||||
<div class="card-header">虚拟树结构</div>
|
||||
</template>
|
||||
<div class="max-h-[550px] overflow-y-auto">
|
||||
<div class="max-h-137.5 overflow-y-auto">
|
||||
<el-tree-v2
|
||||
:data="menusData"
|
||||
:props="dataProps"
|
||||
|
||||
@@ -59,7 +59,7 @@ const onPrint = () => {
|
||||
class="h-[calc(100vh-295px)]"
|
||||
:element-loading-text="t('status.pureLoad')"
|
||||
>
|
||||
<div class="flex justify-between items-center h-9">
|
||||
<div class="flex-bc h-9">
|
||||
<div v-if="showAllPages" class="font-medium ml-1.25 text-xl">
|
||||
共{{ pageCount }}页
|
||||
</div>
|
||||
@@ -74,7 +74,7 @@ const onPrint = () => {
|
||||
{{ currentPage }} / {{ pageCount }}
|
||||
</el-pagination>
|
||||
</div>
|
||||
<div class="w-[170px] flex-bc">
|
||||
<div class="w-42.5 flex-bc">
|
||||
<el-checkbox v-model="showAllPages" @change="showAllPagesChange">
|
||||
显示所有页面
|
||||
</el-checkbox>
|
||||
|
||||
@@ -83,7 +83,7 @@ const tableData: User[] = [
|
||||
<span class="font-medium">打印功能(报表、图表、图片)</span>
|
||||
<el-select
|
||||
v-model="value"
|
||||
class="w-[100px]! mr-2"
|
||||
class="w-25! mr-2"
|
||||
placeholder="Select"
|
||||
size="small"
|
||||
>
|
||||
@@ -131,7 +131,7 @@ const tableData: User[] = [
|
||||
border
|
||||
:data="tableData"
|
||||
:row-class-name="tableRowClassName"
|
||||
class="el-table w-full mt-[10px]"
|
||||
class="el-table w-full mt-2.5"
|
||||
>
|
||||
<el-table-column prop="date" label="Date" />
|
||||
<el-table-column prop="name" label="Name" />
|
||||
@@ -160,7 +160,7 @@ const tableData: User[] = [
|
||||
}"
|
||||
>
|
||||
<p class="font-medium text-lg text-center">Echart</p>
|
||||
<pieChart class="echart mt-[10px]" />
|
||||
<pieChart class="echart mt-2.5" />
|
||||
</el-col>
|
||||
|
||||
<el-col
|
||||
@@ -186,7 +186,7 @@ const tableData: User[] = [
|
||||
<img
|
||||
src="https://pure-admin-utils.netlify.app/logo.png"
|
||||
alt="avatars"
|
||||
class="img mt-[10px] m-auto"
|
||||
class="img mt-2.5 m-auto"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -46,19 +46,19 @@ const disabledClick = () => {
|
||||
</template>
|
||||
<el-row :gutter="20" justify="space-between">
|
||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||
<el-card shadow="hover" class="mb-2.5 text-center">
|
||||
<div class="font-bold">基础用法</div>
|
||||
<ReQrcode :text="qrcodeText" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||
<el-card shadow="hover" class="mb-2.5 text-center">
|
||||
<div class="font-bold">img标签</div>
|
||||
<ReQrcode :text="qrcodeText" tag="img" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||
<el-card shadow="hover" class="mb-2.5 text-center">
|
||||
<div class="font-bold">样式配置</div>
|
||||
<ReQrcode
|
||||
:text="qrcodeText"
|
||||
@@ -72,19 +72,19 @@ const disabledClick = () => {
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||
<el-card shadow="hover" class="mb-2.5 text-center">
|
||||
<div class="font-bold">点击事件</div>
|
||||
<ReQrcode :text="qrcodeText" @click="codeClick" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||
<el-card shadow="hover" class="mb-2.5 text-center">
|
||||
<div class="font-bold">异步内容</div>
|
||||
<ReQrcode :text="asyncTitle" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||
<el-card shadow="hover" class="mb-2.5 text-center">
|
||||
<div class="font-bold">失效</div>
|
||||
<ReQrcode
|
||||
:text="qrcodeText"
|
||||
@@ -94,7 +94,7 @@ const disabledClick = () => {
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||
<el-card shadow="hover" class="mb-2.5 text-center">
|
||||
<div class="font-bold">logo配置</div>
|
||||
<ReQrcode
|
||||
:text="qrcodeText"
|
||||
@@ -103,7 +103,7 @@ const disabledClick = () => {
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||
<el-card shadow="hover" class="mb-2.5 text-center">
|
||||
<div class="font-bold">logo样式</div>
|
||||
<ReQrcode
|
||||
:text="qrcodeText"
|
||||
@@ -118,7 +118,7 @@ const disabledClick = () => {
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||
<el-card shadow="hover" class="mb-2.5 text-center">
|
||||
<div class="font-bold">大小配置</div>
|
||||
<ReQrcode :text="qrcodeText" :width="100" />
|
||||
</el-card>
|
||||
|
||||
@@ -30,7 +30,7 @@ defineOptions({
|
||||
<el-button v-ripple type="warning">Warning</el-button>
|
||||
<el-button v-ripple type="danger">Danger</el-button>
|
||||
</el-space>
|
||||
<el-card v-ripple class="mb-5 w-[510px] select-none" shadow="hover">
|
||||
<el-card v-ripple class="mb-5 w-127.5 select-none" shadow="hover">
|
||||
卡片
|
||||
</el-card>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ function onFail() {
|
||||
代码位置 src/views/able/verify.vue
|
||||
</el-link>
|
||||
</template>
|
||||
<div class="bg-[rgba(15,23,42,0.2)] p-6 w-[360px]">
|
||||
<div class="bg-[rgba(15,23,42,0.2)] p-6 w-90">
|
||||
<Vcode :show="isShow" type="inside" @fail="onFail" @success="onSuccess" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -158,20 +158,20 @@ onBeforeUnmount(() => {
|
||||
v-if="curImg"
|
||||
:src="curImg"
|
||||
:preview-src-list="Array.of(curImg)"
|
||||
class="w-[180px] h-[180px] ml-2 rounded-[6px]"
|
||||
class="size-45 ml-2 rounded-md"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
id="canvas-container"
|
||||
v-loading="loading"
|
||||
element-loading-text="温馨提示:可左右拖拽图片并单击选取所需的帧图片"
|
||||
class="w-full h-[200px] overflow-hidden mt-6"
|
||||
class="w-full h-50 overflow-hidden mt-6"
|
||||
/>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep(.el-upload-dragger) {
|
||||
:deep(.el-upload-dragger) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 180px;
|
||||
|
||||
@@ -126,7 +126,7 @@ onBeforeUnmount(() => {
|
||||
<el-button plain @click="clear">清除整页水印</el-button>
|
||||
</el-space>
|
||||
|
||||
<div ref="local" class="w-1/2 h-[200px] border border-sky-500 mt-4" />
|
||||
<div ref="local" class="w-1/2 h-50 border border-sky-500 mt-4" />
|
||||
|
||||
<el-space wrap class="mt-6">
|
||||
<el-button
|
||||
@@ -194,9 +194,6 @@ onBeforeUnmount(() => {
|
||||
<el-button plain @click="clearLocal">清除局部水印</el-button>
|
||||
</el-space>
|
||||
|
||||
<div
|
||||
ref="preventLocal"
|
||||
class="w-1/2 h-[200px] border border-indigo-500 mt-4"
|
||||
/>
|
||||
<div ref="preventLocal" class="w-1/2 h-50 border border-indigo-500 mt-4" />
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
@@ -103,7 +103,7 @@ onBeforeUnmount(() => {
|
||||
</template>
|
||||
<div
|
||||
v-loading="loading"
|
||||
class="w-8/12 m-auto! mt-[20px]!"
|
||||
class="w-8/12 m-auto! mt-5!"
|
||||
element-loading-background="transparent"
|
||||
>
|
||||
<div ref="wavesurferRef" />
|
||||
@@ -112,7 +112,7 @@ onBeforeUnmount(() => {
|
||||
<h1 class="text-4xl mt-2!">{{ curTime }}</h1>
|
||||
<span class="text-[#81888f]">{{ totalTime }}</span>
|
||||
</div>
|
||||
<div v-show="totalTime" class="flex mt-2 w-[180px] justify-around m-auto">
|
||||
<div v-show="totalTime" class="flex mt-2 w-45 justify-around m-auto">
|
||||
<Rewind
|
||||
v-tippy="{
|
||||
content: '快退(可长按)',
|
||||
|
||||
@@ -37,12 +37,7 @@ function onClick(item) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
:class="[
|
||||
'min-w-[180px]',
|
||||
deviceDetection() ? 'max-w-[100%]' : 'max-w-[70%]'
|
||||
]"
|
||||
>
|
||||
<div :class="['min-w-45', deviceDetection() ? 'max-w-full' : 'max-w-[70%]']">
|
||||
<h3 class="my-8!">账户管理</h3>
|
||||
<div v-for="(item, index) in list" :key="index">
|
||||
<div class="flex items-center">
|
||||
|
||||
@@ -32,12 +32,7 @@ function onChange(val, item) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
:class="[
|
||||
'min-w-[180px]',
|
||||
deviceDetection() ? 'max-w-[100%]' : 'max-w-[70%]'
|
||||
]"
|
||||
>
|
||||
<div :class="['min-w-45', deviceDetection() ? 'max-w-full' : 'max-w-[70%]']">
|
||||
<h3 class="my-8!">偏好设置</h3>
|
||||
<div v-for="(item, index) in list" :key="index">
|
||||
<div class="flex items-center">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from "vue";
|
||||
import { formUpload } from "@/api/mock";
|
||||
import { message } from "@/utils/message";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { type UserInfo, getMine } from "@/api/user";
|
||||
import type { FormInstance, FormRules } from "element-plus";
|
||||
import ReCropperPreview from "@/components/ReCropperPreview";
|
||||
@@ -73,8 +73,8 @@ const handleSubmitImage = () => {
|
||||
files: new File([cropperBlob.value], "avatar")
|
||||
});
|
||||
formUpload(formData)
|
||||
.then(({ success, data }) => {
|
||||
if (success) {
|
||||
.then(({ code }) => {
|
||||
if (code === 0) {
|
||||
message("更新头像成功", { type: "success" });
|
||||
handleClose();
|
||||
} else {
|
||||
@@ -98,18 +98,16 @@ const onSubmit = async (formEl: FormInstance) => {
|
||||
});
|
||||
};
|
||||
|
||||
getMine().then(res => {
|
||||
Object.assign(userInfos, res.data);
|
||||
onMounted(async () => {
|
||||
const { code, data } = await getMine();
|
||||
if (code === 0) {
|
||||
Object.assign(userInfos, data);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
:class="[
|
||||
'min-w-[180px]',
|
||||
deviceDetection() ? 'max-w-[100%]' : 'max-w-[70%]'
|
||||
]"
|
||||
>
|
||||
<div :class="['min-w-45', deviceDetection() ? 'max-w-full' : 'max-w-[70%]']">
|
||||
<h3 class="my-8!">个人信息</h3>
|
||||
<el-form
|
||||
ref="userInfoFormRef"
|
||||
|
||||
@@ -55,11 +55,13 @@ const columns: TableColumnList = [
|
||||
|
||||
async function onSearch() {
|
||||
loading.value = true;
|
||||
const { data } = await getMineLogs();
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
const { code, data } = await getMineLogs();
|
||||
if (code === 0) {
|
||||
dataList.value = data.list;
|
||||
pagination.total = data.total;
|
||||
pagination.pageSize = data.pageSize;
|
||||
pagination.currentPage = data.currentPage;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
@@ -72,12 +74,7 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
:class="[
|
||||
'min-w-[180px]',
|
||||
deviceDetection() ? 'max-w-[100%]' : 'max-w-[70%]'
|
||||
]"
|
||||
>
|
||||
<div :class="['min-w-45', deviceDetection() ? 'max-w-full' : 'max-w-[70%]']">
|
||||
<h3 class="my-8!">安全日志</h3>
|
||||
<pure-table
|
||||
row-key="id"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { getMine } from "@/api/user";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ref, onBeforeMount } from "vue";
|
||||
import { ReText } from "@/components/ReText";
|
||||
import Profile from "./components/Profile.vue";
|
||||
import { ref, onMounted, onBeforeMount } from "vue";
|
||||
import Preferences from "./components/Preferences.vue";
|
||||
import SecurityLog from "./components/SecurityLog.vue";
|
||||
import { useGlobal, deviceDetection } from "@pureadmin/utils";
|
||||
@@ -25,7 +25,7 @@ const router = useRouter();
|
||||
const isOpen = ref(deviceDetection() ? false : true);
|
||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||
onBeforeMount(() => {
|
||||
useDataThemeChange().dataThemeChange($storage.layout?.overallStyle);
|
||||
useDataThemeChange().dataThemeChange($storage.layout?.themeMode);
|
||||
});
|
||||
|
||||
const userInfo = ref({
|
||||
@@ -61,8 +61,11 @@ const panes = [
|
||||
];
|
||||
const witchPane = ref("profile");
|
||||
|
||||
getMine().then(res => {
|
||||
userInfo.value = res.data;
|
||||
onMounted(async () => {
|
||||
const { code, data } = await getMine();
|
||||
if (code === 0) {
|
||||
userInfo.value = data;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -70,24 +73,24 @@ getMine().then(res => {
|
||||
<el-container class="h-full">
|
||||
<el-aside
|
||||
v-if="isOpen"
|
||||
class="pure-account-settings overflow-hidden px-2 dark:bg-(--el-bg-color)! border-r-[1px] border-[var(--pure-border-color)]"
|
||||
class="pure-account-settings overflow-hidden px-2 dark:bg-(--el-bg-color)! border-r border-(--pure-border-color)"
|
||||
:width="deviceDetection() ? '180px' : '240px'"
|
||||
>
|
||||
<el-menu :default-active="witchPane" class="pure-account-settings-menu">
|
||||
<div
|
||||
class="h-[50px]! text-[var(--pure-theme-menu-text)] cursor-pointer text-sm transition-all duration-300 ease-in-out hover:scale-105 will-change-transform transform-gpu origin-center hover:text-base! hover:text-[var(--pure-theme-menu-title-hover)]!"
|
||||
class="h-12.5! text-(--pure-theme-menu-text) cursor-pointer text-sm transition-all duration-300 ease-in-out hover:scale-105 will-change-transform transform-gpu origin-center hover:text-base! hover:text-(--pure-theme-menu-title-hover)!"
|
||||
@click="router.go(-1)"
|
||||
>
|
||||
<div
|
||||
class="h-full flex items-center px-[var(--el-menu-base-level-padding)]"
|
||||
class="h-full flex items-center px-(--el-menu-base-level-padding)"
|
||||
>
|
||||
<IconifyIconOffline :icon="leftLine" />
|
||||
<span class="ml-2">返回</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center ml-8 mt-4 mb-4">
|
||||
<div class="flex items-center ml-8 my-4">
|
||||
<el-avatar :size="48" :src="userInfo.avatar" />
|
||||
<div class="ml-4 flex flex-col max-w-[130px]">
|
||||
<div class="ml-4 flex flex-col max-w-32.5">
|
||||
<ReText class="font-bold self-baseline!">
|
||||
{{ userInfo.nickname }}
|
||||
</ReText>
|
||||
@@ -125,7 +128,7 @@ getMine().then(res => {
|
||||
/>
|
||||
<component
|
||||
:is="panes.find(item => item.key === witchPane).component"
|
||||
:class="[!deviceDetection() && 'ml-[120px]']"
|
||||
:class="[!deviceDetection() && 'ml-30']"
|
||||
/>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
@@ -36,6 +36,6 @@ watch(animate, () => {
|
||||
代码位置 src/views/components/animatecss.vue
|
||||
</el-link>
|
||||
</template>
|
||||
<ReAnimateSelector v-model="animate" class="w-[200px]!" />
|
||||
<ReAnimateSelector v-model="animate" class="w-50!" />
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
@@ -37,8 +37,8 @@ const handleChange = value => {
|
||||
</template>
|
||||
<el-row :gutter="24">
|
||||
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
|
||||
<div class="flex flex-col items-center justify-center">
|
||||
<span class="text-[var(--el-color-primary)]">
|
||||
<div class="flex-c flex-col">
|
||||
<span class="text-(--el-color-primary)">
|
||||
1. 二级联动(不带“全部”选项)
|
||||
<el-cascader
|
||||
v-model="selectedOptions1"
|
||||
@@ -66,8 +66,8 @@ const handleChange = value => {
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
|
||||
<div class="flex flex-col items-center justify-center mt-3">
|
||||
<span class="text-[var(--el-color-primary)]">
|
||||
<div class="flex-c flex-col mt-3">
|
||||
<span class="text-(--el-color-primary)">
|
||||
2. 二级联动(带有“全部”选项)
|
||||
<el-cascader
|
||||
v-model="selectedOptions3"
|
||||
@@ -95,8 +95,8 @@ const handleChange = value => {
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
|
||||
<div class="flex flex-col items-center justify-center mt-3">
|
||||
<span class="text-[var(--el-color-primary)]">
|
||||
<div class="flex-c flex-col mt-3">
|
||||
<span class="text-(--el-color-primary)">
|
||||
3. 三级联动(不带“全部”选项)
|
||||
<el-cascader
|
||||
v-model="selectedOptions2"
|
||||
@@ -126,8 +126,8 @@ const handleChange = value => {
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
|
||||
<div class="flex flex-col items-center justify-center mt-3">
|
||||
<span class="text-[var(--el-color-primary)]">
|
||||
<div class="flex-c flex-col mt-3">
|
||||
<span class="text-(--el-color-primary)">
|
||||
4. 三级联动(带"全部选项")
|
||||
<el-cascader
|
||||
v-model="selectedOptions4"
|
||||
|
||||
@@ -221,7 +221,7 @@ watch(size, val =>
|
||||
<div>可控制间距的按钮样式</div>
|
||||
<el-slider
|
||||
v-model="spaceSize"
|
||||
class="mb-2 w-[300px]!"
|
||||
class="mb-2 w-75!"
|
||||
:show-tooltip="false"
|
||||
:disabled="size === 'disabled'"
|
||||
/>
|
||||
|
||||
@@ -61,7 +61,7 @@ const handleChange = (val: string[]) => {
|
||||
<el-collapse
|
||||
ref="collapseRef"
|
||||
v-model="activeNames"
|
||||
class="w-[360px]"
|
||||
class="w-90"
|
||||
:accordion="radio === 'accordion' ? true : false"
|
||||
@change="handleChange"
|
||||
>
|
||||
|
||||
@@ -164,7 +164,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value"
|
||||
type="date"
|
||||
class="w-[160px]!"
|
||||
class="w-40!"
|
||||
placeholder="请选择"
|
||||
:disabled-date="disabledDate"
|
||||
:shortcuts="shortcuts"
|
||||
@@ -180,7 +180,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value1"
|
||||
type="week"
|
||||
class="w-[160px]!"
|
||||
class="w-40!"
|
||||
format="YYYY年第ww周"
|
||||
placeholder="选择某年中的某周"
|
||||
:size="dynamicSize"
|
||||
@@ -189,7 +189,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="month"
|
||||
class="w-[160px]!"
|
||||
class="w-40!"
|
||||
placeholder="选择某月"
|
||||
:size="dynamicSize"
|
||||
:disabled="size === 'disabled'"
|
||||
@@ -197,7 +197,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value3"
|
||||
type="year"
|
||||
class="w-[160px]!"
|
||||
class="w-40!"
|
||||
placeholder="选择某年"
|
||||
:size="dynamicSize"
|
||||
:disabled="size === 'disabled'"
|
||||
@@ -205,7 +205,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value4"
|
||||
type="dates"
|
||||
class="w-[160px]!"
|
||||
class="w-40!"
|
||||
placeholder="选择多个日期"
|
||||
:size="dynamicSize"
|
||||
:disabled="size === 'disabled'"
|
||||
@@ -216,7 +216,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value5"
|
||||
type="daterange"
|
||||
class="w-[240px]!"
|
||||
class="w-60!"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
@@ -261,7 +261,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value7"
|
||||
type="date"
|
||||
class="w-[160px]!"
|
||||
class="w-40!"
|
||||
placeholder="请选择日期"
|
||||
format="YYYY/MM/DD"
|
||||
:value-format="dateFormat"
|
||||
@@ -275,7 +275,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value8"
|
||||
type="date"
|
||||
class="w-[160px]!"
|
||||
class="w-40!"
|
||||
placeholder="请选择日期"
|
||||
:prefix-icon="useRenderIcon('twemoji:spiral-calendar')"
|
||||
:size="dynamicSize"
|
||||
|
||||
@@ -190,7 +190,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value"
|
||||
type="datetime"
|
||||
class="w-[200px]!"
|
||||
class="w-50!"
|
||||
placeholder="请选择日期时间"
|
||||
:shortcuts="shortcuts"
|
||||
:size="dynamicSize"
|
||||
@@ -213,7 +213,7 @@ watch(size, val =>
|
||||
<el-date-picker
|
||||
v-model="value1"
|
||||
type="datetime"
|
||||
class="w-[200px]!"
|
||||
class="w-50!"
|
||||
placeholder="请选择日期时间"
|
||||
format="YYYY/MM/DD hh:mm:ss"
|
||||
:value-format="datetimeFormat"
|
||||
@@ -241,7 +241,7 @@ watch(size, val =>
|
||||
<div class="mb-2 mt-4">
|
||||
弹出面板位置可控(如果弹出位置不足以完整展示面板会自动调整位置)
|
||||
</div>
|
||||
<el-space wrap class="w-[400px]">
|
||||
<el-space wrap class="w-100">
|
||||
<el-check-tag
|
||||
v-for="(tag, index) in checkTag"
|
||||
:key="index"
|
||||
|
||||
@@ -28,14 +28,14 @@ const newFormInline = ref(props.formInline);
|
||||
<el-form-item label="姓名">
|
||||
<el-input
|
||||
v-model="newFormInline.user"
|
||||
class="w-[220px]!"
|
||||
class="w-55!"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市">
|
||||
<el-select
|
||||
v-model="newFormInline.region"
|
||||
class="w-[220px]!"
|
||||
class="w-55!"
|
||||
placeholder="请选择城市"
|
||||
>
|
||||
<el-option label="上海" value="上海" />
|
||||
|
||||
@@ -18,5 +18,5 @@ const data = useVModel(props, "data", emit);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-input v-model="data" class="w-[220px]!" placeholder="请输入内容" />
|
||||
<el-input v-model="data" class="w-55!" placeholder="请输入内容" />
|
||||
</template>
|
||||
|
||||
@@ -28,14 +28,14 @@ const newFormInline = ref(props.formInline);
|
||||
<el-form-item label="姓名">
|
||||
<el-input
|
||||
v-model="newFormInline.user"
|
||||
class="w-[220px]!"
|
||||
class="w-55!"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市">
|
||||
<el-select
|
||||
v-model="newFormInline.region"
|
||||
class="w-[220px]!"
|
||||
class="w-55!"
|
||||
placeholder="请选择城市"
|
||||
>
|
||||
<el-option label="上海" value="上海" />
|
||||
|
||||
@@ -18,5 +18,5 @@ const data = useVModel(props, "data", emit);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-input v-model="data" class="w-[220px]!" placeholder="请输入内容" />
|
||||
<el-input v-model="data" class="w-55!" placeholder="请输入内容" />
|
||||
</template>
|
||||
|
||||
@@ -23,6 +23,6 @@ const icon = ref("ep:add-location");
|
||||
代码位置 src/views/components/icon-select.vue
|
||||
</el-link>
|
||||
</template>
|
||||
<IconSelect v-model="icon" class="w-[200px]" />
|
||||
<IconSelect v-model="icon" class="w-50" />
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
@@ -5,7 +5,7 @@ const value = ref(0);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="max-w-[600px] ml-4">
|
||||
<div class="max-w-150 ml-4">
|
||||
<el-slider v-model="value" show-input size="large" />
|
||||
<el-slider v-model="value" show-input />
|
||||
<el-slider v-model="value" show-input size="small" />
|
||||
|
||||
@@ -71,17 +71,17 @@ const settingTB: ContextProps = reactive({
|
||||
|
||||
.dv-a {
|
||||
padding-top: 30vh;
|
||||
color: rgba($color: dodgerblue, $alpha: 80%);
|
||||
color: rgb(30 144 255 / 80%);
|
||||
}
|
||||
|
||||
.dv-b {
|
||||
padding-top: 10vh;
|
||||
color: rgba($color: #000, $alpha: 80%);
|
||||
color: rgb(0 0 0 / 80%);
|
||||
}
|
||||
|
||||
.dv-c {
|
||||
padding-top: 18vh;
|
||||
color: rgba($color: #ce272d, $alpha: 80%);
|
||||
color: rgb(206 39 45 / 80%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -106,11 +106,11 @@ const swiperExample: any[] = [
|
||||
</template>
|
||||
<el-row :gutter="10">
|
||||
<el-col v-for="item in swiperExample" :key="item.id" :span="12">
|
||||
<h6 class="py-[16px]! text-base">{{ item.label }}</h6>
|
||||
<h6 class="py-4! text-base">{{ item.label }}</h6>
|
||||
<swiper v-bind="item.options">
|
||||
<swiper-slide v-for="i in 5" :key="i">
|
||||
<div
|
||||
class="flex justify-center items-center h-[240px] border border-[#999]"
|
||||
class="flex justify-center items-center h-60 border border-[#999]"
|
||||
>
|
||||
Slide{{ i }}
|
||||
</div>
|
||||
|
||||
@@ -91,7 +91,7 @@ const endTime = ref("");
|
||||
<el-time-picker
|
||||
v-model="value"
|
||||
placeholder="请选择时间"
|
||||
class="w-[140px]!"
|
||||
class="w-35!"
|
||||
:size="dynamicSize"
|
||||
:disabled="size === 'disabled'"
|
||||
/>
|
||||
@@ -100,7 +100,7 @@ const endTime = ref("");
|
||||
v-model="value1"
|
||||
arrow-control
|
||||
placeholder="请选择时间"
|
||||
class="w-[140px]!"
|
||||
class="w-35!"
|
||||
:size="dynamicSize"
|
||||
:disabled="size === 'disabled'"
|
||||
/>
|
||||
@@ -110,7 +110,7 @@ const endTime = ref("");
|
||||
<div class="mb-2">限制时间选择范围</div>
|
||||
<el-time-picker
|
||||
v-model="value2"
|
||||
class="w-[140px]!"
|
||||
class="w-35!"
|
||||
:disabled-hours="disabledHours"
|
||||
:disabled-minutes="disabledMinutes"
|
||||
:disabled-seconds="disabledSeconds"
|
||||
@@ -123,7 +123,7 @@ const endTime = ref("");
|
||||
<div class="mb-2">任意时间范围</div>
|
||||
<el-time-picker
|
||||
v-model="value3"
|
||||
class="w-[220px]!"
|
||||
class="w-55!"
|
||||
is-range
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
@@ -153,7 +153,7 @@ const endTime = ref("");
|
||||
<el-time-select
|
||||
v-model="value4"
|
||||
placeholder="请选择时间"
|
||||
class="w-[140px]!"
|
||||
class="w-35!"
|
||||
start="08:30"
|
||||
step="00:15"
|
||||
end="18:30"
|
||||
@@ -165,7 +165,7 @@ const endTime = ref("");
|
||||
<el-time-select
|
||||
v-model="value5"
|
||||
placeholder="请选择时间"
|
||||
class="w-[140px]!"
|
||||
class="w-35!"
|
||||
start="00:00"
|
||||
step="00:30"
|
||||
end="23:59"
|
||||
@@ -179,7 +179,7 @@ const endTime = ref("");
|
||||
<el-time-select
|
||||
v-model="startTime"
|
||||
placeholder="开始时间"
|
||||
class="w-[140px]!"
|
||||
class="w-35!"
|
||||
:max-time="endTime"
|
||||
start="08:30"
|
||||
step="00:15"
|
||||
@@ -190,7 +190,7 @@ const endTime = ref("");
|
||||
<el-time-select
|
||||
v-model="endTime"
|
||||
placeholder="结束时间"
|
||||
class="w-[140px]!"
|
||||
class="w-35!"
|
||||
:min-time="startTime"
|
||||
start="08:30"
|
||||
step="00:15"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user