app.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!--
  2. * @Author: NMTuan
  3. * @Email: NMTuan@qq.com
  4. * @Date: 2024-02-18 11:35:10
  5. * @LastEditTime: 2024-02-19 22:17:10
  6. * @LastEditors: NMTuan
  7. * @Description:
  8. * @FilePath: /timeNow/app.vue
  9. -->
  10. <template>
  11. <div
  12. class="w-full h-screen overflow-hidden flex flex-col items-center justify-between"
  13. >
  14. <div></div>
  15. <!-- <ClientOnly> -->
  16. <div
  17. class="bg-white/5 w-full flex flex-col items-center justify-center py-[4vw]"
  18. >
  19. <div>
  20. <ClockWeek></ClockWeek>
  21. <ClockBoard></ClockBoard>
  22. <ClockDate></ClockDate>
  23. </div>
  24. </div>
  25. <!-- </ClientOnly> -->
  26. <TimeLine></TimeLine>
  27. </div>
  28. </template>
  29. <script setup>
  30. const dateStore = useDateStore()
  31. let dt
  32. onMounted(() => {
  33. dateStore.getNow()
  34. dt = setInterval(() => {
  35. dateStore.getNow()
  36. }, 97)
  37. })
  38. onBeforeUnmount(() => {
  39. clearInterval(dt)
  40. })
  41. </script>
  42. <style lang="scss">
  43. @font-face {
  44. font-family: 'DigitalDismay';
  45. src: url('/fonts/DigitalDismay.otf') format('opentype');
  46. }
  47. .font {
  48. &-digital-dismay {
  49. font-family: 'DigitalDismay';
  50. }
  51. }
  52. </style>