Skip to content

Commit 6e54b70

Browse files
committed
'新增404页面'
1 parent 2f1fe92 commit 6e54b70

File tree

5 files changed

+143
-73
lines changed

5 files changed

+143
-73
lines changed

package-lock.json

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

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"babel-plugin-transform-runtime": "^6.22.0",
3131
"babel-plugin-transform-vue-jsx": "^3.5.0",
3232
"babel-preset-env": "^1.3.2",
33-
"babel-preset-es2015": "^6.24.1",
3433
"babel-preset-stage-2": "^6.22.0",
3534
"chalk": "^2.0.1",
3635
"copy-webpack-plugin": "^4.0.1",

src/components/page/404.vue

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<template>
2+
<div class="error-page">
3+
<div class="error-code">4<span>0</span>4</div>
4+
<div class="error-desc">啊哦~ 你所访问的页面不存在</div>
5+
<div class="error-handle">
6+
<router-link to="/">
7+
<el-button type="primary" size="large">返回首页</el-button>
8+
</router-link>
9+
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
10+
</div>
11+
</div>
12+
</template>
13+
14+
<script>
15+
export default {
16+
methods: {
17+
goBack(){
18+
this.$router.go(-1);
19+
}
20+
}
21+
}
22+
</script>
23+
24+
25+
<style scoped>
26+
.error-page{
27+
display: flex;
28+
justify-content: center;
29+
align-items: center;
30+
flex-direction: column;
31+
width: 100%;
32+
height: 100%;
33+
background: #f3f3f3;
34+
box-sizing: border-box;
35+
}
36+
.error-code{
37+
line-height: 1;
38+
font-size: 250px;
39+
font-weight: bolder;
40+
color: #2d8cf0;
41+
}
42+
.error-code span{
43+
color: #00a854;
44+
}
45+
.error-desc{
46+
font-size: 30px;
47+
color: #777;
48+
}
49+
.error-handle{
50+
margin-top: 30px;
51+
padding-bottom: 200px;
52+
}
53+
.error-btn{
54+
margin-left: 100px;
55+
}
56+
</style>

src/router/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,9 @@ export default new Router({
7171
path: '/login',
7272
component: resolve => require(['../components/page/Login.vue'], resolve)
7373
},
74+
{
75+
path: '/404',
76+
component: resolve => require(['../components/page/404.vue'], resolve)
77+
},
7478
]
7579
})

static/css/main.css

Lines changed: 83 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,130 @@
1-
*{margin:0;padding:0;}
2-
html,body,#app,.wrapper{
3-
width:100%;
4-
height:100%;
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
}
5+
6+
html,
7+
body,
8+
#app,
9+
.wrapper {
10+
width: 100%;
11+
height: 100%;
512
overflow: hidden;
613
}
7-
body{
8-
font-family:'PingFang SC', "Helvetica Neue",Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
14+
15+
body {
16+
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
17+
}
18+
19+
a {
20+
text-decoration: none
921
}
10-
a{text-decoration: none}
11-
.content-box{
22+
23+
.content-box {
1224
position: absolute;
1325
left: 250px;
1426
right: 0;
1527
top: 70px;
16-
bottom:0;
28+
bottom: 0;
1729
overflow-y: scroll;
18-
}
19-
.content{
20-
background: none repeat scroll 0 0 #f0f0f0;
21-
width: auto;
22-
padding:40px;
23-
box-sizing: border-box;
2430
-webkit-transition: left .3s ease-in-out;
2531
transition: left .3s ease-in-out;
32+
background: #f0f0f0;
2633
}
27-
.content-collapse{
34+
35+
.content {
36+
width: auto;
37+
padding: 40px;
38+
}
39+
40+
.content-collapse {
2841
left: 65px;
2942
}
30-
.container{
43+
44+
.container {
3145
padding: 30px;
3246
background: #fff;
3347
border: 1px solid #ddd;
3448
border-radius: 5px;
3549
}
36-
.crumbs{
50+
51+
.crumbs {
3752
margin-bottom: 20px;
3853
}
39-
.pagination{
54+
55+
.pagination {
4056
margin: 20px 0;
4157
text-align: right;
4258
}
43-
.plugins-tips{
44-
padding:20px 10px;
59+
60+
.plugins-tips {
61+
padding: 20px 10px;
4562
margin-bottom: 20px;
4663
}
64+
4765
.el-button+.el-tooltip {
4866
margin-left: 10px;
4967
}
5068

51-
.el-table tr:hover{
69+
.el-table tr:hover {
5270
background: #f6faff;
5371
}
54-
.mgb20{
72+
73+
.mgb20 {
5574
margin-bottom: 20px;
5675
}
5776

58-
.move-enter-active,.move-leave-active{
77+
.move-enter-active,
78+
.move-leave-active {
5979
transition: opacity .5s;
6080
}
61-
.move-enter,.move-leave{
81+
82+
.move-enter,
83+
.move-leave {
6284
opacity: 0;
6385
}
86+
6487
/*BaseForm*/
65-
.form-box{
66-
width:600px;
88+
89+
.form-box {
90+
width: 600px;
6791
}
68-
.form-box .line{
92+
93+
.form-box .line {
6994
text-align: center;
7095
}
71-
.el-time-panel__content::after, .el-time-panel__content::before {
96+
97+
.el-time-panel__content::after,
98+
.el-time-panel__content::before {
7299
margin-top: -7px;
73100
}
74-
.el-time-spinner__wrapper .el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default){
101+
102+
.el-time-spinner__wrapper .el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default) {
75103
padding-bottom: 0;
76104
}
105+
77106
/*Readme*/
78-
.ms-doc .el-checkbox__input.is-disabled+.el-checkbox__label{
107+
108+
.ms-doc .el-checkbox__input.is-disabled+.el-checkbox__label {
79109
color: #333;
80110
cursor: pointer;
81111
}
112+
82113
/*Upload*/
83-
.pure-button{
84-
width:150px;
85-
height:40px;
114+
115+
.pure-button {
116+
width: 150px;
117+
height: 40px;
86118
line-height: 40px;
87119
text-align: center;
88120
color: #fff;
89121
border-radius: 3px;
90122
}
91-
.g-core-image-corp-container .info-aside{
92-
height:45px;
123+
124+
.g-core-image-corp-container .info-aside {
125+
height: 45px;
93126
}
127+
94128
.el-upload--text {
95129
background-color: #fff;
96130
border: 1px dashed #d9d9d9;
@@ -103,31 +137,40 @@ a{text-decoration: none}
103137
position: relative;
104138
overflow: hidden;
105139
}
140+
106141
.el-upload--text .el-icon-upload {
107142
font-size: 67px;
108143
color: #97a8be;
109144
margin: 40px 0 16px;
110145
line-height: 50px;
111146
}
147+
112148
.el-upload--text {
113149
color: #97a8be;
114150
font-size: 14px;
115151
text-align: center;
116152
}
153+
117154
.el-upload--text em {
118155
font-style: normal;
119156
}
157+
120158
/*VueEditor*/
121-
.ql-container{
159+
160+
.ql-container {
122161
min-height: 400px;
123162
}
124-
.ql-snow .ql-tooltip{
163+
164+
.ql-snow .ql-tooltip {
125165
transform: translateX(117.5px) translateY(10px) !important;
126166
}
127-
.editor-btn{
167+
168+
.editor-btn {
128169
margin-top: 20px;
129170
}
171+
130172
/*markdown*/
173+
131174
.v-note-wrapper .v-note-panel {
132175
min-height: 500px;
133-
}
176+
}

0 commit comments

Comments
 (0)