File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 18
18
</a >
19
19
</section >
20
20
<section class =" desc" >
21
+ <veui-radio-button-group
22
+ ui =" s"
23
+ :items =" themes"
24
+ :value =" theme"
25
+ @change =" $emit('themechange', $event)"
26
+ />
21
27
<nuxt-link
22
28
:class =" {
23
29
'locale-switch': true,
36
42
</template >
37
43
38
44
<script >
39
- import { Icon } from ' veui'
45
+ import { Icon , RadioButtonGroup } from ' veui'
40
46
import i18n from ' ../common/i18n'
41
47
import OneSearch from ' ./OneSearch'
42
48
@@ -53,9 +59,21 @@ export default {
53
59
name: ' one-header' ,
54
60
components: {
55
61
' veui-icon' : Icon,
62
+ ' veui-radio-button-group' : RadioButtonGroup,
56
63
' one-search' : OneSearch
57
64
},
58
65
mixins: [i18n],
66
+ props: {
67
+ theme: String
68
+ },
69
+ data () {
70
+ return {
71
+ themes: [
72
+ { label: ' D20' , value: ' ' },
73
+ { label: ' D22' , value: ' d22' }
74
+ ]
75
+ }
76
+ },
59
77
computed: {
60
78
altLocale () {
61
79
let { canonicalPath, locale, getLocalePath, isPathDisabled } = this
@@ -111,7 +129,7 @@ export default {
111
129
align-items center
112
130
padding 0 6px
113
131
border 1px solid #dbdbdb
114
- border-radius 3px
132
+ border-radius 4px
115
133
height 28px
116
134
font-size 12px
117
135
text-decoration none
Original file line number Diff line number Diff line change 4
4
<one-header
5
5
ref =" header"
6
6
class =" header"
7
+ :theme =" config.theme"
8
+ @themechange =" handleThemeChange"
7
9
/>
8
10
<div class =" body" >
9
11
<one-menu
@@ -79,7 +81,8 @@ export default {
79
81
data () {
80
82
return {
81
83
config: {
82
- ' link.routerLink' : ' nuxt-link'
84
+ ' link.routerLink' : ' nuxt-link' ,
85
+ theme: ' '
83
86
},
84
87
expanded: false ,
85
88
quickNavOpen: false
@@ -156,6 +159,9 @@ export default {
156
159
}
157
160
}
158
161
}
162
+ },
163
+ handleThemeChange (theme ) {
164
+ this .config .theme = theme
159
165
}
160
166
}
161
167
}
You can’t perform that action at this time.
0 commit comments