index.vue 409 B

123456789101112131415161718
  1. <script lang="ts" setup>
  2. import { useSettingsStore } from '@/store/modules/settings'
  3. const $pub: any = inject('$pub')
  4. const settingsStore = useSettingsStore()
  5. const { theme } = storeToRefs(settingsStore)
  6. const handleOpenTheme = () => {
  7. $pub('theme')
  8. }
  9. </script>
  10. <template>
  11. <span v-if="theme.showTheme">
  12. <vab-icon icon="brush-2-line" @click="handleOpenTheme" />
  13. </span>
  14. </template>