From 046ae512f02df2d3f08134949b9376a061c1eef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=87=AF=E9=BE=99?= <502431556@qq.com> Date: Fri, 25 Mar 2022 08:41:57 +0800 Subject: [PATCH] style: modify the function name to make it more semantic --- src/App.vue | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/App.vue b/src/App.vue index 92ccab0ed..7990e42b5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,12 +15,13 @@ const currentSize = computed(() => appStore.getCurrentSize) const greyMode = computed(() => appStore.getGreyMode) -const initDark = () => { +// 根据浏览器当前主题设置系统主题色 +const setDefaultTheme = () => { const isDarkTheme = isDark() appStore.setIsDark(isDarkTheme) } -initDark() +setDefaultTheme()