Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9f4ee24

Browse files
xyy94813cwandev
andauthored
chore: fix typos (vue-zone#108)
* fix(app-store): wrong spelling * chore: add spell checker as recommend extension * chore: Remove vscode-spell-checker --------- Co-authored-by: Charlie ✨ <18888351756@163.com>
1 parent 9eb54e8 commit 9f4ee24

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

‎src/hooks/useAutoThemeSwitcher.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ export default function useAutoThemeSwitcher(appStore: AppStore) {
44
const handleAttributeChange = () => {
55
const rootElement = document.documentElement
66
if (rootElement.classList.contains('dark'))
7-
appStore.swithMode('dark')
7+
appStore.switchMode('dark')
88
else
9-
appStore.swithMode('light')
9+
appStore.switchMode('light')
1010
}
1111

1212
const observerOptions = {

‎src/pages/index.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ watch(
2323
2424
function toggle() {
2525
toggleDark()
26-
appStore.swithMode(isDark.value ? 'dark' : 'light')
26+
appStore.switchMode(isDark.value ? 'dark' : 'light')
2727
}
2828
2929
const { t } = useI18n()

‎src/stores/modules/app.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
22
import type { ConfigProviderTheme } from 'vant'
33

44
export interface AppStore {
5-
swithMode: (val: ConfigProviderTheme) => void
5+
switchMode: (val: ConfigProviderTheme) => void
66
}
77

88
const prefersDark
@@ -13,13 +13,13 @@ const useAppStore = defineStore('app', () => {
1313
const theme = prefersDark ? 'dark' : 'light'
1414
const mode = ref<ConfigProviderTheme>(theme)
1515

16-
const swithMode = (val: ConfigProviderTheme) => {
16+
const switchMode = (val: ConfigProviderTheme) => {
1717
mode.value = val
1818
}
1919

2020
return {
2121
mode,
22-
swithMode,
22+
switchMode,
2323
}
2424
}, {
2525
persist: true,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /