docs(color-mode): fix computed setter logic in ColorModeButton.vue example (#3903)

This commit is contained in:
Lo
2025-04-17 23:18:26 +08:00
committed by GitHub
parent f6b376110c
commit 8ea99f0c4f
2 changed files with 4 additions and 4 deletions

View File

@@ -26,8 +26,8 @@ const isDark = computed({
get() {
return colorMode.value === 'dark'
},
set() {
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'
set(_isDark) {
colorMode.preference = _isDark ? 'dark' : 'light'
}
})
</script>