Skip to content

Commit 7d9af64

Browse files
author
piexlMax(奇淼
committed
feat: 使用prettierrc对代码进行格式化
1 parent 87a4ce1 commit 7d9af64

File tree

139 files changed

+12375
-12354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+12375
-12354
lines changed

web/.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": false,
6+
"singleQuote": true,
7+
"trailingComma": "none",
8+
"bracketSpacing": true,
9+
"arrowParens": "always",
10+
"vueIndentScriptAndStyle": true,
11+
"endOfLine": "lf"
12+
}

web/README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
1-
# gin-vue-admin web
1+
# gin-vue-admin web
22

33
## Project setup
4+
45
```
56
npm install
67
```
78

89
### Compiles and hot-reloads for development
10+
911
```
1012
npm run serve
1113
```
1214

1315
### Compiles and minifies for production
16+
1417
```
1518
npm run build
1619
```
1720

1821
### Run your tests
22+
1923
```
2024
npm run test
2125
```
2226

2327
### Lints and fixes files
28+
2429
```
2530
npm run lint
2631
```
2732

28-
2933
整理代码结构
30-
``` lua
34+
35+
```lua
3136
web
3237
├── babel.config.js
3338
├── Dockerfile
@@ -67,7 +72,7 @@ web
6772
│ │ ├── asyncRouter.js -- 动态路由相关
6873
│ │ ├── bus.js -- 全局mitt声明文件
6974
│ │ ├── date.js -- 日期相关
70-
│ │ ├── dictionary.js -- 获取字典方法
75+
│ │ ├── dictionary.js -- 获取字典方法
7176
│ │ ├── downloadImg.js -- 下载图片方法
7277
│ │ ├── format.js -- 格式整理相关
7378
│ │ ├── image.js -- 图片相关方法
@@ -80,21 +85,21 @@ web
8085
| | ├── error -- 错误
8186
| | ├── example --上传案例
8287
| | ├── iconList -- icon列表
83-
| | ├── init -- 初始化数据
88+
| | ├── init -- 初始化数据
8489
| | | ├── index -- 新版本
8590
| | | ├── init -- 旧版本
86-
| | ├── layout -- layout约束页面
87-
| | | ├── aside
91+
| | ├── layout -- layout约束页面
92+
| | | ├── aside
8893
| | | ├── bottomInfo -- bottomInfo
8994
| | | ├── screenfull -- 全屏设置
9095
| | | ├── setting -- 系统设置
9196
| | | └── index.vue -- base 约束
92-
| | ├── login --登录
93-
| | ├── person --个人中心
97+
| | ├── login --登录
98+
| | ├── person --个人中心
9499
| | ├── superAdmin -- 超级管理员操作
95100
| | ├── system -- 系统检测页面
96101
| | ├── systemTools -- 系统配置相关页面
97-
| | └── routerHolder.vue -- page 入口页面
102+
| | └── routerHolder.vue -- page 入口页面
98103
├── vite.config.js -- vite 配置文件
99104
└── yarn.lock
100105

web/babel.config.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
module.exports = {
2-
presets: [
3-
4-
],
5-
'plugins': [
6-
7-
]
2+
presets: [],
3+
plugins: []
84
}

web/eslint.config.mjs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import js from '@eslint/js'
22
import pluginVue from 'eslint-plugin-vue'
3-
import globals from "globals"
3+
import globals from 'globals'
44

55
export default [
66
js.configs.recommended,
@@ -10,20 +10,20 @@ export default [
1010
files: ['**/*.{js,mjs,jsx,vue}'],
1111
languageOptions: {
1212
ecmaVersion: 'latest',
13-
sourceType: "module",
13+
sourceType: 'module',
1414
globals: globals.node
1515
},
1616
rules: {
17-
"vue/max-attributes-per-line" : 0,
18-
"vue/no-v-model-argument" : 0,
19-
"vue/multi-word-component-names": "off",
17+
'vue/max-attributes-per-line': 0,
18+
'vue/no-v-model-argument': 0,
19+
'vue/multi-word-component-names': 'off',
2020
'no-lone-blocks': 'off',
2121
'no-extend-native': 'off',
22-
'no-unused-vars': ['error', { "argsIgnorePattern": '^_' }],
23-
},
22+
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
23+
}
2424
},
2525
{
2626
name: 'app/files-to-ignore',
27-
ignores: ['**/dist/**', '**/build/*.js', '**/src/assets/**', '**/public/**'],
28-
},
27+
ignores: ['**/dist/**', '**/build/*.js', '**/src/assets/**', '**/public/**']
28+
}
2929
]

web/index.html

