index.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!--
  2. * @Author: NMTuan
  3. * @Email: NMTuan@qq.com
  4. * @Date: 2024-02-20 16:11:39
  5. * @LastEditTime: 2024-02-22 11:53:57
  6. * @LastEditors: NMTuan
  7. * @Description:
  8. * @FilePath: \timeNow\components\header\index.vue
  9. -->
  10. <template>
  11. <div class="w-full text-right pr-6 pt-6">
  12. <!-- -->
  13. <HeaderIcon name="i-ri-cup-line"></HeaderIcon>
  14. <HeaderIcon name="i-ri-github-line" href="https://github.com/NMTuan/timeNow"></HeaderIcon>
  15. <ClientOnly>
  16. <HeaderToggleFullScreen></HeaderToggleFullScreen>
  17. </ClientOnly>
  18. <!-- <HeaderIcon name="i-ri-twitter-line"></HeaderIcon> -->
  19. <HeaderIcon @click="optionsVisiable = true" name="i-ri-equalizer-line"></HeaderIcon>
  20. <USlideover v-model="optionsVisiable">
  21. <UCard class="flex flex-col flex-1"
  22. :ui="{ body: { base: 'flex-1' }, ring: '', divide: 'divide-y divide-zinc-100 dark:divide-zinc-800' }">
  23. <template #header>
  24. <div class="flex items-center justify-between">
  25. <h3 class="text-base font-semibold leading-6 text-zinc-900 dark:text-zinc-300">
  26. Settings
  27. </h3>
  28. <UButton color="gray" variant="ghost" icon="i-ri-close-line" @click="optionsVisiable = false" />
  29. </div>
  30. </template>
  31. <UFormGroup class="mb-6">
  32. <template #label>
  33. <div class="text-base">表盘</div>
  34. </template>
  35. <UCheckbox class="my-4" v-model="settingStore.hour24" label="24小时制"></UCheckbox>
  36. <UCheckbox class="my-4" v-model="settingStore.showSecond" label="显示秒数"></UCheckbox>
  37. <UCheckbox class="my-4" v-model="settingStore.flicker" label="冒号闪动"></UCheckbox>
  38. </UFormGroup>
  39. <UFormGroup class="mb-6">
  40. <template #label>
  41. <div class="text-base">底部</div>
  42. </template>
  43. <UCheckbox class="my-4" v-model="settingStore.showTimeLine" label="显示日进度"></UCheckbox>
  44. <UCheckbox class="my-4" v-model="settingStore.showDayLine" label="显示月进度"></UCheckbox>
  45. <UCheckbox class="my-4" v-model="settingStore.showMonthLine" label="显示年进度"></UCheckbox>
  46. </UFormGroup>
  47. </UCard>
  48. </USlideover>
  49. </div>
  50. </template>
  51. <script setup>
  52. const settingStore = useSettingStore()
  53. const optionsVisiable = ref(false)
  54. </script>