Skip to content

Commit e7ed20b

Browse files
authored
Merge pull request #2 from PanJiaChen/master
pull new code
2 parents 1d93e66 + 109c393 commit e7ed20b

File tree

11 files changed

+146
-93
lines changed

11 files changed

+146
-93
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
9292
- Multiple dynamic themes
9393
- Dynamic sidebar (supports multi-level routing)
9494
- Dynamic breadcrumb
95-
- Tags-view(Tab page Support right-click operation)
95+
- Tags-view (Tab page Support right-click operation)
9696
- Svg Sprite
9797
- Mock data
9898
- Screenfull

src/components/ThemePicker/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export default {
1818
}
1919
},
2020
watch: {
21-
theme(val, oldVal) {
21+
theme(val) {
22+
const oldVal = this.theme
2223
if (typeof val !== 'string') return
2324
const themeCluster = this.getThemeCluster(val.replace('#', ''))
2425
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))

src/permission.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ router.beforeEach((to, from, next) => {
3333
})
3434
}).catch((err) => {
3535
store.dispatch('FedLogOut').then(() => {
36-
Message.error(err || 'Verification failed, please login again')
36+
Message.error(err)
3737
next({ path: '/' })
3838
})
3939
})

src/store/modules/user.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,16 @@ const user = {
6363
GetUserInfo({ commit, state }) {
6464
return new Promise((resolve, reject) => {
6565
getUserInfo(state.token).then(response => {
66-
if (!response.data) { // 由于mockjs 不支持自定义状态码只能这样hack
67-
reject('error')
66+
// 由于mockjs 不支持自定义状态码只能这样hack
67+
if (!response.data) {
68+
reject('Verification failed, please login again.')
6869
}
6970
const data = response.data
7071

7172
if (data.roles && data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
7273
commit('SET_ROLES', data.roles)
7374
} else {
74-
reject('getInfo: roles must be a non-null array !')
75+
reject('getInfo: roles must be a non-null array!')
7576
}
7677

7778
commit('SET_NAME', data.name)

src/styles/btn.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
@mixin colorBtn($color) {
44
background: $color;
5+
56
&:hover {
67
color: $color;
8+
79
&:before,
810
&:after {
911
background: $color;
@@ -49,14 +51,17 @@
4951
transition: 600ms ease all;
5052
position: relative;
5153
display: inline-block;
54+
5255
&:hover {
5356
background: #fff;
57+
5458
&:before,
5559
&:after {
5660
width: 100%;
5761
transition: 600ms ease all;
5862
}
5963
}
64+
6065
&:before,
6166
&:after {
6267
content: '';
@@ -67,6 +72,7 @@
6772
width: 0;
6873
transition: 400ms ease all;
6974
}
75+
7076
&::after {
7177
right: inherit;
7278
top: inherit;
@@ -91,4 +97,3 @@
9197
font-size: 14px;
9298
border-radius: 4px;
9399
}
94-

src/styles/element-ui.scss

Lines changed: 66 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,85 @@
1-
//覆盖一些element-ui样式
1+
//覆盖一些element-ui样式
22

3-
.el-breadcrumb__inner, .el-breadcrumb__inner a{
4-
font-weight: 400!important;
3+
.el-breadcrumb__inner,
4+
.el-breadcrumb__inner a {
5+
font-weight: 400 !important;
56
}
67

7-
.el-upload {
8-
input[type="file"] {
9-
display: none !important;
10-
}
11-
}
8+
.el-upload {
9+
input[type="file"] {
10+
display: none !important;
11+
}
12+
}
1213

13-
.el-upload__input {
14-
display: none;
15-
}
14+
.el-upload__input {
15+
display: none;
16+
}
1617

17-
.cell {
18-
.el-tag {
19-
margin-right: 0px;
20-
}
21-
}
18+
.cell {
19+
.el-tag {
20+
margin-right: 0px;
21+
}
22+
}
2223

23-
.small-padding {
24-
.cell {
25-
padding-left: 5px;
26-
padding-right: 5px;
27-
}
28-
}
24+
.small-padding {
25+
.cell {
26+
padding-left: 5px;
27+
padding-right: 5px;
28+
}
29+
}
2930

30-
.fixed-width{
31-
.el-button--mini{
31+
.fixed-width {
32+
.el-button--mini {
3233
padding: 7px 10px;
3334
width: 60px;
3435
}
35-
}
36+
}
3637

37-
.status-col {
38-
.cell {
39-
padding: 0 10px;
40-
text-align: center;
41-
.el-tag {
42-
margin-right: 0px;
43-
}
44-
}
45-
}
38+
.status-col {
39+
.cell {
40+
padding: 0 10px;
41+
text-align: center;
4642

47-
//暂时性解决dialog 问题 https://github.com/ElemeFE/element/issues/2461
48-
.el-dialog {
49-
transform: none;
50-
left: 0;
51-
position: relative;
52-
margin: 0 auto;
53-
}
43+
.el-tag {
44+
margin-right: 0px;
45+
}
46+
}
47+
}
48+
49+
//暂时性解决dialog 问题 https://github.com/ElemeFE/element/issues/2461
50+
.el-dialog {
51+
transform: none;
52+
left: 0;
53+
position: relative;
54+
margin: 0 auto;
55+
}
56+
57+
//文章页textarea修改样式
58+
.article-textarea {
59+
textarea {
60+
padding-right: 40px;
61+
resize: none;
62+
border: none;
63+
border-radius: 0px;
64+
border-bottom: 1px solid #bfcbd9;
65+
}
66+
}
5467

55-
//文章页textarea修改样式
56-
.article-textarea {
57-
textarea {
58-
padding-right: 40px;
59-
resize: none;
60-
border: none;
61-
border-radius: 0px;
62-
border-bottom: 1px solid #bfcbd9;
63-
}
64-
}
68+
//element ui upload
69+
.upload-container {
70+
.el-upload {
71+
width: 100%;
6572

66-
//element ui upload
67-
.upload-container {
68-
.el-upload {
69-
width: 100%;
70-
.el-upload-dragger {
71-
width: 100%;
72-
height: 200px;
73-
}
74-
}
75-
}
73+
.el-upload-dragger {
74+
width: 100%;
75+
height: 200px;
76+
}
77+
}
78+
}
7679

7780
//dropdown
78-
.el-dropdown-menu{
79-
a{
81+
.el-dropdown-menu {
82+
a {
8083
display: block
8184
}
8285
}

src/styles/index.scss

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ html {
2222
box-sizing: border-box;
2323
}
2424

25-
#app{
25+
#app {
2626
height: 100%;
2727
}
2828

@@ -53,9 +53,9 @@ a:hover {
5353
text-decoration: none;
5454
}
5555

56-
div:focus{
56+
div:focus {
5757
outline: none;
58-
}
58+
}
5959

6060
.fr {
6161
float: right;
@@ -104,23 +104,26 @@ code {
104104
line-height: 36px;
105105
font-size: 15px;
106106
font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
107+
107108
a {
108109
color: #337ab7;
109110
cursor: pointer;
111+
110112
&:hover {
111113
color: rgb(32, 160, 255);
112114
}
113115
}
114116
}
115117

116-
.warn-content{
117-
background: rgba(66,185,131,.1);
118+
.warn-content {
119+
background: rgba(66, 185, 131, .1);
118120
border-radius: 2px;
119121
padding: 16px;
120122
padding: 1rem;
121123
line-height: 1.6rem;
122124
word-spacing: .05rem;
123-
a{
125+
126+
a {
124127
color: #42b983;
125128
font-weight: 600;
126129
}
@@ -153,13 +156,16 @@ code {
153156
padding-right: 20px;
154157
transition: 600ms ease position;
155158
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
159+
156160
.subtitle {
157161
font-size: 20px;
158162
color: #fff;
159163
}
164+
160165
&.draft {
161166
background: #d0d0d0;
162167
}
168+
163169
&.deleted {
164170
background: #d0d0d0;
165171
}
@@ -169,13 +175,15 @@ code {
169175
.link-type:focus {
170176
color: #337ab7;
171177
cursor: pointer;
178+
172179
&:hover {
173180
color: rgb(32, 160, 255);
174181
}
175182
}
176183

177184
.filter-container {
178185
padding-bottom: 10px;
186+
179187
.filter-item {
180188
display: inline-block;
181189
vertical-align: middle;

src/styles/mixin.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
&::-webkit-scrollbar-track-piece {
1111
background: #d3dce6;
1212
}
13+
1314
&::-webkit-scrollbar {
1415
width: 6px;
1516
}
17+
1618
&::-webkit-scrollbar-thumb {
1719
background: #99a9bf;
1820
border-radius: 20px;
@@ -37,21 +39,25 @@
3739
$transparent-border-style: $width solid transparent;
3840
height: 0;
3941
width: 0;
42+
4043
@if $direction==up {
4144
border-bottom: $color-border-style;
4245
border-left: $transparent-border-style;
4346
border-right: $transparent-border-style;
4447
}
48+
4549
@else if $direction==right {
4650
border-left: $color-border-style;
4751
border-top: $transparent-border-style;
4852
border-bottom: $transparent-border-style;
4953
}
54+
5055
@else if $direction==down {
5156
border-top: $color-border-style;
5257
border-left: $transparent-border-style;
5358
border-right: $transparent-border-style;
5459
}
60+
5561
@else if $direction==left {
5662
border-right: $color-border-style;
5763
border-top: $transparent-border-style;

0 commit comments

Comments
 (0)