Compare commits

..

2 Commits

Author SHA1 Message Date
xiaoxian521
97bd47efca chore: add better-tailwindcss/enforce-canonical-classes 2025-12-09 09:59:08 +08:00
xiaoxian521
d794c7965c perf: 根据tailwindcss推荐优化类名 2025-12-08 15:44:00 +08:00
23 changed files with 150 additions and 92 deletions

View File

@@ -5,6 +5,7 @@ import * as parserVue from "vue-eslint-parser";
import configPrettier from "eslint-config-prettier"; import configPrettier from "eslint-config-prettier";
import pluginPrettier from "eslint-plugin-prettier"; import pluginPrettier from "eslint-plugin-prettier";
import { defineConfig, globalIgnores } from "eslint/config"; import { defineConfig, globalIgnores } from "eslint/config";
import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
export default defineConfig([ export default defineConfig([
globalIgnores([ globalIgnores([
@@ -172,5 +173,20 @@ 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"
}
}
} }
]); ]);

View File

@@ -238,18 +238,4 @@ login:
purePassWordRuleReg: The password format should be any combination of 8-18 digits purePassWordRuleReg: The password format should be any combination of 8-18 digits
purePassWordSureReg: Please enter confirm password purePassWordSureReg: Please enter confirm password
purePassWordDifferentReg: The two passwords do not match! purePassWordDifferentReg: The two passwords do not match!
purePassWordUpdateReg: Password has been updated purePassWordUpdateReg: Password has been updated
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

View File

@@ -238,18 +238,4 @@ login:
purePassWordRuleReg: 密码格式应为8-18位数字、字母、符号的任意两种组合 purePassWordRuleReg: 密码格式应为8-18位数字、字母、符号的任意两种组合
purePassWordSureReg: 请输入确认密码 purePassWordSureReg: 请输入确认密码
purePassWordDifferentReg: 两次密码不一致! purePassWordDifferentReg: 两次密码不一致!
purePassWordUpdateReg: 修改密码成功 purePassWordUpdateReg: 修改密码成功
tableBar:
pureList: 列表
pureLarge: 宽松
pureDefault: 默认
pureSmall: 紧凑
pureColumnSettings: 列设置
pureCollapse: 折叠
pureExpand: 展开
pureRefresh: 刷新
pureDensity: 密度
pureColumnDisplay: 列展示
pureReset: 重置
pureExitFullScreen: 退出全屏
pureFullScreen: 全屏

View File

@@ -141,6 +141,7 @@
"dagre": "^0.8.5", "dagre": "^0.8.5",
"eslint": "^9.39.1", "eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-better-tailwindcss": "4.0.0-beta.6",
"eslint-plugin-prettier": "^5.5.4", "eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-vue": "^10.6.2", "eslint-plugin-vue": "^10.6.2",
"gradient-string": "^3.0.0", "gradient-string": "^3.0.0",

95
pnpm-lock.yaml generated
View File

