refactor: 移除polling-store,重构setting-store

This commit is contained in:
yangsy
2026-01-19 15:15:38 +08:00
parent b7b6b216fb
commit 6771abec31
29 changed files with 197 additions and 185 deletions

View File

@@ -5,14 +5,14 @@ import { storeToRefs } from 'pinia';
import type { ComponentInstance } from 'vue';
const settingsStore = useSettingStore();
const { darkThemeEnabled } = storeToRefs(settingsStore);
const { darkMode } = storeToRefs(settingsStore);
// 使外部能够获取NSwitch的类型提示
defineExpose({} as ComponentInstance<typeof NSwitch>);
</script>
<template>
<NSwitch v-model:value="darkThemeEnabled">
<NSwitch v-model:value="darkMode">
<template #unchecked-icon>
<NIcon>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">