Lines changed: 90 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,115 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="zh-cn" class="transition-colors">
3-
4-
<head>
5-
<meta charset="utf-8">
6-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
8-
<meta content="Gin,Vue,Admin.Gin-Vue-Admin,GVA,gin-vue-admin,后台管理框架,vue后台管理框架,gin-vue-admin文档,gin-vue-admin首页,gin-vue-admin" name="keywords" />
9-
<link rel="icon" href="favicon.ico">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7+
<meta
8+
content="Gin,Vue,Admin.Gin-Vue-Admin,GVA,gin-vue-admin,后台管理框架,vue后台管理框架,gin-vue-admin文档,gin-vue-admin首页,gin-vue-admin"
9+
name="keywords"
10+
/>
11+
<link rel="icon" href="favicon.ico" />
1012
<title></title>
1113
<style>
12-
.transition-colors{
13-
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
14-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
15-
transition-duration: 150ms;
14+
.transition-colors {
15+
transition-property: color, background-color, border-color,
16+
text-decoration-color, fill, stroke;
17+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
18+
transition-duration: 150ms;
19+
}
20+
body {
21+
margin: 0;
22+
--64f90c3645474bd5: #409eff;
23+
}
24+
#gva-loading-box {
25+
position: relative;
26+
display: flex;
27+
align-items: center;
28+
justify-content: center;
29+
height: 100vh;
30+
width: 100vw;
1631
}
17-
body{
18-
margin: 0;
19-
--64f90c3645474bd5: #409eff;
32+
#loading-text {
33+
position: absolute;
34+
bottom: calc(50% - 100px);
35+
left: 0;
36+
width: 100%;
37+
text-align: center;
38+
color: #666;
39+
font-size: 14px;
2040
}
21-
#gva-loading-box{
22-
position: relative;
23-
display: flex;
24-
align-items: center;
25-
justify-content: center;
26-
height: 100vh;
27-
width: 100vw;
28-
}
29-
#loading-text {
30-
position: absolute;
31-
bottom: calc(50% - 100px);
32-
left: 0;
33-
width: 100%;
34-
text-align: center;
35-
color: #666;
36-
font-size: 14px;
37-
}
3841
#loading {
39-
position: absolute;
40-
top: calc(50% - 20px);
41-
left: calc(50% - 20px);
42+
position: absolute;
43+
top: calc(50% - 20px);
44+
left: calc(50% - 20px);
4245
}
4346
@keyframes loader {
44-
0% { left: -100px }
45-
100% { left: 110%; }
47+
0% {
48+
left: -100px;
49+
}
50+
100% {
51+
left: 110%;
52+
}
4653
}
4754
#box {
48-
width: 50px;
49-
height: 50px;
50-
background: var(--64f90c3645474bd5);
51-
animation: animate .5s linear infinite;
52-
position: absolute;
53-
top: 0;
54-
left: 0;
55-
border-radius: 3px;
55+
width: 50px;
56+
height: 50px;
57+
background: var(--64f90c3645474bd5);
58+
animation: animate 0.5s linear infinite;
59+
position: absolute;
60+
top: 0;
61+
left: 0;
62+
border-radius: 3px;
5663
}
5764
@keyframes animate {
58-
17% { border-bottom-right-radius: 3px; }
59-
25% { transform: translateY(9px) rotate(22.5deg); }
60-
50% {
61-
transform: translateY(18px) scale(1,.9) rotate(45deg) ;
62-
border-bottom-right-radius: 40px;
63-
}
64-
75% { transform: translateY(9px) rotate(67.5deg); }
65-
100% { transform: translateY(0) rotate(90deg); }
65+
17% {
66+
border-bottom-right-radius: 3px;
67+
}
68+
25% {
69+
transform: translateY(9px) rotate(22.5deg);
70+
}
71+
50% {
72+
transform: translateY(18px) scale(1, 0.9) rotate(45deg);
73+
border-bottom-right-radius: 40px;
74+
}
75+
75% {
76+
transform: translateY(9px) rotate(67.5deg);
77+
}
78+
100% {
79+
transform: translateY(0) rotate(90deg);
80+
}
6681
}
6782
#shadow {
68-
width: 50px;
69-
height: 5px;
70-
background: #000;
71-
opacity: 0.1;
72-
position: absolute;
73-
top: 59px;
74-
left: 0;
75-
border-radius: 50%;
76-
animation: shadow .5s linear infinite;
83+
width: 50px;
84+
height: 5px;
85+
background: #000;
86+
opacity: 0.1;
87+
position: absolute;
88+
top: 59px;
89+
left: 0;
90+
border-radius: 50%;
91+
animation: shadow 0.5s linear infinite;
7792
}
78-
.dark #shadow{
79-
background: #fff;
93+
.dark #shadow {
94+
background: #fff;
8095
}
8196
@keyframes shadow {
82-
50% {
83-
transform: scale(1.2,1);
84-
}
97+
50% {
98+
transform: scale(1.2, 1);
99+
}
85100
}
86-
87101
</style>
88-
</head>
102+
</head>
89103

90-
<body>
104+
<body>
91105
<div id="gva-loading-box">
92-
<div id="loading">
93-
<div id="shadow"></div>
94-
<div id="box"></div>
95-
</div>
96-
<div id="loading-text">系统正在加载中,请稍候...</div>
106+
<div id="loading">
107+
<div id="shadow"></div>
108+
<div id="box"></div>
109+
</div>
110+
<div id="loading-text">系统正在加载中,请稍候...</div>
97111
</div>
98112
<div id="app"></div>
99113
<script type="module" src="./src/main.js"></script>
100-
</body>
101-
114+
</body>
102115
</html>

web/jsconfig.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"compilerOptions": {
3-
"baseUrl": "./",
4-
"paths": {
5-
"@/*": ["src/*"]
6-
}
7-
},
8-
"exclude": ["node_modules", "dist"],
9-
"include": ["src/**/*"]
10-
}
2+
"compilerOptions": {
3+
"baseUrl": "./",
4+
"paths": {
5+
"@/*": ["src/*"]
6+
}
7+
},
8+
"exclude": ["node_modules", "dist"],
9+
"include": ["src/**/*"]
10+
}

0 commit comments

Comments
 (0)