add store

This commit is contained in:
Elysia
2026-01-17 20:07:27 +08:00
parent 2250f89266
commit a5b3d1278c
2169 changed files with 387526 additions and 86 deletions

View File

@@ -0,0 +1,33 @@
<template>
<div class="theme-toggle-container">
<span class="theme-label">主题切换</span>
<label class="theme-toggle">
<input type="checkbox" :checked="isDark" @change="toggle">
<span class="theme-slider">
<i class="fas fa-sun"></i>
<i class="fas fa-moon"></i>
</span>
</label>
</div>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue';
const props = defineProps({
isDark: {
type: Boolean,
required: true
}
});
const emit = defineEmits(['toggle']);
const toggle = () => {
emit('toggle');
};
</script>
<style scoped>
/* 该组件样式已在全局样式中定义 */
</style>