Skip to content

Commit 8986524

Browse files
committed
feat(*): md文件配置& eslit规范
1 parent 6a2df0a commit 8986524

37 files changed

Lines changed: 6466 additions & 15575 deletions

package-lock.json

Lines changed: 6149 additions & 15350 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"eslint": "^6.0.1",
5656
"eslint-plugin-vue": "^7.0.0-alpha.0",
5757
"fs-extra": "^8.1.0",
58+
"html-loader": "^1.1.0",
5859
"inquirer": "^6.5.0",
5960
"js-yaml": "^3.13.1",
6061
"lint-staged": "^9.5.0",
@@ -88,7 +89,6 @@
8889
"lint-staged": {
8990
"*.{js,vue}": [
9091
"prettier --write",
91-
"vue-cli-service lint",
9292
"git add"
9393
]
9494
}

src/assets/image/小尖角.png

-478 Bytes
Binary file not shown.

src/assets/image/铃铛icon.png

-1.14 KB
Binary file not shown.

src/assets/style/realize/element-variable.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,11 +463,11 @@ thead tr {
463463
left: 70px !important;
464464
}
465465

466-
.el-menu--vertical /deep/ .icon-erjizhibiao {
466+
.el-menu--vertical >>> .icon-erjizhibiao {
467467
display: none;
468468
}
469469

470-
.el-menu--vertical /deep/ .two-folder {
470+
.el-menu--vertical >>> .two-folder {
471471
margin-left: 40px;
472472
}
473473

src/component/base/search/lin-search.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="lin-search">
33
<el-input size="medium" :placeholder="placeholder" clearable v-model="keyword" class="input-with-select">
4-
<el-button slot="append" icon="el-icon-search"></el-button>
4+
<el-button icon="el-icon-search"></el-button>
55
</el-input>
66
</div>
77
</template>
@@ -38,7 +38,7 @@ export default {
3838
}
3939
</script>
4040
<style lang="scss" scoped>
41-
.lin-search /deep/ .el-input-group__append {
41+
.lin-search >>> .el-input-group__append {
4242
border-top-right-radius: 20px;
4343
border-bottom-right-radius: 20px;
4444
padding: 0 8px;
@@ -48,7 +48,7 @@ export default {
4848
font-size: 18px;
4949
}
5050
}
51-
.lin-search /deep/ .el-input__inner {
51+
.lin-search >>> .el-input__inner {
5252
border-top-left-radius: 20px;
5353
border-bottom-left-radius: 20px;
5454
border-right: none;

src/component/layout/user.vue

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,42 @@
44
<span class="el-dropdown-link">
55
<div class="nav-avatar"><img :src="user.avatar || defaultAvatar" alt="头像" /></div>
66
</span>
7-
<el-dropdown-menu slot="dropdown" class="user-box">
8-
<div class="user-info">
9-
<div class="avatar" title="点击修改头像">
10-
<img :src="user.avatar || defaultAvatar" alt="头像" />
11-
<label class="mask">
12-
<i class="iconfont icon-icon-test" style="font-size: 20px;"></i>
13-
<input ref="avatarInput" type="file" accept="image/*" @change="fileChange" />
14-
</label>
7+
<template v-slot:dropdown>
8+
<el-dropdown-menu class="user-box">
9+
<div class="user-info">
10+
<div class="avatar" title="点击修改头像">
11+
<img :src="user.avatar || defaultAvatar" alt="头像" />
12+
<label class="mask">
13+
<i class="iconfont icon-icon-test" style="font-size: 20px;"></i>
14+
<input ref="avatarInput" type="file" accept="image/*" @change="fileChange" />
15+
</label>
16+
</div>
17+
<div class="text">
18+
<div class="username" @click="changeNickname" v-if="!nicknameChanged">{{ nickname }}</div>
19+
<el-input
20+
placeholder="请输入内容"
21+
size="small"
22+
v-else
23+
v-model="nickname"
24+
ref="input"
25+
@blur="blur"
26+
></el-input>
27+
</div>
28+
<img src="../../assets/image/user/corner.png" class="corner" />
1529
</div>
16-
<div class="text">
17-
<div class="username" @click="changeNickname" v-if="!nicknameChanged">{{ nickname }}</div>
18-
<el-input
19-
placeholder="请输入内容"
20-
size="small"
21-
v-else
22-
v-model="nickname"
23-
ref="input"
24-
@blur="blur"
25-
></el-input>
26-
</div>
27-
<img src="../../assets/image/user/corner.png" class="corner" />
28-
</div>
29-
<ul class="dropdown-box">
30-
<li class="password" @click="goToCenter">
31-
<i class="iconfont icon-weibaoxitongshangchuanlogo-"></i> <span>个人中心</span>
32-
</li>
33-
<li class="account" @click="outLogin"><i class="iconfont icon-tuichu"></i> <span>退出账户</span></li>
34-
</ul>
35-
</el-dropdown-menu>
30+
<ul class="dropdown-box">
31+
<li class="password" @click="goToCenter">
32+
<i class="iconfont icon-weibaoxitongshangchuanlogo-"></i> <span>个人中心</span>
33+
</li>
34+
<li class="account" @click="outLogin"><i class="iconfont icon-tuichu"></i> <span>退出账户</span></li>
35+
</ul>
36+
</el-dropdown-menu>
37+
</template>
3638
</el-dropdown>
3739
<!-- 修改头像 -->
3840
<el-dialog
3941
title="裁剪"
40-
:visible.sync="cropVisible"
42+
v-model:visible="cropVisible"
4143
width="300px"
4244
:append-to-body="true"
4345
:close-on-click-modal="false"
@@ -65,16 +67,19 @@
6567
</div>
6668
<div style="margin-top: 1em;">通过鼠标滚轮调节头像大小</div>
6769
</div>
68-
<div slot="footer" class="dialog-footer">
69-
<el-button @click="cropVisible = false" size="small">取 消</el-button>
70-
<el-button type="primary" @click="handleCrop" size="small">确 定</el-button>
71-
</div>
70+
71+
<template #footer>
72+
<div class="dialog-footer">
73+
<el-button @click="cropVisible = false" size="small">取 消</el-button>
74+
<el-button type="primary" @click="handleCrop" size="small">确 定</el-button>
75+
</div>
76+
</template>
7277
</el-dialog>
7378
<el-dialog
7479
title="修改密码"
7580
:append-to-body="true"
7681
:before-close="handleClose"
77-
:visible.sync="dialogFormVisible"
82+
v-model:visible="dialogFormVisible"
7883
class="user-dialog"
7984
>
8085
<el-form
@@ -84,7 +89,7 @@
8489
label-position="left"
8590
ref="form"
8691
label-width="90px"
87-
@submit.native.prevent
92+
@submit.prevent
8893
>
8994
<el-form-item label="原始密码" prop="old_password">
9095
<el-input type="password" v-model="form.old_password" autocomplete="off"></el-input>
@@ -394,12 +399,12 @@ export default {
394399
</script>
395400

396401
<style lang="scss" scoped>
397-
.user-dialog /deep/ .el-dialog .el-dialog__header {
402+
.user-dialog >>> .el-dialog .el-dialog__header {
398403
border-bottom: 1px solid #dae1ed;
399404
padding-bottom: 20px;
400405
}
401406
402-
.user-dialog /deep/ .el-dialog .el-dialog__body {
407+
.user-dialog >>> .el-dialog .el-dialog__body {
403408
padding-bottom: 00px;
404409
}
405410

src/config/error-code.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
const errorCode = {
22
777: '前端错误码未定义',
33
999: '服务器未知错误',
4-
10000: '认证失败',
4+
10000: '未携带令牌',
55
10020: '资源不存在',
66
10030: '参数错误',
7-
10040: 'assessToken令牌失效',
8-
10050: 'assessToken令牌过期',
7+
10041: 'assessToken损坏',
8+
10042: 'refreshToken损坏',
9+
10051: 'assessToken过期',
10+
10052: 'refreshToken过期',
911
10060: '字段重复',
1012
10070: '不可操作',
11-
10100: 'refreshToken异常',
1213
}
1314

1415
export default errorCode

src/config/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
const Config = {
2-
baseURL: process.env.VUE_APP_BASE_URL,
3-
stagnateTime: 1 * 60 * 60 * 1000, // 无操作停滞时间 默认1小时
2+
sideBarLevel: 3, // 侧边栏层级限制, 3 表示三级, 可设置 2 和 3
43
openAutoJumpOut: true, // 是否开启无操作跳出
5-
notLoginRoute: ['login'], // 无需登录即可访问的路由 name,
6-
sideBarLevel: 3, // 侧边栏层级限制, 3表示三级, 可设置 2 和 3
7-
showSidebarSearch: true, // 默认打开侧边栏搜索
84
defaultRoute: '/about', // 默认打开的路由
5+
showSidebarSearch: true, // 默认打开侧边栏搜索
6+
notLoginRoute: ['login'], // 无需登录即可访问的路由 name,
97
useFrontEndErrorMsg: false, // 默认采用后端返回异常
8+
stagnateTime: 1 * 60 * 60 * 1000, // 无操作停滞时间,默认1小时
9+
baseURL: process.env.VUE_APP_BASE_URL, // API接口baseURL,在根目录.env文件查找对应环境变量配置
1010
}
1111

1212
export default Config

src/lin/plugin/auto-jump.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)