Skip to content

Commit 182bd1c

Browse files
committed
fix: innerEditList zhCN lang
1 parent 5077398 commit 182bd1c

File tree

3 files changed

+393
-386
lines changed

3 files changed

+393
-386
lines changed

src/components/layout/PageView.vue

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
<template>
2-
<page-layout :desc="description" :title="getTitle" :link-list="linkList">
3-
<div slot="extra" class="extra-img">
4-
<img :src="extraImage"/>
5-
</div>
6-
<!-- keep-alive -->
7-
<route-view ref="content"></route-view>
8-
</page-layout>
9-
</template>
10-
11-
<script>
12-
import PageLayout from './PageLayout'
13-
import RouteView from './RouteView'
14-
15-
export default {
16-
name: "PageContent",
17-
components: {
18-
RouteView,
19-
PageLayout
20-
},
21-
data () {
22-
return {
23-
title: '',
24-
description: '',
25-
linkList: [],
26-
extraImage: ''
27-
}
28-
},
29-
mounted () {
30-
this.getPageHeaderInfo()
31-
},
32-
updated () {
33-
this.getPageHeaderInfo()
34-
},
35-
computed: {
36-
37-
getTitle () {
38-
return this.$route.meta.title
39-
}
40-
41-
},
42-
methods: {
43-
getPageHeaderInfo () {
44-
// eslint-disable-next-line
45-
this.title = this.$route.meta.title
46-
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
47-
const content = this.$refs.content.$children[0]
48-
if (content) {
49-
this.description = content.description
50-
this.linkList = content.linkList
51-
this.extraImage = content.extraImage
52-
}
53-
}
54-
}
55-
}
56-
</script>
57-
58-
<style lang="scss" scoped>
59-
.extra-img{
60-
margin-top: -60px;
61-
text-align: center;
62-
width: 195px;
63-
64-
img{
65-
width: 100%;
66-
}
67-
}
1+
<template>
2+
<page-layout :desc="description" :title="getTitle" :link-list="linkList">
3+
<div slot="extra" class="extra-img">
4+
<img :src="extraImage"/>
5+
</div>
6+
<!-- keep-alive -->
7+
<route-view ref="content"></route-view>
8+
</page-layout>
9+
</template>
10+
11+
<script>
12+
import PageLayout from './PageLayout'
13+
import RouteView from './RouteView'
14+
15+
export default {
16+
name: "PageContent",
17+
components: {
18+
RouteView,
19+
PageLayout
20+
},
21+
data () {
22+
return {
23+
title: '',
24+
description: '',
25+
linkList: [],
26+
extraImage: ''
27+
}
28+
},
29+
mounted () {
30+
this.getPageHeaderInfo()
31+
},
32+
updated () {
33+
this.getPageHeaderInfo()
34+
},
35+
computed: {
36+
37+
getTitle () {
38+
return this.$route.meta.title
39+
}
40+
41+
},
42+
methods: {
43+
getPageHeaderInfo () {
44+
// eslint-disable-next-line
45+
this.title = this.$route.meta.title
46+
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
47+
const content = this.$refs.content && this.$refs.content.$children[0]
48+
if (content) {
49+
this.description = content.description
50+
this.linkList = content.linkList
51+
this.extraImage = content.extraImage
52+
}
53+
}
54+
}
55+
}
56+
</script>
57+
58+
<style lang="scss" scoped>
59+
.extra-img{
60+
margin-top: -60px;
61+
text-align: center;
62+
width: 195px;
63+
64+
img{
65+
width: 100%;
66+
}
67+
}
6868
</style>

src/views/exception/ExceptionPage.vue

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
1-
<template>
2-
<div class="exception">
3-
<div class="img">
4-
<img :src="config[type].img"/>
5-
</div>
6-
<div class="content">
7-
<h1>{{ config[type].title }}</h1>
8-
<div class="desc">{{ config[type].desc }}</div>
9-
<div class="action">
10-
<a-button type="primary" @click="handleToHome">返回首页</a-button>
11-
</div>
12-
</div>
13-
</div>
14-
</template>
15-
16-
<script>
17-
import types from './type'
18-
19-
export default {
20-
name: "Exception",
21-
props: {
22-
type: {
23-
type: Number,
24-
default: 404
25-
}
26-
},
27-
data() {
28-
return {
29-
config: types
30-
}
31-
},
32-
methods: {
33-
handleToHome () {
34-
this.$router.push({ name: 'dashboard' })
35-
}
36-
}
37-
}
38-
</script>
39-
40-
<style lang="scss" scoped>
41-
.exception {
42-
min-height: 500px;
43-
height: 80%;
44-
align-items: center;
45-
text-align: center;
46-
margin-top: 150px;
47-
.img {
48-
display: inline-block;
49-
padding-right: 52px;
50-
zoom: 1;
51-
img {
52-
height: 360px;
53-
max-width: 430px;
54-
}
55-
}
56-
.content {
57-
display: inline-block;
58-
flex: auto;
59-
h1 {
60-
color: #434e59;
61-
font-size: 72px;
62-
font-weight: 600;
63-
line-height: 72px;
64-
margin-bottom: 24px;
65-
}
66-
.desc {
67-
color: rgba(0, 0, 0, .45);
68-
font-size: 20px;
69-
line-height: 28px;
70-
margin-bottom: 16px;
71-
}
72-
}
73-
}
74-
1+
<template>
2+
<div class="exception">
3+
<div class="img">
4+
<img :src="config[type].img"/>
5+
</div>
6+
<div class="content">
7+
<h1>{{ config[type].title }}</h1>
8+
<div class="desc">{{ config[type].desc }}</div>
9+
<div class="action">
10+
<a-button type="primary" @click="handleToHome">返回首页</a-button>
11+
</div>
12+
</div>
13+
</div>
14+
</template>
15+
16+
<script>
17+
import types from './type'
18+
19+
export default {
20+
name: "Exception",
21+
props: {
22+
type: {
23+
type: String,
24+
default: '404'
25+
}
26+
},
27+
data() {
28+
return {
29+
config: types
30+
}
31+
},
32+
methods: {
33+
handleToHome () {
34+
this.$router.push({ name: 'dashboard' })
35+
}
36+
}
37+
}
38+
</script>
39+
40+
<style lang="scss" scoped>
41+
.exception {
42+
min-height: 500px;
43+
height: 80%;
44+
align-items: center;
45+
text-align: center;
46+
margin-top: 150px;
47+
.img {
48+
display: inline-block;
49+
padding-right: 52px;
50+
zoom: 1;
51+
img {
52+
height: 360px;
53+
max-width: 430px;
54+
}
55+
}
56+
.content {
57+
display: inline-block;
58+
flex: auto;
59+
h1 {
60+
color: #434e59;
61+
font-size: 72px;
62+
font-weight: 600;
63+
line-height: 72px;
64+
margin-bottom: 24px;
65+
}
66+
.desc {
67+
color: rgba(0, 0, 0, .45);
68+
font-size: 20px;
69+
line-height: 28px;
70+
margin-bottom: 16px;
71+
}
72+
}
73+
}
74+
7575
</style>

0 commit comments

Comments
 (0)