@@ -285,6 +285,9 @@ importers:
eslint-config-prettier: eslint-config-prettier:
specifier: ^10.1.8 specifier: ^10.1.8
version: 10.1.8(eslint@9.39.1(jiti@2.6.1)) version: 10.1.8(eslint@9.39.1(jiti@2.6.1))
eslint-plugin-better-tailwindcss:
specifier: 4.0.0-beta.6
version: 4.0.0-beta.6(eslint@9.39.1(jiti@2.6.1))(tailwindcss@4.1.17)(typescript@5.9.3)
eslint-plugin-prettier: eslint-plugin-prettier:
specifier: ^5.5.4 specifier: ^5.5.4
version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1))(prettier@3.7.3) version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1))(prettier@3.7.3)
@@ -1053,6 +1056,10 @@ packages:
resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/css-tree@3.6.8':
resolution: {integrity: sha512-s0f40zY7dlMp8i0Jf0u6l/aSswS0WRAgkhgETgiCJRcxIWb4S/Sp9uScKHWbkM3BnoFLbJbmOYk5AZUDFVxaLA==}
engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
'@eslint/eslintrc@3.3.3': '@eslint/eslintrc@3.3.3':
resolution: {integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==} resolution: {integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -1914,6 +1921,11 @@ packages:
peerDependencies: peerDependencies:
'@uppy/core': ^2.3.3 '@uppy/core': ^2.3.3
'@valibot/to-json-schema@1.4.0':
resolution: {integrity: sha512-xziHfrrB6al8uoUI876eAYU5x+nZFYifCssYnxS/P7JYe9LjzeKWnqwb8Yno7ulL84Gp0ZNj2GUR+3GXtU8CZQ==}
peerDependencies:
valibot: ^1.2.0
'@vitejs/plugin-vue-jsx@5.1.2': '@vitejs/plugin-vue-jsx@5.1.2':
resolution: {integrity: sha512-3a2BOryRjG/Iih87x87YXz5c8nw27eSlHytvSKYfp8ZIsp5+FgFQoKeA7k2PnqWpjJrv6AoVTMnvmuKUXb771A==} resolution: {integrity: sha512-3a2BOryRjG/Iih87x87YXz5c8nw27eSlHytvSKYfp8ZIsp5+FgFQoKeA7k2PnqWpjJrv6AoVTMnvmuKUXb771A==}
engines: {node: ^20.19.0 || >=22.12.0} engines: {node: ^20.19.0 || >=22.12.0}
@@ -2943,6 +2955,13 @@ packages:
peerDependencies: peerDependencies:
eslint: '>=7.0.0' eslint: '>=7.0.0'
eslint-plugin-better-tailwindcss@4.0.0-beta.6:
resolution: {integrity: sha512-DBtvXwoDLM7xve7/HsT8Y6B1h5DsyUPoUo0eEHRxTCnsXiC7b/CM4JIOHOV7T1lEcQ+KxW6VwYh82w6t0m96sg==}
engines: {node: ^20.19.0 || ^22.12.0 || >=23.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
tailwindcss: ^3.3.0 || ^4.1.15
eslint-plugin-prettier@5.5.4: eslint-plugin-prettier@5.5.4:
resolution: {integrity: sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==} resolution: {integrity: sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}
@@ -3970,6 +3989,9 @@ packages:
mdn-data@2.12.2: mdn-data@2.12.2:
resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==}
mdn-data@2.23.0:
resolution: {integrity: sha512-786vq1+4079JSeu2XdcDjrhi/Ry7BWtjDl9WtGPWLiIHb2T66GvIVflZTBoSNZ5JqTtJGYEVMuFA/lbQlMOyDQ==}
mdn-data@2.25.0: mdn-data@2.25.0:
resolution: {integrity: sha512-T2LPsjgUE/tgMmRXREVmwsux89DwWfNjiynOeXuLd2mX6jphGQ2YE3Ukz7LQ2VOFKiVZU/Ee1GqzHiipZCjymw==} resolution: {integrity: sha512-T2LPsjgUE/tgMmRXREVmwsux89DwWfNjiynOeXuLd2mX6jphGQ2YE3Ukz7LQ2VOFKiVZU/Ee1GqzHiipZCjymw==}
@@ -4876,6 +4898,10 @@ packages:
resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==}
engines: {node: '>=12'} engines: {node: '>=12'}
strip-bom@3.0.0:
resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
engines: {node: '>=4'}
strip-bom@4.0.0: strip-bom@4.0.0:
resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==}
engines: {node: '>=8'} engines: {node: '>=8'}
@@ -5031,6 +5057,10 @@ packages:
resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==}
engines: {node: '>=10.0.0'} engines: {node: '>=10.0.0'}
tailwind-csstree@0.1.4:
resolution: {integrity: sha512-FzD187HuFIZEyeR7Xy6sJbJll2d4SybS90satC8SKIuaNRC05CxMvdzN7BUsfDQffcnabckRM5OIcfArjsZ0mg==}
engines: {node: '>=18.18'}
tailwindcss@4.1.17: tailwindcss@4.1.17:
resolution: {integrity: sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==} resolution: {integrity: sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==}
@@ -5097,6 +5127,14 @@ packages:
peerDependencies: peerDependencies:
typescript: '>=4.8.4' typescript: '>=4.8.4'
tsconfig-paths-webpack-plugin@4.2.0:
resolution: {integrity: sha512-zbem3rfRS8BgeNK50Zz5SIQgXzLafiHjOwUAvk/38/o1jHn/V5QAgVUcz884or7WYcPaH3N2CIfUc2u0ul7UcA==}
engines: {node: '>=10.13.0'}
tsconfig-paths@4.2.0:
resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==}
engines: {node: '>=6'}
tslib@2.3.0: tslib@2.3.0:
resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==}
@@ -5226,6 +5264,14 @@ packages:
resolution: {integrity: sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==} resolution: {integrity: sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==}
engines: {node: '>=10.12.0'} engines: {node: '>=10.12.0'}
valibot@1.2.0:
resolution: {integrity: sha512-mm1rxUsmOxzrwnX5arGS+U4T25RdvpPjPN4yR0u9pUBov9+zGVtO84tif1eY4r6zWxVxu3KzIyknJy3rxfRZZg==}
peerDependencies:
typescript: '>=5'
peerDependenciesMeta:
typescript:
optional: true
vditor@3.11.2: vditor@3.11.2:
resolution: {integrity: sha512-8QguQQUPWbBFocnfQmWjz4jiykQnvsmCuhOomGIVVK7vc+dQq2h8w9qQQuEjUTZpnZT5fEdYbj4aLr1NGdAZaA==} resolution: {integrity: sha512-8QguQQUPWbBFocnfQmWjz4jiykQnvsmCuhOomGIVVK7vc+dQq2h8w9qQQuEjUTZpnZT5fEdYbj4aLr1NGdAZaA==}
@@ -6217,6 +6263,11 @@ snapshots:
dependencies: dependencies:
'@types/json-schema': 7.0.15 '@types/json-schema': 7.0.15
'@eslint/css-tree@3.6.8':
dependencies:
mdn-data: 2.23.0
source-map-js: 1.2.1
'@eslint/eslintrc@3.3.3': '@eslint/eslintrc@3.3.3':
dependencies: dependencies:
ajv: 6.12.6 ajv: 6.12.6
@@ -7122,6 +7173,10 @@ snapshots:
'@uppy/utils': 4.1.3 '@uppy/utils': 4.1.3
nanoid: 3.3.11 nanoid: 3.3.11
'@valibot/to-json-schema@1.4.0(valibot@1.2.0(typescript@5.9.3))':
dependencies:
valibot: 1.2.0(typescript@5.9.3)
'@vitejs/plugin-vue-jsx@5.1.2(vite@7.2.4(@types/node@20.19.25)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.94.2)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3))': '@vitejs/plugin-vue-jsx@5.1.2(vite@7.2.4(@types/node@20.19.25)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.94.2)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3))':
dependencies: dependencies:
'@babel/core': 7.28.5 '@babel/core': 7.28.5
@@ -8368,6 +8423,21 @@ snapshots:
dependencies: dependencies:
eslint: 9.39.1(jiti@2.6.1) eslint: 9.39.1(jiti@2.6.1)
eslint-plugin-better-tailwindcss@4.0.0-beta.6(eslint@9.39.1(jiti@2.6.1))(tailwindcss@4.1.17)(typescript@5.9.3):
dependencies:
'@eslint/css-tree': 3.6.8
'@valibot/to-json-schema': 1.4.0(valibot@1.2.0(typescript@5.9.3))
enhanced-resolve: 5.18.3
eslint: 9.39.1(jiti@2.6.1)
jiti: 2.6.1
synckit: 0.11.11
tailwind-csstree: 0.1.4
tailwindcss: 4.1.17
tsconfig-paths-webpack-plugin: 4.2.0
valibot: 1.2.0(typescript@5.9.3)
transitivePeerDependencies:
- typescript
eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1))(prettier@3.7.3): eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1(jiti@2.6.1)))(eslint@9.39.1(jiti@2.6.1))(prettier@3.7.3):
dependencies: dependencies:
eslint: 9.39.1(jiti@2.6.1) eslint: 9.39.1(jiti@2.6.1)
@@ -9405,7 +9475,7 @@ snapshots:
launch-ide@1.2.1: launch-ide@1.2.1:
dependencies: dependencies:
chalk: 4.1.1 chalk: 4.1.2
dotenv: 16.6.1 dotenv: 16.6.1
leven@2.1.0: {} leven@2.1.0: {}
@@ -9603,6 +9673,8 @@ snapshots:
mdn-data@2.12.2: {} mdn-data@2.12.2: {}
mdn-data@2.23.0: {}
mdn-data@2.25.0: {} mdn-data@2.25.0: {}
memoize-one@6.0.0: {} memoize-one@6.0.0: {}
@@ -10466,6 +10538,8 @@ snapshots:
dependencies: dependencies:
ansi-regex: 6.2.2 ansi-regex: 6.2.2
strip-bom@3.0.0: {}
strip-bom@4.0.0: {} strip-bom@4.0.0: {}
strip-final-newline@2.0.0: {} strip-final-newline@2.0.0: {}
@@ -10662,6 +10736,8 @@ snapshots:
string-width: 4.2.3 string-width: 4.2.3
strip-ansi: 6.0.1 strip-ansi: 6.0.1
tailwind-csstree@0.1.4: {}
tailwindcss@4.1.17: {} tailwindcss@4.1.17: {}
tapable@2.3.0: {} tapable@2.3.0: {}
@@ -10724,6 +10800,19 @@ snapshots:
dependencies: dependencies:
typescript: 5.9.3 typescript: 5.9.3
tsconfig-paths-webpack-plugin@4.2.0:
dependencies:
chalk: 4.1.2
enhanced-resolve: 5.18.3
tapable: 2.3.0
tsconfig-paths: 4.2.0
tsconfig-paths@4.2.0:
dependencies:
json5: 2.2.3
minimist: 1.2.8
strip-bom: 3.0.0
tslib@2.3.0: {} tslib@2.3.0: {}
tslib@2.4.0: {} tslib@2.4.0: {}
@@ -10840,6 +10929,10 @@ snapshots:
convert-source-map: 1.9.0 convert-source-map: 1.9.0
source-map: 0.7.6 source-map: 0.7.6
valibot@1.2.0(typescript@5.9.3):
optionalDependencies:
typescript: 5.9.3
vditor@3.11.2: vditor@3.11.2:
dependencies: dependencies:
diff-match-patch: 1.0.5 diff-match-patch: 1.0.5

