create-jnrs-template-vue 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/bin/{create.js → create.mjs} +1 -7
- package/jnrs-template-vue/README.md +2 -2
- package/jnrs-template-vue/components.d.ts +2 -0
- package/jnrs-template-vue/package.json +7 -8
- package/jnrs-template-vue/public/system/menu.json +8 -4
- package/jnrs-template-vue/src/assets/fonts/.keep +0 -0
- package/jnrs-template-vue/src/assets/fonts/AlibabaPuHuiTi-Regular.woff2 +0 -0
- package/jnrs-template-vue/src/assets/fonts/AlimamaShuHeiTi-Bold.woff2 +0 -0
- package/jnrs-template-vue/src/assets/images/common/jnrs-white.svg +1 -0
- package/jnrs-template-vue/src/assets/styles/fonts.scss +24 -0
- package/jnrs-template-vue/src/assets/styles/init.scss +33 -0
- package/jnrs-template-vue/src/assets/styles/main.scss +27 -0
- package/jnrs-template-vue/src/assets/styles/root.scss +29 -0
- package/jnrs-template-vue/src/layout/BlankLayout.vue +2 -1
- package/jnrs-template-vue/src/layout/RouterTabs.vue +11 -7
- package/jnrs-template-vue/src/layout/SideMenu.vue +82 -23
- package/jnrs-template-vue/src/layout/SideMenuItem.vue +4 -4
- package/jnrs-template-vue/src/layout/TopHeader.vue +62 -86
- package/jnrs-template-vue/src/layout/index.vue +12 -8
- package/jnrs-template-vue/src/main.ts +2 -2
- package/jnrs-template-vue/src/router/routes.ts +16 -16
- package/jnrs-template-vue/src/views/login/index.vue +228 -38
- package/jnrs-template-vue/tsconfig.json +6 -1
- package/jnrs-template-vue/vite.config.ts +2 -3
- package/jnrs-template-vue/viteMockServe/index.ts +5 -0
- package/package.json +2 -2
- package/jnrs-template-vue/src/assets/styles/base.css +0 -28
- package/jnrs-template-vue/src/assets/styles/main.css +0 -1
- package/jnrs-template-vue/src/utils/storage.ts +0 -7
- package/jnrs-template-vue/src/utils/validate.ts +0 -321
- package/jnrs-template-vue/src/utils/validator.ts +0 -153
package/README.md
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
TypeScript、Vue3 生态
|
|
8
8
|
|
|
9
9
|
## 🧩 安装使用说明
|
|
10
|
-
|
|
10
|
+
新项目默认名称为 jnrs-template-vue
|
|
11
11
|
```shell
|
|
12
12
|
✅ 正确用法
|
|
13
|
-
pnpm create jnrs-template-vue@latest
|
|
13
|
+
pnpm create jnrs-template-vue@latest
|
|
14
14
|
|
|
15
|
-
cd jnrs-
|
|
15
|
+
cd jnrs-template-vue
|
|
16
16
|
pnpm i
|
|
17
17
|
pnpm dev
|
|
18
18
|
pnpm build
|
|
@@ -21,9 +21,9 @@ pnpm build
|
|
|
21
21
|
pnpm add create-jnrs-template-vue
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## 📂 模板项目主要结构
|
|
25
25
|
```Text
|
|
26
|
-
jnrs-
|
|
26
|
+
jnrs-template-vue/
|
|
27
27
|
├── dist/ # 打包构建产物
|
|
28
28
|
├── node_modules/ # 项目依赖
|
|
29
29
|
├── viteMockServe/ # Mock 服务配置(用于开发环境模拟 API)
|
|
@@ -5,12 +5,6 @@ import { execSync, spawnSync } from 'child_process'
|
|
|
5
5
|
import minimist from 'minimist'
|
|
6
6
|
import prompts from 'prompts'
|
|
7
7
|
|
|
8
|
-
if (require.main !== module) {
|
|
9
|
-
console.error('❌ 此软件包是一个 CLI 工具,不要将其作为依赖项安装!')
|
|
10
|
-
console.error('✅ 正确用法:pnpm create jnrs-template-vue@latest jnrs-app-vue')
|
|
11
|
-
process.exit(1)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
const __filename = fileURLToPath(import.meta.url)
|
|
15
9
|
const __dirname = dirname(__filename)
|
|
16
10
|
|
|
@@ -76,7 +70,7 @@ async function main() {
|
|
|
76
70
|
type: 'text',
|
|
77
71
|
name: 'name',
|
|
78
72
|
message: '项目名称:',
|
|
79
|
-
initial: 'jnrs-
|
|
73
|
+
initial: 'jnrs-template-vue',
|
|
80
74
|
validate: (input) => {
|
|
81
75
|
if (!input) return '请输入项目名称!'
|
|
82
76
|
if (existsSync(input)) return '目录已存在!'
|
|
@@ -17,6 +17,7 @@ declare module 'vue' {
|
|
|
17
17
|
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
|
18
18
|
ElCard: typeof import('element-plus/es')['ElCard']
|
|
19
19
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
|
20
|
+
ElCol: typeof import('element-plus/es')['ElCol']
|
|
20
21
|
ElContainer: typeof import('element-plus/es')['ElContainer']
|
|
21
22
|
ElForm: typeof import('element-plus/es')['ElForm']
|
|
22
23
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
|
@@ -27,6 +28,7 @@ declare module 'vue' {
|
|
|
27
28
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
|
28
29
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
|
29
30
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
|
31
|
+
ElRow: typeof import('element-plus/es')['ElRow']
|
|
30
32
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
|
31
33
|
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
|
32
34
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jnrs-template-vue",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "JNRS
|
|
3
|
+
"version": "1.1.4",
|
|
4
|
+
"description": "JNRS 信息化管理系统模板",
|
|
5
5
|
"author": "Talia-Tan",
|
|
6
6
|
"private": true,
|
|
7
7
|
"type": "module",
|
|
@@ -18,11 +18,10 @@
|
|
|
18
18
|
"format": "prettier --write src/"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@
|
|
21
|
+
"@element-plus/icons-vue": "^2.3.2",
|
|
22
22
|
"@jnrs/core": "*",
|
|
23
|
+
"@jnrs/shared": "*",
|
|
23
24
|
"@jnrs/vue-core": "*",
|
|
24
|
-
"@element-plus/icons-vue": "^2.3.2",
|
|
25
|
-
"async-validator": "^4.2.5",
|
|
26
25
|
"element-plus": "^2.11.4",
|
|
27
26
|
"pinia": "^3.0.3",
|
|
28
27
|
"pinia-plugin-persistedstate": "^4.5.0",
|
|
@@ -41,14 +40,14 @@
|
|
|
41
40
|
"jiti": "^2.5.1",
|
|
42
41
|
"npm-run-all2": "^8.0.4",
|
|
43
42
|
"prettier": "3.6.2",
|
|
44
|
-
"sass
|
|
43
|
+
"sass": "^1.94.2",
|
|
45
44
|
"typescript": "~5.9.0",
|
|
46
45
|
"unplugin-auto-import": "^20.2.0",
|
|
47
46
|
"unplugin-vue-components": "^29.1.0",
|
|
48
47
|
"vite": "^7.1.7",
|
|
49
48
|
"vite-plugin-compression": "^0.5.1",
|
|
49
|
+
"vite-plugin-mock": "^3.0.2",
|
|
50
50
|
"vite-plugin-vue-devtools": "^8.0.2",
|
|
51
|
-
"vue-tsc": "^3.1.0"
|
|
52
|
-
"vite-plugin-mock": "^3.0.2"
|
|
51
|
+
"vue-tsc": "^3.1.0"
|
|
53
52
|
}
|
|
54
53
|
}
|
|
@@ -18,14 +18,16 @@
|
|
|
18
18
|
"name": "Crud",
|
|
19
19
|
"meta": {
|
|
20
20
|
"title": "测试页面",
|
|
21
|
-
"icon": "
|
|
21
|
+
"icon": "StarFilled",
|
|
22
|
+
"todoCount": 8
|
|
22
23
|
},
|
|
23
24
|
"component": "/crud/index"
|
|
24
25
|
},
|
|
25
26
|
{
|
|
26
27
|
"meta": {
|
|
27
28
|
"title": "系统管理",
|
|
28
|
-
"icon": "Tools"
|
|
29
|
+
"icon": "Tools",
|
|
30
|
+
"todoCount": 99
|
|
29
31
|
},
|
|
30
32
|
"children": [
|
|
31
33
|
{
|
|
@@ -33,7 +35,8 @@
|
|
|
33
35
|
"name": "SystemMine",
|
|
34
36
|
"meta": {
|
|
35
37
|
"title": "个人中心",
|
|
36
|
-
"icon": "User"
|
|
38
|
+
"icon": "User",
|
|
39
|
+
"todoCount": 99
|
|
37
40
|
},
|
|
38
41
|
"component": "/system/mine/index"
|
|
39
42
|
},
|
|
@@ -42,7 +45,8 @@
|
|
|
42
45
|
"name": "SystemUser",
|
|
43
46
|
"meta": {
|
|
44
47
|
"title": "用户管理",
|
|
45
|
-
"icon": "User"
|
|
48
|
+
"icon": "User",
|
|
49
|
+
"todoCount": 0
|
|
46
50
|
},
|
|
47
51
|
"component": "/system/user/index"
|
|
48
52
|
},
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 276.55 50.85"><defs><style>.a{fill:#fff;}</style></defs><path class="a" d="M-336.3,445.05c6.8,0,13.6-.05,20.41,0,.05,14.45-.12,28.89-.14,43.33.3,3.93-3.34,7.48-7.21,7.43-4.35,0-8.71,0-13.06,0Q-336.33,470.45-336.3,445.05Z" transform="translate(381.53 -445.04)"/><path class="a" d="M-306.42,447.84a6.54,6.54,0,0,1,5.5-2.79h12.49a1.57,1.57,0,0,1,1.11.31c5.76,3.57,11.54,7.1,17.3,10.67q0,11.28,0,22.58c-5.92-3.59-11.83-7.22-17.76-10.8v28.08c-6.79,0-13.59,0-20.38,0q0-20.82,0-41.63A10.53,10.53,0,0,1-306.42,447.84Z" transform="translate(381.53 -445.04)"/><path class="a" d="M-267.56,452.43a7.3,7.3,0,0,1,7.09-7.38h13.39c.06,16.92,0,33.85,0,50.78-6.83,0-13.66,0-20.49,0C-267.61,481.37-267.54,466.9-267.56,452.43Z" transform="translate(381.53 -445.04)"/><path class="a" d="M-236.93,445.06q26.9,0,53.78,0a7.23,7.23,0,0,1,7,5.58c.11,1.55,0,3.1,0,4.64-20.28,0-40.56,0-60.84-.06Q-236.91,450.14-236.93,445.06Z" transform="translate(381.53 -445.04)"/><path class="a" d="M-165.71,450a7.14,7.14,0,0,1,6.63-4.95h42.25a11.66,11.66,0,0,1,8.19,3.34,13.71,13.71,0,0,1,3.65,6.86h-40.62c0,3.36,0,6.72,0,10.09q16.77,0,33.54,0a7.29,7.29,0,0,1,7,6.09c.09,1.33,0,2.67,0,4-18.42.05-36.84,0-55.26,0A7,7,0,0,1-166,469.7c0-5.16,0-10.33,0-15.49A13.83,13.83,0,0,1-165.71,450Z" transform="translate(381.53 -445.04)"/><path class="a" d="M-196.48,457.73c6.79-.05,13.59,0,20.39,0,0,3.89,0,7.78,0,11.66a7.07,7.07,0,0,1-7.05,6.1c-11.19,0-22.37,0-33.55,0q0,10.2,0,20.38c-6.79,0-13.58,0-20.38,0,0-10.05,0-20.11,0-30.16q20.26,0,40.52,0C-196.36,463.05-196.48,460.38-196.48,457.73Z" transform="translate(381.53 -445.04)"/><path class="a" d="M-381.49,472.19c6.78,0,13.56,0,20.34,0,0,4.48,0,9,0,13.42,7.43.14,14.88.06,22.31,0,.11,3.39,0,6.78,0,10.17q-17.79,0-35.58,0a7.23,7.23,0,0,1-7.16-7.13C-381.48,483.2-381.55,477.7-381.49,472.19Z" transform="translate(381.53 -445.04)"/><path class="a" d="M-202.37,477.73h19.88c.72,2.63,1.29,5.31,2.06,7.93,18.36-.07,36.72,0,55.08-.06,0-2.56,0-5.13,0-7.69,6.78,0,13.56,0,20.34,0,0,3.6,0,7.2,0,10.8a7.08,7.08,0,0,1-6.79,7.14h-52.05c-11.43,0-22.86-.07-34.28,0Q-200.28,486.8-202.37,477.73Z" transform="translate(381.53 -445.04)"/></svg>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* font */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'Alibaba-PuHuiTi-Regular';
|
|
4
|
+
src: url('@/assets/fonts/AlibabaPuHuiTi-Regular.woff2');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@font-face {
|
|
8
|
+
font-family: 'AlimamaShuHeiTi-Bold';
|
|
9
|
+
src: url('@/assets/fonts/AlimamaShuHeiTi-Bold.woff2');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* 阿里巴巴普惠体 - 正黑体
|
|
14
|
+
*/
|
|
15
|
+
.Alibaba-PuHuiTi-Regular {
|
|
16
|
+
font-family: 'Alibaba-PuHuiTi-Regular';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* 阿里妈妈字体 - 数黑体
|
|
21
|
+
*/
|
|
22
|
+
.AlimamaShuHeiTi-Bold {
|
|
23
|
+
font-family: 'AlimamaShuHeiTi-Bold';
|
|
24
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
margin: 0;
|
|
6
|
+
font-family: Alibaba-PuHuiTi-Regular;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
a {
|
|
10
|
+
text-decoration: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* 所有自动填充 input */
|
|
14
|
+
input:-webkit-autofill,
|
|
15
|
+
input:-webkit-autofill:hover,
|
|
16
|
+
input:-webkit-autofill:focus,
|
|
17
|
+
input:-webkit-autofill:active {
|
|
18
|
+
-webkit-box-shadow: 0 0 0 1000px var(--input-bg, #fff) inset !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/*
|
|
22
|
+
* 禁止拖拽图片
|
|
23
|
+
* 禁止长按弹出菜单
|
|
24
|
+
*/
|
|
25
|
+
img {
|
|
26
|
+
-ms-user-drag: none;
|
|
27
|
+
-moz-user-drag: none;
|
|
28
|
+
-webkit-user-drag: none;
|
|
29
|
+
-webkit-touch-callout: none;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
object-fit: cover;
|
|
32
|
+
object-position: center center;
|
|
33
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use './init.scss';
|
|
2
|
+
@use './fonts.scss';
|
|
3
|
+
@use './root.scss';
|
|
4
|
+
|
|
5
|
+
body {
|
|
6
|
+
width: 100vw;
|
|
7
|
+
height: 100vh;
|
|
8
|
+
color: var(--jnrs-font-primary);
|
|
9
|
+
background: var(--jnrs-background-primary);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
#app {
|
|
13
|
+
min-width: 1280px;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* 禁止用户选中页面元素
|
|
19
|
+
*/
|
|
20
|
+
.no-select {
|
|
21
|
+
-khtml-user-drag: none;
|
|
22
|
+
-webkit-user-drag: none;
|
|
23
|
+
-webkit-user-select: none;
|
|
24
|
+
-moz-user-select: none;
|
|
25
|
+
-ms-user-select: none;
|
|
26
|
+
user-select: none;
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* 默认样式(浅色模式) */
|
|
2
|
+
:root {
|
|
3
|
+
// 业务相关
|
|
4
|
+
// --jnrs-color-primary: oklch(0.6 0.19 41); // jnrs 橙
|
|
5
|
+
--jnrs-color-primary: oklch(0.51 0.21 264); // 蔚蓝
|
|
6
|
+
--jnrs-color-primary-06: oklch(from var(--jnrs-color-primary) l c h / 0.6);
|
|
7
|
+
--jnrs-color-primary-light: oklch(from var(--jnrs-color-primary) calc(l + 0.1) c h);
|
|
8
|
+
|
|
9
|
+
// 状态相关
|
|
10
|
+
--jnrs-color-success: oklch(0.8 0.17 147);
|
|
11
|
+
--jnrs-color-error: oklch(0.65 0.24 33);
|
|
12
|
+
|
|
13
|
+
// 框架相关
|
|
14
|
+
--jnrs-font-primary: oklch(0.3 0.01 264);
|
|
15
|
+
--jnrs-font-primary-06: oklch(from var(--jnrs-font-primary) l c h / 0.6);
|
|
16
|
+
--jnrs-card-primary: oklch(1 0 0);
|
|
17
|
+
--jnrs-background-primary: oklch(0.96 0 0);
|
|
18
|
+
--jnrs-head-height: 50px;
|
|
19
|
+
|
|
20
|
+
// element-ui
|
|
21
|
+
--el-menu-base-level-padding: 8px !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* 深色模式 */
|
|
25
|
+
// @media (prefers-color-scheme: dark) {
|
|
26
|
+
// :root {
|
|
27
|
+
// --jnrs-background-primary: oklch(0 0 0);
|
|
28
|
+
// }
|
|
29
|
+
// }
|
|
@@ -122,26 +122,30 @@ const handleTabClick = (tab: TabsPaneContext) => {
|
|
|
122
122
|
|
|
123
123
|
<style lang="scss" scoped>
|
|
124
124
|
.routerTabs {
|
|
125
|
+
position: relative;
|
|
126
|
+
z-index: 5;
|
|
125
127
|
:deep(.el-tabs__header) {
|
|
126
128
|
margin-bottom: 0;
|
|
127
129
|
height: 32px;
|
|
128
130
|
}
|
|
129
131
|
:deep(.el-tabs__item) {
|
|
130
|
-
color:
|
|
132
|
+
color: var(--jnrs-font-primary-06);
|
|
131
133
|
font-size: 12px;
|
|
132
134
|
height: 32px;
|
|
133
135
|
}
|
|
134
136
|
:deep(.el-tabs__item.is-active) {
|
|
135
|
-
color:
|
|
136
|
-
border-bottom-color:
|
|
137
|
+
color: var(--jnrs-color-primary);
|
|
138
|
+
border-bottom-color: var(--jnrs-background-primary);
|
|
139
|
+
}
|
|
140
|
+
:deep(.el-tabs__nav) {
|
|
141
|
+
border-radius: 0;
|
|
142
|
+
border-left: none;
|
|
137
143
|
}
|
|
138
144
|
:deep(.el-tabs__nav-prev) {
|
|
139
|
-
color:
|
|
140
|
-
background: #fff;
|
|
145
|
+
color: var(--jnrs-color-primary);
|
|
141
146
|
}
|
|
142
147
|
:deep(.el-tabs__nav-next) {
|
|
143
|
-
color:
|
|
144
|
-
background: #fff;
|
|
148
|
+
color: var(--jnrs-color-primary);
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
</style>
|
|
@@ -6,6 +6,7 @@ import { useSystemStore, useMenuStore } from '@/stores'
|
|
|
6
6
|
|
|
7
7
|
const systemStore = useSystemStore()
|
|
8
8
|
const { menuCollapse } = storeToRefs(systemStore)
|
|
9
|
+
const { toggleCollapse } = systemStore
|
|
9
10
|
const { menus } = useMenuStore()
|
|
10
11
|
|
|
11
12
|
const route = useRoute()
|
|
@@ -13,7 +14,18 @@ const route = useRoute()
|
|
|
13
14
|
|
|
14
15
|
<template>
|
|
15
16
|
<el-aside class="sideMenu">
|
|
16
|
-
<div class="logo"
|
|
17
|
+
<div class="logo" :class="{ logo_collapse: menuCollapse }">
|
|
18
|
+
<span class="logo_text">信息化管理系统模板</span>
|
|
19
|
+
<img class="logo_img" src="@/assets/images/common/jnrs-white.svg" alt="jnrs" />
|
|
20
|
+
</div>
|
|
21
|
+
<el-icon
|
|
22
|
+
class="collapseBtn"
|
|
23
|
+
:class="{ collapseBtn_active: menuCollapse }"
|
|
24
|
+
title="菜单折叠"
|
|
25
|
+
@click="toggleCollapse()"
|
|
26
|
+
>
|
|
27
|
+
<Fold />
|
|
28
|
+
</el-icon>
|
|
17
29
|
<el-menu
|
|
18
30
|
class="leftSide_menu"
|
|
19
31
|
popper-class="layoutPage_leftSide_menu_popper"
|
|
@@ -29,16 +41,71 @@ const route = useRoute()
|
|
|
29
41
|
|
|
30
42
|
<style lang="scss" scoped>
|
|
31
43
|
.sideMenu {
|
|
32
|
-
|
|
44
|
+
position: relative;
|
|
45
|
+
z-index: 10;
|
|
46
|
+
width: auto;
|
|
33
47
|
height: 100%;
|
|
48
|
+
padding: 0 8px;
|
|
49
|
+
background: rgba(30, 30, 30, 1);
|
|
50
|
+
box-shadow: 2px 0 2px rgba(0, 0, 0, 0.3);
|
|
34
51
|
overflow-x: hidden;
|
|
35
|
-
padding: 0 10px;
|
|
36
|
-
background: rgba(20, 22, 26, 1);
|
|
37
|
-
box-shadow: 5px 0 8px rgba(20, 22, 26, 0.3);
|
|
38
|
-
color: rgba(255, 255, 255, 1);
|
|
39
52
|
|
|
40
53
|
.logo {
|
|
41
|
-
|
|
54
|
+
position: relative;
|
|
55
|
+
height: var(--jnrs-head-height);
|
|
56
|
+
|
|
57
|
+
.logo_text {
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 50%;
|
|
60
|
+
left: 50%;
|
|
61
|
+
color: rgba(255, 255, 255, 1);
|
|
62
|
+
font-size: 20px;
|
|
63
|
+
font-weight: normal;
|
|
64
|
+
font-family: AlimamaShuHeiTi-Bold;
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
transform: translate(-50%, -50%);
|
|
67
|
+
transition: all 0.3s ease;
|
|
68
|
+
filter: opacity(1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.logo_img {
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 50%;
|
|
74
|
+
left: 50%;
|
|
75
|
+
width: 100%;
|
|
76
|
+
transform: translate(-50%, -50%);
|
|
77
|
+
transition: all 0.3s ease;
|
|
78
|
+
filter: opacity(0);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.logo_collapse {
|
|
83
|
+
.logo_text {
|
|
84
|
+
transform: translate(-50%, -50%) scale(0);
|
|
85
|
+
filter: opacity(0);
|
|
86
|
+
}
|
|
87
|
+
.logo_img {
|
|
88
|
+
filter: opacity(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.collapseBtn {
|
|
93
|
+
position: absolute;
|
|
94
|
+
bottom: 10px;
|
|
95
|
+
font-size: 24px;
|
|
96
|
+
color: #fff;
|
|
97
|
+
padding: 4px;
|
|
98
|
+
border-radius: 50%;
|
|
99
|
+
background-color: #424242;
|
|
100
|
+
transition: all 0.25s ease;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
&:hover {
|
|
103
|
+
color: var(--jnrs-color-primary);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.collapseBtn_active {
|
|
108
|
+
transform: rotate(-180deg);
|
|
42
109
|
}
|
|
43
110
|
|
|
44
111
|
:deep(.el-sub-menu__title) {
|
|
@@ -52,7 +119,7 @@ const route = useRoute()
|
|
|
52
119
|
|
|
53
120
|
.el-sub-menu.is-active {
|
|
54
121
|
border-radius: 10px;
|
|
55
|
-
background:
|
|
122
|
+
background: var(--jnrs-color-primary);
|
|
56
123
|
}
|
|
57
124
|
|
|
58
125
|
:deep(.el-menu-item span) {
|
|
@@ -77,22 +144,17 @@ const route = useRoute()
|
|
|
77
144
|
|
|
78
145
|
&:hover {
|
|
79
146
|
background: none !important;
|
|
80
|
-
|
|
81
|
-
color: #f2f2f2 !important;
|
|
82
|
-
}
|
|
147
|
+
color: var(--jnrs-color-primary);
|
|
83
148
|
}
|
|
84
149
|
}
|
|
85
150
|
|
|
86
151
|
:deep(.el-menu-item.is-active) {
|
|
87
|
-
background:
|
|
88
|
-
|
|
89
|
-
span {
|
|
90
|
-
color: #f2f2f2 !important;
|
|
91
|
-
}
|
|
152
|
+
background: var(--jnrs-color-primary) !important;
|
|
153
|
+
color: #f2f2f2 !important;
|
|
92
154
|
}
|
|
93
155
|
|
|
94
156
|
.el-menu-item.is-active {
|
|
95
|
-
background:
|
|
157
|
+
background: var(--jnrs-color-primary);
|
|
96
158
|
color: #fff !important;
|
|
97
159
|
|
|
98
160
|
span {
|
|
@@ -108,7 +170,7 @@ const route = useRoute()
|
|
|
108
170
|
.layoutPage_leftSide_menu_popper {
|
|
109
171
|
background: #051524;
|
|
110
172
|
border: none !important;
|
|
111
|
-
left:
|
|
173
|
+
left: 65px !important;
|
|
112
174
|
border-radius: 15px;
|
|
113
175
|
padding: 0 10px;
|
|
114
176
|
.el-menu {
|
|
@@ -119,7 +181,7 @@ const route = useRoute()
|
|
|
119
181
|
background-color: none;
|
|
120
182
|
color: #f2f2f2;
|
|
121
183
|
&:hover {
|
|
122
|
-
color:
|
|
184
|
+
color: var(--jnrs-color-primary);
|
|
123
185
|
background: none;
|
|
124
186
|
}
|
|
125
187
|
span {
|
|
@@ -130,11 +192,8 @@ const route = useRoute()
|
|
|
130
192
|
}
|
|
131
193
|
.el-menu-item.is-active {
|
|
132
194
|
border-radius: 10px;
|
|
133
|
-
background:
|
|
195
|
+
background: var(--jnrs-color-primary);
|
|
134
196
|
color: #f2f2f2;
|
|
135
197
|
}
|
|
136
|
-
.layoutPage_leftSide_menu_popper {
|
|
137
|
-
left: 215px !important;
|
|
138
|
-
}
|
|
139
198
|
}
|
|
140
199
|
</style>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { useSystemStore } from '@/stores'
|
|
3
3
|
import type { MenuItem } from '@/types'
|
|
4
|
+
|
|
4
5
|
defineProps<{
|
|
5
6
|
listItem: MenuItem
|
|
6
7
|
}>()
|
|
@@ -14,7 +15,7 @@ const { menuCollapse } = useSystemStore()
|
|
|
14
15
|
<el-icon v-if="listItem.meta.icon">
|
|
15
16
|
<component :is="listItem.meta.icon" />
|
|
16
17
|
</el-icon>
|
|
17
|
-
<el-badge :show-zero="false" :value="listItem.todoCount" :offset="[7, 17]" color="#
|
|
18
|
+
<el-badge :show-zero="false" :value="listItem.meta.todoCount" :offset="[7, 17]" color="#EC5545">
|
|
18
19
|
<span>{{ listItem.meta.title }}</span>
|
|
19
20
|
</el-badge>
|
|
20
21
|
</el-menu-item>
|
|
@@ -22,11 +23,10 @@ const { menuCollapse } = useSystemStore()
|
|
|
22
23
|
<!-- 一级目录 -->
|
|
23
24
|
<template #title>
|
|
24
25
|
<el-badge
|
|
25
|
-
v-if="listItem.todoCount"
|
|
26
26
|
:show-zero="false"
|
|
27
|
-
:is-dot="listItem.todoCount > 0"
|
|
27
|
+
:is-dot="listItem.meta.todoCount && listItem.meta.todoCount > 0"
|
|
28
28
|
:offset="[menuCollapse ? -5 : -10, 20]"
|
|
29
|
-
color="#
|
|
29
|
+
color="#EC5545"
|
|
30
30
|
>
|
|
31
31
|
<el-icon v-if="listItem.meta.icon"><component :is="listItem.meta.icon" /></el-icon>
|
|
32
32
|
</el-badge>
|