app.vue 1.4 KB

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