View File

@@ -1,5 +1,5 @@
import Sortable from "sortablejs"; import Sortable from "sortablejs";
import { $t, transformI18n } from "@/plugins/i18n"; import { transformI18n } from "@/plugins/i18n";
import { useEpThemeStoreHook } from "@/store/modules/epTheme"; import { useEpThemeStoreHook } from "@/store/modules/epTheme";
import { import {
type PropType, type PropType,
@@ -30,7 +30,7 @@ const props = {
/** 头部最左边的标题 */ /** 头部最左边的标题 */
title: { title: {
type: String, type: String,
default: $t("tableBar.pureList") default: "列表"
}, },
/** 对于树形表格如果想启用展开和折叠功能传入当前表格的ref即可 */ /** 对于树形表格如果想启用展开和折叠功能传入当前表格的ref即可 */
tableRef: { tableRef: {
@@ -169,19 +169,19 @@ export default defineComponent({
style={getDropdownItemStyle.value("large")} style={getDropdownItemStyle.value("large")}
onClick={() => (size.value = "large")} onClick={() => (size.value = "large")}
> >
{transformI18n($t("tableBar.pureLarge"))}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
style={getDropdownItemStyle.value("default")} style={getDropdownItemStyle.value("default")}
onClick={() => (size.value = "default")} onClick={() => (size.value = "default")}
> >
{transformI18n($t("tableBar.pureDefault"))}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
style={getDropdownItemStyle.value("small")} style={getDropdownItemStyle.value("small")}
onClick={() => (size.value = "small")} onClick={() => (size.value = "small")}
> >
{transformI18n($t("tableBar.pureSmall"))}
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
) )
@@ -245,9 +245,7 @@ export default defineComponent({
reference: () => ( reference: () => (
<SettingIcon <SettingIcon
class={["w-[16px]", iconClass.value]} class={["w-[16px]", iconClass.value]}
v-tippy={rendTippyProps( v-tippy={rendTippyProps("列设置")}
transformI18n($t("tableBar.pureColumnSettings"))
)}
/> />
) )
}; };
@@ -270,7 +268,7 @@ export default defineComponent({
{slots?.title ? ( {slots?.title ? (
slots.title() slots.title()
) : ( ) : (
<p class="font-bold truncate">{transformI18n(props.title)}</p> <p class="font-bold truncate">{props.title}</p>
)} )}
<div class="flex items-center justify-around"> <div class="flex items-center justify-around">
{slots?.buttons ? ( {slots?.buttons ? (
@@ -284,9 +282,7 @@ export default defineComponent({
transform: isExpandAll.value ? "none" : "rotate(-90deg)" transform: isExpandAll.value ? "none" : "rotate(-90deg)"
}} }}
v-tippy={rendTippyProps( v-tippy={rendTippyProps(
isExpandAll.value isExpandAll.value ? "折叠" : "展开"
? transformI18n($t("tableBar.pureCollapse"))
: transformI18n($t("tableBar.pureExpand"))
)} )}
onClick={() => onExpand()} onClick={() => onExpand()}
/> />
@@ -299,18 +295,14 @@ export default defineComponent({
iconClass.value, iconClass.value,
loading.value ? "animate-spin" : "" loading.value ? "animate-spin" : ""
]} ]}
v-tippy={rendTippyProps( v-tippy={rendTippyProps("刷新")}
transformI18n($t("tableBar.pureRefresh"))
)}
onClick={() => onReFresh()} onClick={() => onReFresh()}
/> />
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<el-dropdown <el-dropdown
v-slots={dropdown} v-slots={dropdown}
trigger="click" trigger="click"
v-tippy={rendTippyProps( v-tippy={rendTippyProps("密度")}
transformI18n($t("tableBar.pureDensity"))
)}
> >
<CollapseIcon class={["w-[16px]", iconClass.value]} /> <CollapseIcon class={["w-[16px]", iconClass.value]} />
</el-dropdown> </el-dropdown>
@@ -326,13 +318,13 @@ export default defineComponent({
<div class={[topClass.value]}> <div class={[topClass.value]}>
<el-checkbox <el-checkbox
class="-mr-1!" class="-mr-1!"
label={transformI18n($t("tableBar.pureColumnDisplay"))} label="列展示"
v-model={checkAll.value} v-model={checkAll.value}
indeterminate={isIndeterminate.value} indeterminate={isIndeterminate.value}
onChange={value => handleCheckAllChange(value)} onChange={value => handleCheckAllChange(value)}
/> />
<el-button type="primary" link onClick={() => onReset()}> <el-button type="primary" link onClick={() => onReset()}>
{transformI18n($t("tableBar.pureReset"))}
</el-button> </el-button>
</div> </div>
@@ -390,11 +382,7 @@ export default defineComponent({
<iconifyIconOffline <iconifyIconOffline
class={["w-[16px]", iconClass.value]} class={["w-[16px]", iconClass.value]}
icon={isFullscreen.value ? ExitFullscreen : Fullscreen} icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
v-tippy={ v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
isFullscreen.value
? transformI18n($t("tableBar.pureExitFullScreen"))
: transformI18n($t("tableBar.pureFullScreen"))
}
onClick={() => onFullscreen()} onClick={() => onFullscreen()}
/> />
</div> </div>

View File

@@ -33,7 +33,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
</script> </script>
<template> <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 <LaySidebarTopCollapse
v-if="device === 'mobile'" v-if="device === 'mobile'"
class="hamburger-container" class="hamburger-container"

View File

@@ -49,7 +49,7 @@ function hoverDescription(event, description) {
<template> <template>
<div <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 <el-avatar
v-if="noticeItem.avatar" v-if="noticeItem.avatar"

View File

@@ -51,7 +51,7 @@ onBeforeUnmount(() => {
<div class="right-panel-background" /> <div class="right-panel-background" />
<div ref="target" class="right-panel bg-bg_color"> <div ref="target" class="right-panel bg-bg_color">
<div <div
class="project-configuration border-0 border-b-[1px] border-solid border-[var(--pure-border-color)]" class="project-configuration border-0 border-b border-solid border-(--pure-border-color)"
> >
<h4 class="dark:text-white"> <h4 class="dark:text-white">
{{ t("panel.pureSystemSet") }} {{ t("panel.pureSystemSet") }}
@@ -78,7 +78,7 @@ onBeforeUnmount(() => {
</el-scrollbar> </el-scrollbar>
<div <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-t border-solid border-(--pure-border-color)"
> >
<el-button <el-button
v-tippy="{ v-tippy="{

View File

@@ -416,7 +416,7 @@ onUnmounted(() => removeMatchMedia);
<button <button
v-else v-else
v-ripple="{ class: 'text-gray-300' }" 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)" @click="setStretch(!settings.stretch)"
> >
<div <div

View File

@@ -89,7 +89,7 @@ const exportExcel = () => {
</el-link> </el-link>
</template> </template>
<el-button type="primary" @click="exportExcel">导出Excel</el-button> <el-button type="primary" @click="exportExcel">导出Excel</el-button>
<div class="h-[25rem] mt-3"> <div class="h-100 mt-3">
<el-auto-resizer> <el-auto-resizer>
<template #default="{ height, width }"> <template #default="{ height, width }">
<el-table-v2 <el-table-v2

View File

@@ -38,10 +38,7 @@ function onClick(item) {
<template> <template>
<div <div
:class="[ :class="['min-w-[180px]', deviceDetection() ? 'max-w-full' : 'max-w-[70%]']"
'min-w-[180px]',
deviceDetection() ? 'max-w-[100%]' : 'max-w-[70%]'
]"
> >
<h3 class="my-8!">账户管理</h3> <h3 class="my-8!">账户管理</h3>
<div v-for="(item, index) in list" :key="index"> <div v-for="(item, index) in list" :key="index">

View File

@@ -33,10 +33,7 @@ function onChange(val, item) {
<template> <template>
<div <div
:class="[ :class="['min-w-[180px]', deviceDetection() ? 'max-w-full' : 'max-w-[70%]']"
'min-w-[180px]',
deviceDetection() ? 'max-w-[100%]' : 'max-w-[70%]'
]"
> >
<h3 class="my-8!">偏好设置</h3> <h3 class="my-8!">偏好设置</h3>
<div v-for="(item, index) in list" :key="index"> <div v-for="(item, index) in list" :key="index">

View File

@@ -105,10 +105,7 @@ getMine().then(res => {
<template> <template>
<div <div
:class="[ :class="['min-w-[180px]', deviceDetection() ? 'max-w-full' : 'max-w-[70%]']"
'min-w-[180px]',
deviceDetection() ? 'max-w-[100%]' : 'max-w-[70%]'
]"
> >
<h3 class="my-8!">个人信息</h3> <h3 class="my-8!">个人信息</h3>
<el-form <el-form

View File

@@ -73,10 +73,7 @@ onMounted(() => {
<template> <template>
<div <div
:class="[ :class="['min-w-[180px]', deviceDetection() ? 'max-w-full' : 'max-w-[70%]']"
'min-w-[180px]',
deviceDetection() ? 'max-w-[100%]' : 'max-w-[70%]'
]"
> >
<h3 class="my-8!">安全日志</h3> <h3 class="my-8!">安全日志</h3>
<pure-table <pure-table

View File

@@ -70,16 +70,16 @@ getMine().then(res => {
<el-container class="h-full"> <el-container class="h-full">
<el-aside <el-aside
v-if="isOpen" 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'" :width="deviceDetection() ? '180px' : '240px'"
> >
<el-menu :default-active="witchPane" class="pure-account-settings-menu"> <el-menu :default-active="witchPane" class="pure-account-settings-menu">
<div <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-[50px]! 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)" @click="router.go(-1)"
> >
<div <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" /> <IconifyIconOffline :icon="leftLine" />
<span class="ml-2">返回</span> <span class="ml-2">返回</span>

View File

@@ -38,7 +38,7 @@ const handleChange = value => {
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24"> <el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
<div class="flex flex-col items-center justify-center"> <div class="flex flex-col items-center justify-center">
<span class="text-[var(--el-color-primary)]"> <span class="text-(--el-color-primary)">
1. 二级联动不带全部选项 1. 二级联动不带全部选项
<el-cascader <el-cascader
v-model="selectedOptions1" v-model="selectedOptions1"
@@ -67,7 +67,7 @@ const handleChange = value => {
</el-col> </el-col>
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24"> <el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
<div class="flex flex-col items-center justify-center mt-3"> <div class="flex flex-col items-center justify-center mt-3">
<span class="text-[var(--el-color-primary)]"> <span class="text-(--el-color-primary)">
2. 二级联动带有全部选项 2. 二级联动带有全部选项
<el-cascader <el-cascader
v-model="selectedOptions3" v-model="selectedOptions3"
@@ -96,7 +96,7 @@ const handleChange = value => {
</el-col> </el-col>
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24"> <el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
<div class="flex flex-col items-center justify-center mt-3"> <div class="flex flex-col items-center justify-center mt-3">
<span class="text-[var(--el-color-primary)]"> <span class="text-(--el-color-primary)">
3. 三级联动不带全部选项 3. 三级联动不带全部选项
<el-cascader <el-cascader
v-model="selectedOptions2" v-model="selectedOptions2"
@@ -127,7 +127,7 @@ const handleChange = value => {
</el-col> </el-col>
<el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24"> <el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24">
<div class="flex flex-col items-center justify-center mt-3"> <div class="flex flex-col items-center justify-center mt-3">
<span class="text-[var(--el-color-primary)]"> <span class="text-(--el-color-primary)">
4. 三级联动"全部选项" 4. 三级联动"全部选项"
<el-cascader <el-cascader
v-model="selectedOptions4" v-model="selectedOptions4"

View File

@@ -190,7 +190,7 @@ const onDownload = () => {
class="el-upload-list__item-delete" class="el-upload-list__item-delete"
@click="handleRemove(file)" @click="handleRemove(file)"
> >
<span title="移除" class="hover:text-[var(--el-color-danger)]"> <span title="移除" class="hover:text-(--el-color-danger)">
<IconifyIconOffline <IconifyIconOffline
:icon="Delete" :icon="Delete"
class="hover:scale-125 duration-100" class="hover:scale-125 duration-100"
@@ -222,7 +222,7 @@ const onDownload = () => {
type="info" type="info"
class="img-name" class="img-name"
> >
<p class="text-[#fff] dark:text-black"> <p class="text-white dark:text-black">
{{ fileList[curOpenImgIndex].name }} {{ fileList[curOpenImgIndex].name }}
</p> </p>
</div> </div>

View File

@@ -135,7 +135,7 @@ watch(loginDay, value => {
<!-- 国际化 --> <!-- 国际化 -->
<el-dropdown trigger="click"> <el-dropdown trigger="click">
<globalization <globalization
class="hover:text-primary hover:bg-[transparent]! w-[20px] h-[20px] ml-1.5 cursor-pointer outline-hidden duration-300" class="hover:text-primary hover:bg-transparent! w-[20px] h-[20px] ml-1.5 cursor-pointer outline-hidden duration-300"
/> />
<template #dropdown> <template #dropdown>
<el-dropdown-menu class="translation"> <el-dropdown-menu class="translation">

View File

@@ -103,7 +103,7 @@ const {
<div <div
v-if="selectedNum > 0" v-if="selectedNum > 0"
v-motion-fade v-motion-fade
class="bg-[var(--el-fill-color-light)] w-full h-[46px] mb-2 pl-4 flex items-center" class="bg-(--el-fill-color-light) w-full h-[46px] mb-2 pl-4 flex items-center"
> >
<div class="flex-auto"> <div class="flex-auto">
<span <span

View File

@@ -103,7 +103,7 @@ const {
<div <div
v-if="selectedNum > 0" v-if="selectedNum > 0"
v-motion-fade v-motion-fade
class="bg-[var(--el-fill-color-light)] w-full h-[46px] mb-2 pl-4 flex items-center" class="bg-(--el-fill-color-light) w-full h-[46px] mb-2 pl-4 flex items-center"
> >
<div class="flex-auto"> <div class="flex-auto">
<span <span

View File

@@ -95,7 +95,7 @@ const {
<div <div
v-if="selectedNum > 0" v-if="selectedNum > 0"
v-motion-fade v-motion-fade
class="bg-[var(--el-fill-color-light)] w-full h-[46px] mb-2 pl-4 flex items-center" class="bg-(--el-fill-color-light) w-full h-[46px] mb-2 pl-4 flex items-center"
> >
<div class="flex-auto"> <div class="flex-auto">
<span <span

View File

@@ -128,7 +128,7 @@ const {
<div <div
v-if="selectedNum > 0" v-if="selectedNum > 0"
v-motion-fade v-motion-fade
class="bg-[var(--el-fill-color-light)] w-full h-[46px] mb-2 pl-4 flex items-center" class="bg-(--el-fill-color-light) w-full h-[46px] mb-2 pl-4 flex items-center"
> >
<div class="flex-auto"> <div class="flex-auto">
<span <span