6
6
< a-icon type ="bulb " :theme ="themeSwitcher.isDarkTheme ? 'filled' : 'outlined' "> </ a-icon >
7
7
< span > Theme</ span >
8
8
</ span >
9
- < a-menu-item id ="change-theme " class ="ant-menu-theme-switch " @mousedown ="themeSwitcher.animationsOff() "> Dark < a-switch style ="margin-left: 2px; " size ="small " :default-checked ="themeSwitcher.isDarkTheme " @change ="themeSwitcher.toggleTheme() "> </ a-switch >
9
+ < a-menu-item id ="change-theme " class ="ant-menu-theme-switch " @mousedown ="themeSwitcher.animationsOff() "> Dark
10
+ < a-switch style ="margin-left: 2px; " size ="small " :default-checked ="themeSwitcher.isDarkTheme "
11
+ @change ="themeSwitcher.toggleTheme() "> </ a-switch >
10
12
</ a-menu-item >
11
- < a-menu-item id ="change-theme-ultra " v-if ="themeSwitcher.isDarkTheme " class ="ant-menu-theme-switch " @mousedown ="themeSwitcher.animationsOffUltra() "> Ultra < a-checkbox style ="margin-left: 2px; " :checked ="themeSwitcher.isUltra " @click ="themeSwitcher.toggleUltra() "> </ a-checkbox >
13
+ < a-menu-item id ="change-theme-ultra " v-if ="themeSwitcher.isDarkTheme " class ="ant-menu-theme-switch "
14
+ @mousedown ="themeSwitcher.animationsOffUltra() "> Ultra < a-checkbox style ="margin-left: 2px; "
15
+ :checked ="themeSwitcher.isUltra " @click ="themeSwitcher.toggleUltra() "> </ a-checkbox >
12
16
</ a-menu-item >
13
17
</ a-sub-menu >
14
18
</ a-menu >
17
21
18
22
{{define "component/themeSwitchTemplateLogin"}}
19
23
< template >
20
- < a-menu @mousedown ="themeSwitcher.animationsOff() " id ="change-theme " :theme ="themeSwitcher.currentTheme " mode ="inline " selected-keys ="">
24
+ < a-menu @mousedown ="themeSwitcher.animationsOff() " id ="change-theme " :theme ="themeSwitcher.currentTheme " mode ="inline "
25
+ selected-keys ="">
21
26
< a-menu-item mode ="inline " class ="ant-menu-theme-switch ">
22
27
< a-icon type ="bulb " :theme ="themeSwitcher.isDarkTheme ? 'filled' : 'outlined' "> </ a-icon >
23
- < a-switch size ="small " :default-checked ="themeSwitcher.isDarkTheme " @change ="themeSwitcher.toggleTheme() "> </ a-switch >
28
+ < a-switch size ="small " :default-checked ="themeSwitcher.isDarkTheme "
29
+ @change ="themeSwitcher.toggleTheme() "> </ a-switch >
24
30
< template v-if ="themeSwitcher.isDarkTheme ">
25
- < a-checkbox style ="margin-left: 1rem; vertical-align: middle; " :checked ="themeSwitcher.isUltra " @click ="themeSwitcher.toggleUltra() "> Ultra</ a-checkbox >
31
+ < a-checkbox style ="margin-left: 1rem; vertical-align: middle; " :checked ="themeSwitcher.isUltra "
32
+ @click ="themeSwitcher.toggleUltra() "> Ultra</ a-checkbox >
26
33
</ template >
27
34
</ a-menu-item >
28
35
</ a-menu >
83
90
} ;
84
91
}
85
92
const themeSwitcher = createThemeSwitcher ( ) ;
86
- Vue . component ( 'theme-switch' , {
87
- props : [ ] ,
93
+ Vue . component ( 'a-theme-switch' , {
88
94
template : `{{template "component/themeSwitchTemplate"}}` ,
89
95
data : ( ) => ( {
90
96
themeSwitcher
96
102
document . getElementById ( 'message' ) . className = themeSwitcher . currentTheme ;
97
103
}
98
104
} ) ;
99
- Vue . component ( 'theme-switch-login' , {
100
- props : [ ] ,
105
+ Vue . component ( 'a-theme-switch-login' , {
101
106
template : `{{template "component/themeSwitchTemplateLogin"}}` ,
102
107
data : ( ) => ( {
103
108
themeSwitcher
110
115
}
111
116
} ) ;
112
117
</ script >
113
- {{end}}
118
+ {{end}}
0 commit comments