Compare commits

..

27 Commits

Author SHA1 Message Date
xiaoxian521
ad6ced45cc release: update 3.5.0 2022-09-10 21:44:17 +08:00
xiaoxian521
3d96b9acd4 chore: update 2022-09-09 00:02:15 +08:00
xiaoxian521
594f9b98ab feat: 添加cssnano,打包时压缩css体积 2022-09-08 17:23:48 +08:00
xiaoxian521
392105e820 chore: use pnpm shell-emulator instead of cross-env 2022-09-07 21:59:03 +08:00
xiaoxian521
f629663641 chore: update 2022-09-07 16:55:49 +08:00
RealityBoy
3683bd46a4 refactor: use tailwindcss replace unocss (#342)
* refactor: use `tailwindcss` replace `unocss`

* fix: update
2022-09-07 15:07:01 +08:00
Yalin
4dfde1bea6 docs:注释文案修正 (#344) 2022-09-07 14:09:54 +08:00
xiaoxian521
4e506555ad fix: token过期,刷新死循环 2022-09-06 23:22:06 +08:00
xiaoxian521
45f912c2f5 chore: update 2022-09-05 22:21:10 +08:00
xiaoxian521
d44b35937b chore: update 2022-09-04 12:34:43 +08:00
xiaoxian521
594abd7372 chore: update 2022-09-03 13:56:30 +08:00
xiaoxian521
869964ea7e chore: update 2022-08-31 11:37:18 +08:00
xiaoxian521
4c26318126 docs: update 2022-08-31 11:19:27 +08:00
xiaoxian521
ab3468b758 chore: update 2022-08-31 11:01:36 +08:00
xiaoxian521
1dbd29735e docs: update 2022-08-31 01:39:09 +08:00
xiaoxian521
2def54c775 workflow: add gitee Deploy 2022-08-31 00:40:03 +08:00
xiaoxian521
67e8532d37 chore: update 2022-08-29 17:14:25 +08:00
一万
fb2c016ebe feat: add el-table-infinite-scroll demo (#335) 2022-08-24 23:25:00 +08:00
xiaoxian521
3056527701 perf: 重置路由时,清空缓存页面 2022-08-24 16:08:05 +08:00
xiaoxian521
cef79dfca0 chore: window.process定义在index.html中,防止低版本浏览器报错 2022-08-24 09:46:19 +08:00
xiaoxian521
769410efdf chore: 开启vscode括号对指南 2022-08-23 20:47:35 +08:00
xiaoxian521
c7dbb07858 chore: update unocss 2022-08-23 17:59:38 +08:00
xiaoxian521
cc92b3e51e style: reset.scss 2022-08-23 16:58:52 +08:00
xiaoxian521
88bba7555b release: update 3.4.6 2022-08-23 10:31:44 +08:00
xiaoxian521
30c682bd24 fix: 修复iframe加载失败 2022-08-23 10:24:40 +08:00
SampsonYe(叶飞)
3baffa11e4 fix: 修复动态路由子级长度为0时抛出异常 (#333) 2022-08-23 10:10:49 +08:00
xiaoxian521
1ed598c5f2 fix: process is not defined in path 2022-08-23 09:55:23 +08:00
82 changed files with 1427 additions and 1479 deletions

View File

@@ -1,4 +1,10 @@
public
dist
*.d.ts
package.json
package.json
.eslintrc.js
.prettierrc.js
commitlint.config.js
postcss.config.js
tailwind.config.js
stylelint.config.js

39
.github/workflows/gitee.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Build and Deploy
permissions:
contents: write
on:
push:
branches:
- gitee
jobs:
deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "16"
registry-url: https://registry.npmjs.com/
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Deploy 🔧
run: |
pnpm install
sed -i "s#VITE_PUBLIC_PATH = /#VITE_PUBLIC_PATH = /vue-pure-admin/#g" $(pwd)/.env.production
pnpm build
cd dist
touch README.md .nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
clean: true

View File

@@ -1,6 +1,6 @@
module.exports = {
"*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
"{!(package)*.json,.!(browserslist)*rc}": ["prettier --write--parser json"],
"{!(package)*.json}": ["prettier --write--parser json"],
"package.json": ["prettier --write"],
"*.vue": ["eslint --fix", "prettier --write", "stylelint --fix"],
"*.{vue,css,scss,postcss,less}": ["stylelint --fix", "prettier --write"],

3
.npmrc Normal file
View File

@@ -0,0 +1,3 @@
shamefully-hoist=true
strict-peer-dependencies=false
shell-emulator=true

View File

@@ -3,13 +3,13 @@
"vscode-icons-team.vscode-icons",
"davidanson.vscode-markdownlint",
"stylelint.vscode-stylelint",
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"lokalise.i18n-ally",
"mikestead.dotenv",
"eamodio.gitlens",
"antfu.iconify",
"antfu.unocss",
"Vue.volar"
]
}

View File

@@ -6,6 +6,7 @@
},
"editor.tabSize": 2,
"editor.formatOnPaste": true,
"editor.guides.bracketPairs": "active",
"files.autoSave": "afterDelay",
"git.confirmSync": false,
"workbench.startupEditor": "newUntitledFile",

View File

@@ -1,3 +1,31 @@
# 3.5.0 (2022-9-10)
### 🎫 Feat
- Add `cssnano` to compress the size of `css` when packaging
- Add `element-plus` seamless scrolling `Table` page demo
- Open `vscode` bracket pair guide
### ✔️ refactor
- Replace `unocss` with `tailwindcss`, add `tailwindcss` [documentation](https://xiaoxian521.github.io/pure-admin-doc/pages/39156f/)
### 🐞 Bug fixes
- `token` expires, refresh the infinite loop
### 🍏 Perf
- When resetting the route, clear the cached page
# 3.4.6 (2022-8-23)
### 🐞 Bug fixes
- `process` is not defined in path
- Fixed an error when dynamic routing `children` is an empty array
- Fixed `iframe` loading failure
# 3.4.5 (2022-8-22)
### 🐞 Bug fixes

View File

@@ -1,3 +1,31 @@
# 3.5.0 (2022-9-10)
### 🎫 Feat
- Add `cssnano` to compress the size of `css` when packaging
- Add `element-plus` seamless scrolling `Table` page demo
- Open `vscode` bracket pair guide
### ✔️ refactor
- Replace `unocss` with `tailwindcss`, add `tailwindcss` [documentation](https://xiaoxian521.github.io/pure-admin-doc/pages/39156f/)
### 🐞 Bug fixes
- `token` expires, refresh the infinite loop
### 🍏 Perf
- When resetting the route, clear the cached page
# 3.4.6 (2022-8-23)
### 🐞 Bug fixes
- `process` is not defined in path
- Fixed an error when dynamic routing `children` is an empty array
- Fixed `iframe` loading failure
# 3.4.5 (2022-8-22)
### 🐞 Bug fixes

View File

@@ -1,3 +1,31 @@
# 3.5.0 (2022-9-10)
### 🎫 Feat
- 添加 `cssnano` ,打包时压缩 `css` 体积
- 添加 `element-plus` 无缝滚动 `Table` 页面 demo
- 开启 `vscode` 括号对指南
### ✔️ refactor
- 使用 `tailwindcss` 替换 `unocss`,新增 `tailwindcss` [使用文档](http://yiming_chang.gitee.io/pure-admin-doc/pages/39156f/)
### 🐞 Bug fixes
- `token` 过期,刷新死循环
### 🍏 Perf
- 重置路由时,清空缓存页面
# 3.4.6 (2022-8-23)
### 🐞 Bug fixes
- `process` is not defined in path
- 修复动态路由`children`为空数组时报错
- 修复`iframe`加载失败
# 3.4.5 (2022-8-22)
### 🐞 Bug fixes
@@ -21,7 +49,7 @@
- 将平台的大部分工具以及 hooks 都集中到[@pureadmin/utils](https://pure-admin-utils-docs.vercel.app/),并删除集中到这个库里的代码,减少平台体积
- 添加[unplugin-vue-define-options](https://www.npmjs.com/package/unplugin-vue-define-options)插件,页面可直接写 `defineOptions({name: 自定义名称})`
- 添加项目文件、语言分析工具 [cloc](https://www.npmjs.com/package/cloc)
- 添加登页国际化
- 添加登页国际化
- 添加完整路由配置表类型声明
- 添加虚拟列表页面 demo
- 添加 `PDF` 预览页面 demo

View File

@@ -17,7 +17,9 @@ vue-pure-admin is a free and open source middle and back-end template. Using the
## Docs
- [Click Watch Docs](https://pure-admin-doc.vercel.app)
- [Click me to view the domestic documentation site](http://yiming_chang.gitee.io/pure-admin-doc)
- [Click me to view foreign document site 1](https://xiaoxian521.github.io/pure-admin-doc)
- [Click me to view foreign document site 2](https://pure-admin-doc.vercel.app)
## Thin
@@ -29,7 +31,9 @@ vue-pure-admin is a free and open source middle and back-end template. Using the
## Preview
- [vue-pure-admin](https://vue-pure-admin.vercel.app)
- [Click me to view the domestic preview station](http://yiming_chang.gitee.io/vue-pure-admin)
- [Click me to view foreign preview site 1](https://xiaoxian521.github.io/vue-pure-admin)
- [Click me to view foreign preview station 2](https://vue-pure-admin.vercel.app)
- PC
<p align="center">

View File

@@ -17,7 +17,9 @@ vue-pure-admin 是一个免费开源的中后台模版。使用了最新的`vue3
## 配套文档
- [点我查看文档](https://pure-admin-doc.vercel.app)
- [点我查看国内文档](http://yiming_chang.gitee.io/pure-admin-doc)
- [点我查看国外文档站 1](https://xiaoxian521.github.io/pure-admin-doc)
- [点我查看国外文档站 2](https://pure-admin-doc.vercel.app)
## 精简版
@@ -29,7 +31,9 @@ vue-pure-admin 是一个免费开源的中后台模版。使用了最新的`vue3
## 预览
- [vue-pure-admin](https://vue-pure-admin.vercel.app)
- [点我查看国内预览站](http://yiming_chang.gitee.io/vue-pure-admin)
- [点我查看国外预览站 1](https://xiaoxian521.github.io/vue-pure-admin)
- [点我查看国外预览站 2](https://vue-pure-admin.vercel.app)
- PC 端
<p align="center">
@@ -141,7 +145,7 @@ pnpm build
一群已满,下面是二群,群里严禁`黄``赌``毒``vpn`等违法行为!
<img src="https://pure-admin-doc.vercel.app/img/support/qq.png" width="150px" height="225px" />
<img src="http://yiming_chang.gitee.io/pure-admin-doc/img/support/qq.png" width="150px" height="225px" />
## 许可证

View File

@@ -1,5 +1,4 @@
import { resolve } from "path";
import Unocss from "unocss/vite";
import vue from "@vitejs/plugin-vue";
import { viteBuildInfo } from "./info";
import svgLoader from "vite-svg-loader";
@@ -26,7 +25,6 @@ export function getPluginsList(command, VITE_LEGACY) {
}),
// jsx、tsx语法支持
vueJsx(),
Unocss(),
DefineOptions(),
// 线上环境删除console
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),

View File

@@ -86,6 +86,7 @@ menus:
hsVirtualList: Virtual List
hsPdf: PDF Preview
hsExecl: Export Excel
hsInfiniteScroll: Table Infinite Scroll
status:
hsLoad: Loading...
login:

View File

@@ -86,6 +86,7 @@ menus:
hsVirtualList: 虚拟列表
hsPdf: PDF预览
hsExecl: 导出Excel
hsInfiniteScroll: 表格无限滚动
status:
hsLoad: 加载中...
login:

View File

@@ -86,12 +86,12 @@ const frameRouter = {
name: "FramePure",
meta: {
title: "menus.hsPureDocument",
frameSrc: "https://pure-admin-doc.vercel.app"
frameSrc: "http://yiming_chang.gitee.io/pure-admin-doc"
}
},
{
path: "/external",
name: "https://pure-admin-doc.vercel.app",
name: "http://yiming_chang.gitee.io/pure-admin-doc",
meta: {
title: "menus.externalLink"
}

View File

@@ -1,20 +1,20 @@
{
"name": "vue-pure-admin",
"version": "3.4.5",
"version": "3.5.0",
"private": true,
"scripts": {
"dev": "cross-env --max_old_space_size=4096 vite",
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
"serve": "pnpm dev",
"build": "rimraf dist && cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build",
"build:staging": "rimraf dist && cross-env vite build --mode staging",
"report": "rimraf dist && cross-env vite build",
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build",
"build:staging": "rimraf dist && vite build --mode staging",
"report": "rimraf dist && vite build",
"preview": "vite preview",
"preview:build": "pnpm build && vite preview",
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
"cloc": "cross-env --max_old_space_size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
"cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
"clean:cache": "rm -rf node_modules && rm -rf .eslintcache && pnpm install",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,css,scss,postcss,less}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
"lint:pretty": "pretty-quick --staged",
@@ -36,20 +36,20 @@
"@pureadmin/descriptions": "^1.1.0",
"@pureadmin/table": "^1.2.0",
"@pureadmin/utils": "^0.1.1",
"@vueuse/core": "^9.1.0",
"@vueuse/core": "^9.1.1",
"@vueuse/motion": "^2.0.0-beta.12",
"@vueuse/shared": "^9.1.0",
"@vueuse/shared": "^9.1.1",
"@wangeditor/editor": "^5.1.14",
"@wangeditor/editor-for-vue": "^5.1.12",
"animate.css": "^4.1.1",
"axios": "^0.27.2",
"china-area-data": "^5.0.1",
"cropperjs": "^1.5.12",
"css-color-function": "^1.3.3",
"dayjs": "^1.11.4",
"driver.js": "^0.9.8",
"echarts": "^5.3.3",
"element-plus": "^2.2.14",
"el-table-infinite-scroll": "^3.0.1",
"element-plus": "^2.2.16",
"element-resize-detector": "^1.2.3",
"js-cookie": "^3.0.1",
"jsbarcode": "^3.11.5",
@@ -60,25 +60,24 @@
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"path": "^0.12.7",
"pinia": "^2.0.19",
"pinia": "^2.0.21",
"qrcode": "^1.5.1",
"qs": "^6.11.0",
"resize-observer-polyfill": "^1.5.1",
"responsive-storage": "^2.1.0",
"rgb-hex": "^4.0.0",
"sortablejs": "^1.15.0",
"swiper": "^8.3.2",
"v-contextmenu": "3.0.0",
"vue": "^3.2.37",
"vue": "^3.2.39",
"vue-form-create2": "^1.2.8",
"vue-i18n": "^9.2.2",
"vue-json-pretty": "^2.1.1",
"vue-pdf-embed": "^1.1.4",
"vue-router": "^4.1.3",
"vue-router": "^4.1.5",
"vue-types": "^4.2.1",
"vue-virtual-scroller": "^2.0.0-alpha.1",
"vuedraggable": "^4.1.0",
"vxe-table": "^4.3.0-beta.5",
"vxe-table": "^4.3.2",
"xe-utils": "^3.5.6",
"xgplayer": "^2.31.7",
"xlsx": "^0.18.5"
@@ -110,15 +109,15 @@
"@types/sortablejs": "^1.13.0",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"@vitejs/plugin-legacy": "^2.0.0",
"@vitejs/plugin-vue": "^3.0.1",
"@vitejs/plugin-vue-jsx": "^2.0.0",
"@vitejs/plugin-legacy": "^2.1.0",
"@vitejs/plugin-vue": "^3.1.0",
"@vitejs/plugin-vue-jsx": "^2.0.1",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^10.0.0",
"@vue/runtime-core": "^3.2.37",
"@vue/runtime-core": "^3.2.39",
"autoprefixer": "^10.4.8",
"cloc": "^2.10.0",
"cross-env": "7.0.3",
"cssnano": "^5.1.13",
"eslint": "^8.8.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.4.1",
@@ -128,12 +127,12 @@
"picocolors": "^1.0.0",
"postcss": "^8.4.16",
"postcss-html": "^1.5.0",
"postcss-import": "^14.1.0",
"postcss-import": "^15.0.0",
"postcss-scss": "^4.0.4",
"prettier": "^2.5.1",
"pretty-quick": "3.1.1",
"rimraf": "3.0.2",
"rollup-plugin-visualizer": "^5.7.1",
"rollup-plugin-visualizer": "^5.8.1",
"sass": "^1.53.0",
"sass-loader": "^13.0.2",
"stylelint": "^14.3.0",
@@ -142,21 +141,21 @@
"stylelint-config-recommended": "^6.0.0",
"stylelint-config-standard": "^24.0.0",
"stylelint-order": "^5.0.0",
"tailwindcss": "^3.1.8",
"terser": "^5.15.0",
"typescript": "^4.7.4",
"unocss": "^0.45.9",
"unplugin-vue-define-options": "^0.7.3",
"vite": "^3.0.9",
"unplugin-vue-define-options": "0.7.3",
"vite": "^3.1.0",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-remove-console": "^1.1.0",
"vite-svg-loader": "^3.4.0",
"vue-eslint-parser": "^8.2.0",
"vue-tsc": "^0.40.1"
"vue-tsc": "^0.40.7"
},
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
"rollup",
"terser",
"webpack"
]
}

2212
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,8 @@
module.exports = {
plugins: [require("autoprefixer"), require("postcss-import")]
plugins: {
"postcss-import": {},
tailwindcss: {},
autoprefixer: {},
...(process.env.NODE_ENV === "production" ? { cssnano: {} } : {})
}
};

View File

@@ -1,5 +1,5 @@
{
"Version": "3.4.5",
"Version": "3.5.0",
"Title": "PureAdmin",
"FixedHeader": true,
"HiddenSideBar": false,

View File

@@ -102,7 +102,7 @@ onMounted(() => {
v-for="(item, key) in titleLists"
:key="key"
:title="item.text"
class="dark:color-bg_color"
class="dark:text-bg_color"
@mouseenter.prevent="onEnter(key)"
@mouseleave.prevent="focusIndex = -1"
>

View File

@@ -35,7 +35,7 @@ const nodeDragNode = item => {
<!-- 左侧bpmn元素选择器 -->
<div class="node-panel">
<div
class="node-item dark:color-bg_color"
class="node-item dark:text-bg_color"
v-for="item in props.nodeList"
:key="item.text"
@mousedown="nodeDragNode(item)"

View File

@@ -118,7 +118,7 @@ watch(
</script>
<template>
<div class="selector w-350px">
<div class="selector w-[350px]">
<el-input v-model="inputValue" disabled>
<template #append>
<el-popover
@@ -132,7 +132,7 @@ watch(
>
<template #reference>
<div
class="w-40px h-32px cursor-pointer flex justify-center items-center"
class="w-[40px] h-[32px] cursor-pointer flex justify-center items-center"
@click="visible = !visible"
>
<IconifyIconOnline :icon="currentActiveType + icon" />
@@ -156,12 +156,12 @@ watch(
>
<el-divider class="tab-divider" border-style="dashed" />
<el-scrollbar height="220px">
<ul class="flex-wrap px-2 ml-2">
<ul class="flex flex-wrap px-2 ml-2">
<li
v-for="(item, key) in pageList"
:key="key"
:title="item"
class="icon-item p-2 w-1/10 cursor-pointer mr-2 mt-1 flex justify-center items-center border border-solid"
class="icon-item p-2 w-[1/10] cursor-pointer mr-2 mt-1 flex justify-center items-center border border-solid"
:style="iconItemStyle(item)"
@click="onChangeIcon(item)"
>

View File

@@ -78,7 +78,7 @@ export default defineComponent({
const _width: number = await getOriginWidth(unref(renderText), options);
options.scale =
props.width === 0 ? undefined : (props.width / _width) * 4;
const canvasRef: HTMLCanvasElement = await toCanvas(
const canvasRef: any = await toCanvas(
unref(wrapRef) as HTMLCanvasElement,
unref(renderText),
options

View File

@@ -166,7 +166,7 @@ let autoPlay = computed(() => {
});
let scrollSwitch = computed(() => {
// 从 props 解构出来的 属性 不再具有应性.
// 从 props 解构出来的 属性 不再具有应性.
return (props.data as any).length >= unref(options).limitMoveNum;
});

View File

@@ -117,12 +117,12 @@ export default defineComponent({
<>
<div
{...attrs}
class="w-99/100 mt-6 p-2 bg-white dark:bg-dark"
class="w-[99/100] mt-6 p-2 bg-white dark:bg-dark"
v-loading={props.loading}
element-loading-svg={loadingSvg}
element-loading-svg-view-box="-10, -10, 50, 50"
>
<div class="flex justify-between w-full h-60px p-4">
<div class="flex justify-between w-full h-[60px] p-4">
<p class="font-bold truncate">{props.title}</p>
<div class="flex items-center justify-around">
<div class="flex mr-4">{slots?.buttons()}</div>

View File

@@ -55,13 +55,13 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
<!-- 国际化 -->
<el-dropdown id="header-translation" trigger="click">
<globalization
class="navbar-bg-hover w-40px h-48px p-11px cursor-pointer outline-none"
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-none"
/>
<template #dropdown>
<el-dropdown-menu class="translation">
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'zh')"
:class="['!dark:color-white', getDropdownItemClass(locale, 'zh')]"
:class="['dark:!text-white', getDropdownItemClass(locale, 'zh')]"
@click="translationCh"
>
<IconifyIconOffline
@@ -73,7 +73,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
</el-dropdown-item>
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'en')"
:class="['!dark:color-white', getDropdownItemClass(locale, 'en')]"
:class="['dark:!text-white', getDropdownItemClass(locale, 'en')]"
@click="translationEn"
>
<span class="check-en" v-show="locale === 'en'">
@@ -88,7 +88,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
<el-dropdown trigger="click">
<span class="el-dropdown-link navbar-bg-hover">
<img v-if="avatars" :src="avatars" :style="avatarsStyle" />
<p v-if="username" class="dark:color-white">{{ username }}</p>
<p v-if="username" class="dark:text-white">{{ username }}</p>
</span>
<template #dropdown>
<el-dropdown-menu class="logout">

View File

@@ -45,7 +45,7 @@ function hoverDescription(event, description) {
<template>
<div
class="notice-container border-b-1 border-[#f0f0f0] dark:border-[#303030]"
class="notice-container border-b-[1px] border-solid border-[#f0f0f0] dark:border-[#303030]"
>
<el-avatar
v-if="props.noticeItem.avatar"
@@ -54,7 +54,7 @@ function hoverDescription(event, description) {
class="notice-container-avatar"
/>
<div class="notice-container-text">
<div class="notice-text-title color-[#000000d9] dark:color-white">
<div class="notice-text-title text-[#000000d9] dark:text-white">
<el-tooltip
popper-class="notice-title-popper"
:disabled="!titleTooltip"
@@ -93,7 +93,7 @@ function hoverDescription(event, description) {
{{ props.noticeItem.description }}
</div>
</el-tooltip>
<div class="notice-text-datetime color-[#00000073] dark:color-white">
<div class="notice-text-datetime text-[#00000073] dark:text-white">
{{ props.noticeItem.datetime }}
</div>
</div>

View File

@@ -21,12 +21,14 @@ emitter.on("openPanel", () => {
<div ref="target" class="right-panel bg-white dark:bg-dark">
<div class="right-panel-items">
<div class="project-configuration">
<h3>项目配置</h3>
<h3 class="dark:text-white">项目配置</h3>
<el-icon title="关闭配置" class="el-icon-close" @click="show = !show">
<IconifyIconOffline icon="close" />
</el-icon>
</div>
<div class="border-b-1 border-[#dcdfe6] dark:border-[#303030]" />
<div
class="border-b-[1px] border-solid border-[#dcdfe6] dark:border-[#303030]"
/>
<slot />
</div>
</div>

View File

@@ -8,7 +8,7 @@ const { isFullscreen, toggle } = useFullscreen();
<template>
<div
class="screen-full w-36px h-48px flex-ac cursor-pointer navbar-bg-hover"
class="screen-full w-[36px] h-[48px] flex-ac cursor-pointer navbar-bg-hover"
@click="toggle"
>
<FontIcon

View File

@@ -1,5 +1,5 @@
<template>
<div class="search-footer color-[#333] dark:color-white">
<div class="search-footer text-[#333] dark:text-white">
<span class="search-footer-item">
<enterOutlined class="icon" />
确认

View File

@@ -9,7 +9,7 @@ function handleSearch() {
<template>
<div
class="search-container w-40px h-48px flex-c cursor-pointer navbar-bg-hover"
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
@click="handleSearch"
>
<IconifyIconOffline icon="search" />

View File

@@ -309,7 +309,7 @@ nextTick(() => {
<el-divider>界面显示</el-divider>
<ul class="setting">
<li>
<span>灰色模式</span>
<span class="dark:text-white">灰色模式</span>
<el-switch
v-model="settings.greyVal"
inline-prompt
@@ -320,7 +320,7 @@ nextTick(() => {
/>
</li>
<li>
<span>色弱模式</span>
<span class="dark:text-white">色弱模式</span>
<el-switch
v-model="settings.weakVal"
inline-prompt
@@ -331,7 +331,7 @@ nextTick(() => {
/>
</li>
<li>
<span>隐藏标签页</span>
<span class="dark:text-white">隐藏标签页</span>
<el-switch
v-model="settings.tabsVal"
inline-prompt
@@ -342,7 +342,7 @@ nextTick(() => {
/>
</li>
<li>
<span>侧边栏Logo</span>
<span class="dark:text-white">侧边栏Logo</span>
<el-switch
v-model="logoVal"
inline-prompt
@@ -355,7 +355,7 @@ nextTick(() => {
/>
</li>
<li>
<span>标签页持久化</span>
<span class="dark:text-white">标签页持久化</span>
<el-switch
v-model="settings.multiTagsCache"
inline-prompt
@@ -367,7 +367,7 @@ nextTick(() => {
</li>
<li>
<span>标签风格</span>
<span class="dark:text-white">标签风格</span>
<el-radio-group v-model="markValue" size="small" @change="onChange">
<el-radio label="card">卡片</el-radio>
<el-radio label="smart">灵动</el-radio>

View File

@@ -67,13 +67,13 @@ watch(
<!-- 国际化 -->
<el-dropdown id="header-translation" trigger="click">
<globalization
class="navbar-bg-hover w-40px h-48px p-11px cursor-pointer outline-none"
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-none"
/>
<template #dropdown>
<el-dropdown-menu class="translation">
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'zh')"
:class="['!dark:color-white', getDropdownItemClass(locale, 'zh')]"
:class="['dark:!text-white', getDropdownItemClass(locale, 'zh')]"
@click="translationCh"
>
<span class="check-zh" v-show="locale === 'zh'">
@@ -83,7 +83,7 @@ watch(
</el-dropdown-item>
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'en')"
:class="['!dark:color-white', getDropdownItemClass(locale, 'en')]"
:class="['dark:!text-white', getDropdownItemClass(locale, 'en')]"
@click="translationEn"
>
<span class="check-en" v-show="locale === 'en'">
@@ -98,7 +98,7 @@ watch(
<el-dropdown trigger="click">
<span class="el-dropdown-link navbar-bg-hover">
<img v-if="avatars" :src="avatars" :style="avatarsStyle" />
<p v-if="username" class="dark:color-white">{{ username }}</p>
<p v-if="username" class="dark:text-white">{{ username }}</p>
</span>
<template #dropdown>
<el-dropdown-menu class="logout">

View File

@@ -28,7 +28,7 @@ const toggleClick = () => {
>
<IconifyIconOffline
:icon="props.isActive ? 'menu-fold' : 'menu-unfold'"
class="cursor-pointer inline-block align-middle color-primary hover:color-primary !dark:hover:color-white w-16px h-16px ml-4 mb-1"
class="cursor-pointer inline-block align-middle text-primary hover:text-primary dark:hover:!text-white w-[16px] h-[16px] ml-4 mb-1"
@click="toggleClick"
/>
</el-tooltip>

View File

@@ -99,13 +99,13 @@ watch(
<!-- 国际化 -->
<el-dropdown id="header-translation" trigger="click">
<globalization
class="navbar-bg-hover w-40px h-48px p-11px cursor-pointer outline-none"
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-none"
/>
<template #dropdown>
<el-dropdown-menu class="translation">
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'zh')"
:class="['!dark:color-white', getDropdownItemClass(locale, 'zh')]"
:class="['dark:!text-white', getDropdownItemClass(locale, 'zh')]"
@click="translationCh"
>
<span class="check-zh" v-show="locale === 'zh'">
@@ -115,7 +115,7 @@ watch(
</el-dropdown-item>
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'en')"
:class="['!dark:color-white', getDropdownItemClass(locale, 'en')]"
:class="['dark:!text-white', getDropdownItemClass(locale, 'en')]"
@click="translationEn"
>
<span class="check-en" v-show="locale === 'en'">
@@ -130,7 +130,7 @@ watch(
<el-dropdown trigger="click">
<span class="el-dropdown-link navbar-bg-hover">
<img v-if="avatars" :src="avatars" :style="avatarsStyle" />
<p v-if="username" class="dark:color-white">{{ username }}</p>
<p v-if="username" class="dark:text-white">{{ username }}</p>
</span>
<template #dropdown>
<el-dropdown-menu class="logout">

View File

@@ -24,7 +24,7 @@ const toggleClick = () => {
>
<IconifyIconOffline
:icon="props.isActive ? 'menu-fold' : 'menu-unfold'"
class="inline-block align-middle hover:color-primary !dark:hover:color-white"
class="inline-block align-middle hover:text-primary dark:hover:!text-white"
/>
</div>
</template>

View File

@@ -9,7 +9,6 @@ import { useResizeObserver, useDebounceFn } from "@vueuse/core";
import { useSettingStoreHook } from "/@/store/modules/settings";
import { handleAliveRoute, delAliveRoutes } from "/@/router/utils";
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
import { usePermissionStoreHook } from "/@/store/modules/permission";
import { ref, watch, unref, toRaw, nextTick, onBeforeMount } from "vue";
const {
@@ -276,7 +275,6 @@ function onClickDrop(key, item, selectRoute?: RouteConfigs) {
startIndex: 1,
length: multiTags.value.length
});
usePermissionStoreHook().clearAllCachePage();
router.push("/welcome");
break;
}
@@ -492,7 +490,7 @@ onMounted(() => {
>
<router-link
:to="item.path"
class="!dark:color-text_color_primary !dark:hover:color-primary"
class="dark:!text-text_color_primary dark:hover:!text-primary"
>
{{ transformI18n(item.meta.title) }}
</router-link>
@@ -557,7 +555,7 @@ onMounted(() => {
placement="bottom-end"
@command="handleCommand"
>
<IconifyIconOffline icon="arrow-down" class="dark:color-white" />
<IconifyIconOffline icon="arrow-down" class="dark:text-white" />
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item

View File

@@ -35,7 +35,7 @@ export function useNav() {
const getDropdownItemClass = computed(() => {
return (locale, t) => {
return locale === t ? "" : "!dark:hover:color-primary";
return locale === t ? "" : "dark:hover:!text-primary";
};
});

View File

@@ -144,8 +144,8 @@ const layoutHeader = defineComponent({
{
default: () => [
!pureSetting.hiddenSideBar
? h(fullScreen, { class: "dark:color-white" })
: h(exitScreen, { class: "dark:color-white" })
? h(fullScreen, { class: "dark:text-white" })
: h(exitScreen, { class: "dark:text-white" })
]
}
)

View File

@@ -14,7 +14,6 @@ import { injectResponsiveStorage } from "/@/utils/responsive";
import Table from "@pureadmin/table";
import PureDescriptions from "@pureadmin/descriptions";
import "uno.css";
import "animate.css";
// 引入重置样式
import "./style/reset.scss";

View File

@@ -106,6 +106,7 @@ export function resetRouter() {
);
}
});
usePermissionStoreHook().clearAllCachePage();
}
// 路由白名单

View File

@@ -145,6 +145,14 @@ const ableRouter: RouteConfigsTable = {
meta: {
title: $t("menus.hsExecl")
}
},
{
path: "/able/infiniteScroll",
name: "InfiniteScroll",
component: () => import("/@/views/able/infinite-scroll.vue"),
meta: {
title: $t("menus.hsInfiniteScroll")
}
}
]
};

View File

@@ -230,16 +230,21 @@ function addAsyncRoutes(arrRoutes: Array<RouteRecordRaw>) {
// 将backstage属性加入meta标识此路由为后端返回路由
v.meta.backstage = true;
// 父级的redirect属性取值如果子级存在且父级的redirect属性不存在默认取第一个子级的path如果子级存在且父级的redirect属性存在取存在的redirect属性会覆盖默认值
if (v?.children && !v.redirect) v.redirect = v.children[0].path;
if (v?.children && v.children.length && !v.redirect)
v.redirect = v.children[0].path;
// 父级的name属性取值如果子级存在且父级的name属性不存在默认取第一个子级的name如果子级存在且父级的name属性存在取存在的name属性会覆盖默认值
if (v?.children && !v.name) v.name = v.children[0].name;
if (v.meta?.frameSrc) v.component = IFrame;
// 对后端传component组件路径和不传做兼容如果后端传component组件路径那么path可以随便写如果不传component组件路径会跟path保持一致
const index = v?.component
? modulesRoutesKeys.findIndex(ev => ev.includes(v.component as any))
: modulesRoutesKeys.findIndex(ev => ev.includes(v.path));
v.component = modulesRoutes[modulesRoutesKeys[index]];
if (v.children) {
if (v?.children && v.children.length && !v.name)
v.name = v.children[0].name;
if (v.meta?.frameSrc) {
v.component = IFrame;
} else {
// 对后端传component组件路径和不传做兼容如果后端传component组件路径那么path可以随便写如果不传component组件路径会跟path保持一致
const index = v?.component
? modulesRoutesKeys.findIndex(ev => ev.includes(v.component as any))
: modulesRoutesKeys.findIndex(ev => ev.includes(v.path));
v.component = modulesRoutes[modulesRoutesKeys[index]];
}
if (v?.children && v.children.length) {
addAsyncRoutes(v.children);
}
});

View File

@@ -63,6 +63,9 @@ export const usePermissionStore = defineStore({
},
// 清空缓存页面
clearAllCachePage() {
this.wholeMenus = [];
this.menusTree = [];
this.buttonAuth = [];
this.cachePageList = [];
}
}

View File

@@ -68,6 +68,7 @@ export const useUserStore = defineStore({
},
// 刷新token
async refreshToken(data) {
removeToken();
return refreshToken(data).then(data => {
if (data) {
setToken(data);

View File

@@ -129,7 +129,8 @@ html.dark {
}
.vxe-modal--title,
.vxe-button--content {
.vxe-button--content,
.vxe-modal--header-title {
color: var(--el-text-color-primary);
}
@@ -137,6 +138,10 @@ html.dark {
background: var(--el-color-primary) !important;
}
.vxe-button {
background-color: transparent;
}
/* 项目配置面板 */
.right-panel-items {
.el-divider__text {

View File

@@ -3,6 +3,7 @@
@import "./element-plus.scss";
@import "./sidebar.scss";
@import "./dark.scss";
@import "./tailwind.css";
:root {
--pure-transition-duration: 0.016s;

View File

@@ -182,7 +182,6 @@ button,
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 1 */
background-color: transparent; /* 2 */
background-image: none; /* 2 */
}

View File

@@ -229,7 +229,7 @@
.screen-full,
/* 国际化 */
.globalization,
/* */
/* */
.el-dropdown-link,
/* 设置 */
.el-icon-setting {
@@ -592,7 +592,7 @@ body[layout="vertical"] {
.screen-full,
/* 国际化 */
.globalization,
/* */
/* */
.el-dropdown-link,
/* 设置 */
.el-icon-setting {

29
src/style/tailwind.css Normal file
View File

@@ -0,0 +1,29 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.bg-dark {
@apply bg-bg_color;
}
.wh-full {
@apply w-full h-full;
}
.flex-c {
@apply flex justify-center items-center;
}
.flex-ac {
@apply flex justify-around items-center;
}
.flex-bc {
@apply flex justify-between items-center;
}
.navbar-bg-hover {
@apply dark:text-white dark:hover:!bg-[#242424];
}
}

View File

@@ -37,8 +37,8 @@ function handleAnchorClick(e, link) {
</span>
</div>
</template>
<div class="w-400px">
<Anchor class="float-left mt-200px" @click="handleAnchorClick">
<div class="w-[400px]">
<Anchor class="float-left mt-[200px]" @click="handleAnchorClick">
<AnchorLink href="one" title="测试one" />
<AnchorLink href="two" title="测试two" />
<AnchorLink href="three" title="测试three" />
@@ -47,21 +47,21 @@ function handleAnchorClick(e, link) {
<el-scrollbar class="float-right overflow-auto" height="600px">
<header
id="one"
class="w-200px h-600px text-cyan-50 flex justify-center items-center text-4xl"
class="w-[200px] h-[600px] text-cyan-50 flex justify-center items-center text-4xl"
style="background: #409eff"
>
测试one
</header>
<header
id="two"
class="w-200px h-600px text-cyan-50 flex justify-center items-center text-4xl"
class="w-[200px] h-[600px] text-cyan-50 flex justify-center items-center text-4xl"
style="background: #67c23a"
>
测试two
</header>
<header
id="three"
class="w-200px h-600px text-cyan-50 flex justify-center items-center text-4xl"
class="w-[200px] h-[600px] text-cyan-50 flex justify-center items-center text-4xl"
style="background: #f56c6c"
>
测试three

View File

@@ -149,7 +149,7 @@ const onLoadData = treeNode => {
<div>
<span>线性样式</span>
<TreeSelect
class="w-200px"
class="w-[200px]"
v-model:value="value1"
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
@@ -169,7 +169,7 @@ const onLoadData = treeNode => {
<div>
<span>虚拟滚动</span>
<TreeSelect
class="w-200px mt-6"
class="w-[200px] mt-6"
v-model:value="checkedKeys"
tree-checkable
tree-default-expand-all
@@ -190,7 +190,7 @@ const onLoadData = treeNode => {
<div>
<span>可勾选</span>
<TreeSelect
class="w-200px"
class="w-[200px]"
v-model:value="value2"
:tree-data="treeData2"
tree-checkable
@@ -203,7 +203,7 @@ const onLoadData = treeNode => {
<div>
<span>异步加载</span>
<TreeSelect
class="w-200px"
class="w-[200px]"
v-model:value="value3"
tree-data-simple-mode
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"

View File

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

View File

@@ -0,0 +1,68 @@
<script lang="ts" setup>
import { ref } from "vue";
import { default as vElTableInfiniteScroll } from "el-table-infinite-scroll";
defineOptions({
name: "InfiniteScroll"
});
const dataTemplate = new Array(10).fill({
date: "2022-08-24",
name: "RealityBoy",
age: "18"
});
const data = ref([]);
const disabled = ref(false);
const page = ref(0);
const total = ref(10);
const load = () => {
if (disabled.value) return;
page.value++;
if (page.value <= total.value) {
data.value = data.value.concat(dataTemplate);
}
if (page.value === total.value) {
disabled.value = true;
}
};
</script>
<template>
<el-card>
<template #header>
<div class="font-medium">
表格无限滚动
<el-link
href="https://github.com/yujinpan/el-table-infinite-scroll"
target="_blank"
style="font-size: 16px; margin: 0 5px 4px 0"
>
github地址
</el-link>
</div>
</template>
<div>
<p class="mb-2">
<span>loaded page(total: {{ total }}): {{ page }}, </span>
disabled:
<el-switch v-model="disabled" :disabled="page >= total" />
</p>
<el-table
v-el-table-infinite-scroll="load"
:data="data"
:infinite-scroll-disabled="disabled"
height="435px"
>
<el-table-column type="index" />
<el-table-column prop="date" label="date" />
<el-table-column prop="name" label="name" />
<el-table-column prop="age" label="age" />
</el-table>
</div>
</el-card>
</template>

View File

@@ -30,14 +30,14 @@ let 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-[20px]">
<el-card>
<template #header>
<div class="card-header">
<span class="font-medium"> 普通树结构 </span>
</div>
</template>
<div class="max-h-550px overflow-y-auto">
<div class="max-h-[550px] overflow-y-auto">
<el-tree
:data="menusData"
:props="dataProps"
@@ -66,7 +66,7 @@ let dataProps = {
<span class="font-medium"> 虚拟树结构 </span>
</div>
</template>
<div class="max-h-550px overflow-y-auto">
<div class="max-h-[550px] overflow-y-auto">
<el-tree-v2
:data="menusData"
:props="dataProps"

View File

@@ -22,7 +22,7 @@ let showAllPages = ref(false);
const rotations = [0, 90, 180, 270];
const source =
"https://pure-admin-doc.vercel.app/pdf/Cookie%E5%92%8CSession%E5%8C%BA%E5%88%AB%E7%94%A8%E6%B3%95.pdf";
"https://xiaoxian521.github.io/pure-admin-doc/pdf/Cookie%E5%92%8CSession%E5%8C%BA%E5%88%AB%E7%94%A8%E6%B3%95.pdf";
const handleDocumentRender = () => {
loading.value = false;
@@ -73,7 +73,7 @@ const onPrint = () => {
{{ currentPage }} / {{ pageCount }}
</el-pagination>
</div>
<div class="w-170px flex-bc">
<div class="w-[170px] flex-bc">
<el-checkbox v-model="showAllPages" @change="showAllPagesChange">
显示所有页面
</el-checkbox>

View File

@@ -194,11 +194,10 @@ const tableData: User[] = [
>
<p class="font-medium pt-1">Element-Plus Table</p>
<el-table
class="el-table"
:data="tableData"
border
style="margin: 40px auto; width: 100%"
:data="tableData"
:row-class-name="tableRowClassName"
class="el-table w-full mt-[40px] mr-[40px]"
>
<el-table-column prop="date" label="Date" width="180" />
<el-table-column prop="name" label="Name" width="180" />

View File

@@ -40,19 +40,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-[10px] 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-[10px] 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-[10px] text-center">
<div class="font-bold">样式配置</div>
<ReQrcode
:text="qrcodeText"
@@ -66,19 +66,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-[10px] 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-[10px] 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-[10px] text-center">
<div class="font-bold">失效</div>
<ReQrcode
:text="qrcodeText"
@@ -88,13 +88,13 @@ 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-[10px] text-center">
<div class="font-bold">logo配置</div>
<ReQrcode :text="qrcodeText" :logo="avatars" />
</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-[10px] text-center">
<div class="font-bold">logo样式</div>
<ReQrcode
:text="qrcodeText"
@@ -109,7 +109,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-[10px] text-center">
<div class="font-bold">大小配置</div>
<ReQrcode :text="qrcodeText" :width="100" />
</el-card>

View File

@@ -119,11 +119,11 @@ const swiperExample: SwiperExample[] = [
</template>
<el-row :gutter="10">
<el-col v-for="item in swiperExample" :key="item.id" :span="12">
<h3 class="py-24px text-24px font-bold">{{ item.label }}</h3>
<h3 class="py-[24px] text-[24px] font-bold">{{ item.label }}</h3>
<swiper v-bind="item.options">
<swiper-slide v-for="i in 5" :key="i">
<div
class="flex justify-center items-center h-240px border-1px border-[#999] text-18px font-bold"
class="flex justify-center items-center h-[240px] border-[1px] border-[#999] text-[18px] font-bold"
>
Slide{{ i }}
</div>

View File

@@ -29,7 +29,7 @@ function changeMessage(message) {
<div class="dynamic-scroller-demo">
<div class="flex justify-around mb-4">
<el-input
class="mr-2 !w-1/1.5"
class="mr-2 !w-[1/1.5]"
clearable
v-model="search"
placeholder="Filter..."

View File

@@ -23,8 +23,8 @@ defineOptions({
</div>
</template>
<div class="w-full flex justify-around flex-wrap">
<vertical-list class="h-500px w-500px" />
<horizontal-list class="h-500px w-500px" />
<vertical-list class="h-[500px] w-[500px]" />
<horizontal-list class="h-[500px] w-[500px]" />
</div>
</el-card>
</template>

View File

@@ -33,7 +33,7 @@ function onResize() {
<div class="dynamic-scroller-demo">
<div class="flex justify-around mb-4">
<el-input
class="mr-2 !w-1/1.5"
class="mr-2 !w-[1/1.5]"
clearable
v-model="search"
placeholder="Filter..."

View File

@@ -18,7 +18,7 @@ export function useColumns() {
label: "文档地址",
cellRenderer: () => {
return (
<a href="https://pure-admin-doc.vercel.app" target="_blank">
<a href="http://yiming_chang.gitee.io/pure-admin-doc" target="_blank">
<span style="color: var(--el-color-primary)"></span>
</a>
);
@@ -28,7 +28,7 @@ export function useColumns() {
label: "预览地址",
cellRenderer: () => {
return (
<a href="https://vue-pure-admin.vercel.app" target="_blank">
<a href="http://yiming_chang.gitee.io/vue-pure-admin" target="_blank">
<span style="color: var(--el-color-primary)"></span>
</a>
);

View File

@@ -18,7 +18,7 @@ const url = ref(`${VITE_PUBLIC_PATH}html/button.html`);
<span class="font-medium">通过iframe引入按钮页面</span>
</div>
</template>
<iframe :src="url" frameborder="0" class="iframe w-full h-60vh" />
<iframe :src="url" frameborder="0" class="iframe w-full h-[60vh]" />
</el-card>
</template>

View File

@@ -8,7 +8,7 @@ defineOptions({
<template>
<div class="back" title="返回上一页" @click="$router.go(-1)">
<back class="w-80px h-80px" />
<back class="w-[80px] h-[80px]" />
</div>
</template>

View File

@@ -7,7 +7,7 @@ defineOptions({
</script>
<template>
<div class="flex justify-center items-center h-screen-sm">
<div class="flex justify-center items-center h-[640px]">
<noAccess />
<div class="ml-12">
<p

View File

@@ -7,7 +7,7 @@ defineOptions({
</script>
<template>
<div class="flex justify-center items-center h-screen-sm">
<div class="flex justify-center items-center h-[640px]">
<noExist />
<div class="ml-12">
<p

View File

@@ -7,7 +7,7 @@ defineOptions({
</script>
<template>
<div class="flex justify-center items-center h-screen-sm">
<div class="flex justify-center items-center h-[640px]">
<noServer />
<div class="ml-12">
<p

View File

@@ -46,7 +46,7 @@ const cardLogoClass = computed(() => [
<template>
<div :class="cardClass">
<div class="list-card-item_detail !bg-white !dark:bg-dark">
<div class="list-card-item_detail bg-white dark:bg-dark">
<el-row justify="space-between">
<div :class="cardLogoClass">
<shopIcon v-if="product.type === 1" />
@@ -68,7 +68,7 @@ const cardLogoClass = computed(() => [
:disabled="!product.isSetup"
max-height="2"
>
<IconifyIconOffline icon="more-vertical" class="text-size-24px" />
<IconifyIconOffline icon="more-vertical" class="text-[24px]" />
<template #dropdown>
<el-dropdown-menu :disabled="!product.isSetup">
<el-dropdown-item @click="handleClickManage(product)">
@@ -82,10 +82,10 @@ const cardLogoClass = computed(() => [
</el-dropdown>
</div>
</el-row>
<p class="list-card-item_detail--name color-text_color_primary">
<p class="list-card-item_detail--name text-text_color_primary">
{{ product.name }}
</p>
<p class="list-card-item_detail--desc color-text_color_regular">
<p class="list-card-item_detail--desc text-text_color_regular">
{{ product.description }}
</p>
</div>

View File

@@ -102,13 +102,13 @@ dataThemeChange();
<!-- 国际化 -->
<el-dropdown trigger="click">
<globalization
class="hover:color-primary !hover:bg-transparent w-20px h-20px ml-1.5 cursor-pointer outline-none duration-300"
class="hover:text-primary hover:!bg-[transparent] w-[20px] h-[20px] ml-1.5 cursor-pointer outline-none duration-300"
/>
<template #dropdown>
<el-dropdown-menu class="translation">
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'zh')"
:class="['!dark:color-white', getDropdownItemClass(locale, 'zh')]"
:class="['dark:!text-white', getDropdownItemClass(locale, 'zh')]"
@click="translationCh"
>
<IconifyIconOffline
@@ -120,7 +120,7 @@ dataThemeChange();
</el-dropdown-item>
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'en')"
:class="['!dark:color-white', getDropdownItemClass(locale, 'en')]"
:class="['dark:!text-white', getDropdownItemClass(locale, 'en')]"
@click="translationEn"
>
<span class="check-en" v-show="locale === 'en'">
@@ -202,7 +202,7 @@ dataThemeChange();
<Motion :delay="250">
<el-form-item>
<div class="w-full h-20px flex justify-between items-center">
<div class="w-full h-[20px] flex justify-between items-center">
<el-checkbox v-model="checked">
{{ t("login.remember") }}
</el-checkbox>
@@ -228,7 +228,7 @@ dataThemeChange();
<Motion :delay="300">
<el-form-item>
<div class="w-full h-20px flex justify-between items-center">
<div class="w-full h-[20px] flex justify-between items-center">
<el-button
v-for="(item, index) in operates"
:key="index"

View File

@@ -57,7 +57,7 @@ const columns = [
<span
role="img"
aria-label="dingding"
class="anticon anticon-dingding cursor-pointer flex items-center cursor-pointer"
class="anticon anticon-dingding flex items-center cursor-pointer"
style="color: rgb(0, 160, 233); margin-left: 8px"
>
<svg

View File

@@ -60,7 +60,7 @@ onMounted(() => {
ref="formRef"
:inline="true"
:model="form"
class="bg-white dark:bg-dark w-99/100 pl-8 pt-4"
class="bg-white dark:bg-dark w-[99/100] pl-8 pt-4"
>
<el-form-item label="部门名称:" prop="user">
<el-input v-model="form.user" placeholder="请输入部门名称" clearable />

View File

@@ -88,7 +88,7 @@ const checkboxChangeEvent: VxeTableEvents.CheckboxChange = ({ records }) => {
size="680px"
>
<template #header>
<span class="color-black dark:color-white">{{ drawTitle }}</span>
<span class="text-black dark:text-white">{{ drawTitle }}</span>
</template>
<el-divider />
<!-- 列表 -->

View File

@@ -224,10 +224,10 @@ function onHide() {
<!-- 工具栏 -->
<vxe-toolbar class="dark:bg-dark">
<template #buttons>
<div class="ml-20px">
<label>字典名称</label>
<div class="ml-[20px]">
<label class="dark:text-text_color_regular">字典名称 </label>
<el-input
class="!w-200px"
class="!w-[200px]"
v-model="dictData.filterName"
:placeholder="t('buttons.hssearch')"
@keyup.prevent="searchEvent"

View File

@@ -77,7 +77,7 @@ onMounted(() => {
ref="formRef"
:inline="true"
:model="form"
class="bg-white dark:bg-dark w-99/100 pl-8 pt-4"
class="bg-white dark:bg-dark w-[99/100] pl-8 pt-4"
>
<el-form-item label="角色名称:" prop="name">
<el-input v-model="form.name" placeholder="请输入角色名称" clearable />
@@ -175,7 +175,7 @@ onMounted(() => {
<el-dropdown-menu>
<el-dropdown-item>
<el-button
class="reset-margin !h-20px !text-gray-500"
class="reset-margin !h-[20px] !text-gray-500 dark:!text-white dark:hover:!text-primary"
link
type="primary"
:size="size"
@@ -186,7 +186,7 @@ onMounted(() => {
</el-dropdown-item>
<el-dropdown-item>
<el-button
class="reset-margin !h-20px !text-gray-500"
class="reset-margin !h-[20px] !text-gray-500 dark:!text-white dark:hover:!text-primary"
link
type="primary"
:size="size"

View File

@@ -79,7 +79,7 @@ onMounted(() => {
ref="formRef"
:inline="true"
:model="form"
class="bg-white dark:bg-dark w-99/100 pl-8 pt-4"
class="bg-white dark:bg-dark w-[99/100] pl-8 pt-4"
>
<el-form-item label="用户名称:" prop="username">
<el-input
@@ -187,7 +187,7 @@ onMounted(() => {
<el-dropdown-menu>
<el-dropdown-item>
<el-button
class="reset-margin !h-20px !text-gray-500"
class="reset-margin !h-[20px] !text-gray-500 dark:!text-white dark:hover:!text-primary"
link
type="primary"
:size="size"
@@ -198,7 +198,7 @@ onMounted(() => {
</el-dropdown-item>
<el-dropdown-item>
<el-button
class="reset-margin !h-20px !text-gray-500"
class="reset-margin !h-[20px] !text-gray-500 dark:!text-white dark:hover:!text-primary"
link
type="primary"
:size="size"

View File

@@ -69,8 +69,8 @@ onMounted(async () => {
</script>
<template>
<div class="max-w-260px h-full min-h-780px bg-white dark:bg-dark">
<div class="flex items-center h-34px">
<div class="max-w-[260px] h-full min-h-[780px] bg-white dark:bg-dark">
<div class="flex items-center h-[34px]">
<p class="flex-1 ml-2 font-bold text-base truncate" title="部门列表">
部门列表
</p>
@@ -92,7 +92,7 @@ onMounted(async () => {
</el-input>
<el-dropdown>
<IconifyIconOffline
class="w-28px cursor-pointer"
class="w-[28px] cursor-pointer"
width="18px"
icon="more-vertical"
/>
@@ -100,7 +100,7 @@ onMounted(async () => {
<el-dropdown-menu>
<el-dropdown-item>
<el-button
class="reset-margin !h-20px !text-gray-500 !dark:hover:color-primary"
class="reset-margin !h-[20px] !text-gray-500 dark:!text-white dark:hover:!text-primary"
link
type="primary"
:icon="useRenderIcon('expand')"
@@ -111,7 +111,7 @@ onMounted(async () => {
</el-dropdown-item>
<el-dropdown-item>
<el-button
class="reset-margin !h-20px !text-gray-500 !dark:hover:color-primary"
class="reset-margin !h-[20px] !text-gray-500 dark:!text-white dark:hover:!text-primary"
link
type="primary"
:icon="useRenderIcon('unExpand')"
@@ -122,7 +122,7 @@ onMounted(async () => {
</el-dropdown-item>
<el-dropdown-item>
<el-button
class="reset-margin !h-20px !text-gray-500 !dark:hover:color-primary"
class="reset-margin !h-[20px] !text-gray-500 dark:!text-white dark:hover:!text-primary"
link
type="primary"
:icon="useRenderIcon('reset')"
@@ -159,7 +159,7 @@ onMounted(async () => {
searchValue.trim().length > 0 &&
node.label.includes(searchValue) &&
'text-red-500',
highlightMap[node.id]?.highlight ? 'dark:color-primary' : ''
highlightMap[node.id]?.highlight ? 'dark:text-primary' : ''
]"
:style="{
background: highlightMap[node.id]?.highlight

View File

@@ -50,7 +50,7 @@ function onCloseTags() {
<template #header>
<div>标签页复用超出限制自动关闭使用场景: 动态路由</div>
</template>
<div class="flex-wrap items-center">
<div class="flex flex-wrap items-center">
<p>query传参模式</p>
<el-button
class="m-2"
@@ -64,7 +64,7 @@ function onCloseTags() {
<el-divider />
<div class="flex-wrap items-center">
<div class="flex flex-wrap items-center">
<p>params传参模式</p>
<el-button
class="m-2"
@@ -78,7 +78,7 @@ function onCloseTags() {
<el-divider />
<TreeSelect
class="w-300px"
class="w-[300px]"
v-model:value="value"
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
@@ -94,7 +94,7 @@ function onCloseTags() {
:tree-data="treeData"
>
<template #tagRender="{ closable, onClose, option }">
<el-tag class="mr-3px" :closable="closable" @close="onClose">
<el-tag class="mr-[3px]" :closable="closable" @close="onClose">
{{ transformI18n(option.meta.title) }}
</el-tag>
</template>

View File

@@ -58,7 +58,7 @@ export function useColumns() {
cellRenderer: () => {
return lists.map(v => {
return (
<el-tag class="mr-10px" type={v.type} size="small" effect="dark">
<el-tag class="mr-[10px]" type={v.type} size="small" effect="dark">
{v.label}
</el-tag>
);

20
tailwind.config.js Normal file
View File

@@ -0,0 +1,20 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: "class",
corePlugins: {
preflight: false
},
content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
theme: {
extend: {
colors: {
bg_color: "var(--el-bg-color)",
primary: "var(--el-color-primary)",
primary_light_9: "var(--el-color-primary-light-9)",
text_color_primary: "var(--el-text-color-primary)",
text_color_regular: "var(--el-text-color-regular)",
text_color_disabled: "var(--el-text-color-disabled)"
}
}
}
};

View File

@@ -105,7 +105,7 @@ export interface RouteChildrenConfigsTable {
/**
* @description 完整路由配置表
* @see {@link https://pure-admin-doc.vercel.app/pages/782b6e/#%E4%B8%80-%E9%85%8D%E7%BD%AE%E9%A1%B9}
* @see {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/782b6e/#%E4%B8%80-%E9%85%8D%E7%BD%AE%E9%A1%B9}
*/
export interface RouteConfigsTable {
/** 路由地址 `必填` */

View File

@@ -1,57 +0,0 @@
import {
transformerVariantGroup,
transformerDirectives,
presetAttributify,
defineConfig,
presetMini,
presetUno
} from "unocss";
// https://github.com/unocss/unocss#readme
export default defineConfig({
presets: [presetMini({ dark: "class" }), presetAttributify(), presetUno()],
transformers: [transformerDirectives(), transformerVariantGroup()],
// unocss默认不扫描 node_modules、dist、css以及其扩展 具体实现https://github.com/unocss/unocss/blob/03c8abe8f5020b3baaed3dfbfe8e2258dd041a7e/packages/vite/src/utils.ts#L3
exclude: [
"node_modules",
"dist",
".git",
".github",
".husky",
".vscode",
"build",
"locales",
"mock",
"public",
"types",
".eslintrc.js",
".prettierrc.js",
"postcss.config.js",
"stylelint.config.js",
"commitlint.config.js",
"README.md",
"CHANGELOG.md",
"README.en-US.md",
"CHANGELOG.en_US.md",
"CHANGELOG.zh_CN.md"
],
shortcuts: {
"bg-dark": "bg-bg_color",
"wh-full": "w-full h-full",
"flex-wrap": "flex flex-wrap",
"flex-c": "flex justify-center items-center",
"flex-ac": "flex justify-around items-center",
"flex-bc": "flex justify-between items-center",
"navbar-bg-hover": "dark:color-white !dark:hover:bg-[#242424]"
},
theme: {
colors: {
bg_color: "var(--el-bg-color)",
primary: "var(--el-color-primary)",
primary_light_9: "var(--el-color-primary-light-9)",
text_color_primary: "var(--el-text-color-primary)",
text_color_regular: "var(--el-text-color-regular)",
text_color_disabled: "var(--el-text-color-disabled)"
}
}
});