Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit 44d3d42

Browse files
committed
chore(cli): update site
1 parent 5668715 commit 44d3d42

File tree

10 files changed

+363
-268
lines changed

10 files changed

+363
-268
lines changed

packages/varlet-vue2-cli/site/mobile/App.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@
7676
import config from '@config'
7777
import {
7878
bigCamelize,
79-
getBrowserThemes,
79+
getBrowserTheme,
8080
inIframe,
8181
isPhone,
8282
removeEmpty,
83-
setThemes,
83+
setTheme,
8484
watchLang,
8585
watchThemes
8686
} from '../utils'
@@ -94,7 +94,7 @@ export default {
9494
languages: get(config, 'mobile.header.i18n'),
9595
showMenu: false,
9696
redirect: get(config, 'mobile.redirect', ''),
97-
currentThemes: getBrowserThemes(themesKey),
97+
currentThemes: getBrowserTheme(themesKey),
9898
bigCamelizeComponentName: '',
9999
showBackIcon: false,
100100
github: get(config, 'mobile.header.github'),
@@ -121,7 +121,7 @@ export default {
121121
122122
window.toggleTheme = this.toggleTheme
123123
124-
setThemes(config, this.currentThemes)
124+
setTheme(config, this.currentThemes)
125125
126126
window.postMessage(this.getThemesMessage(), '*')
127127
@@ -151,7 +151,7 @@ export default {
151151
152152
setCurrentThemes(themes) {
153153
this.currentThemes = themes
154-
setThemes(config, this.currentThemes)
154+
setTheme(config, this.currentThemes)
155155
window.localStorage.setItem(themesKey, this.currentThemes)
156156
},
157157

packages/varlet-vue2-cli/site/pc/components/AppHeader.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
<script>
9797
import config from '@config'
9898
import { get } from 'lodash-es'
99-
import { getBrowserThemes, getPCLocationInfo, removeEmpty, setThemes, watchThemes } from '../../utils'
99+
import { getBrowserTheme, getPCLocationInfo, removeEmpty, setTheme, watchThemes } from '../../utils'
100100
import { defineComponent } from '../../components/utils/create'
101101
import AnimationBox from './AnimationBox.vue'
102102
@@ -128,7 +128,7 @@ export default defineComponent({
128128
playground: get(config, 'pc.header.playground'),
129129
github: get(config, 'pc.header.github'),
130130
darkMode: get(config, 'pc.header.darkMode'),
131-
currentThemes: getBrowserThemes(get(config, 'themesKey')),
131+
currentThemes: getBrowserTheme(get(config, 'themesKey')),
132132
isOpenLanguageMenu: false,
133133
isOpenVersionsMenu: false
134134
}),
@@ -138,7 +138,7 @@ export default defineComponent({
138138
from === 'mobile' && this.setCurrentThemes(themes)
139139
})
140140
141-
setThemes(config, this.currentThemes)
141+
setTheme(config, this.currentThemes)
142142
143143
window.postMessage(this.getThemesMessage(), '*')
144144
},
@@ -163,7 +163,7 @@ export default defineComponent({
163163
164164
setCurrentThemes(themes) {
165165
this.currentThemes = themes
166-
setThemes(config, this.currentThemes)
166+
setTheme(config, this.currentThemes)
167167
window.localStorage.setItem(this.themesKey, this.currentThemes)
168168
},
169169

packages/varlet-vue2-cli/site/pc/components/NProgress.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Progress from '../../components/progress'
22
import config from '@config'
3-
import { getBrowserThemes, watchThemes } from '../../utils'
3+
import { getBrowserTheme, watchThemes } from '../../utils'
44
import { get } from 'lodash-es'
55

66
export default {
@@ -28,12 +28,12 @@ export default {
2828
getColor(themes) {
2929
const themesKey = get(config, 'themesKey')
3030

31-
return get(config, `${themes ?? getBrowserThemes(themesKey)}.color-progress`)
31+
return get(config, `${themes ?? getBrowserTheme(themesKey)}.color-progress`)
3232
},
3333
getTrackColor(themes) {
3434
const themesKey = get(config, 'themesKey')
3535

36-
return get(config, `${themes ?? getBrowserThemes(themesKey)}.color-progress-track`)
36+
return get(config, `${themes ?? getBrowserTheme(themesKey)}.color-progress-track`)
3737
},
3838
changeValue() {
3939
this.timer = window.setTimeout(() => {

0 commit comments

Comments
 (0)