From c03f45feca9fde4b931839a72368622f4d37db36 Mon Sep 17 00:00:00 2001 From: 刘嘉威 <daidaibg@163.com> Date: 星期三, 19 十月 2022 17:28:03 +0800 Subject: [PATCH] ci: 更新依赖 --- src/views/header.vue | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/views/header.vue b/src/views/header.vue index 8ffc87f..aba80ff 100644 --- a/src/views/header.vue +++ b/src/views/header.vue @@ -1,13 +1,22 @@ <script setup lang="ts"> import { reactive } from "vue"; - -const dateData = reactive({ - dateDay: null, - dateYear: null, - dateWeek: null, - weekday: ["鍛ㄦ棩", "鍛ㄤ竴", "鍛ㄤ簩", "鍛ㄤ笁", "鍛ㄥ洓", "鍛ㄤ簲", "鍛ㄥ叚"], +import dayjs from 'dayjs'; +import type {DateDataType} from "./index.d" +const dateData = reactive<DateDataType>({ + dateDay: "", + dateYear: "", + dateWeek: "", + timing:null }); - + +const weekday= ["鍛ㄦ棩", "鍛ㄤ竴", "鍛ㄤ簩", "鍛ㄤ笁", "鍛ㄥ洓", "鍛ㄤ簲", "鍛ㄥ叚"] +const timeFn = () => { + dateData.timing = setInterval(() => { + dateData.dateDay = dayjs().format("YYYY-MM-DD hh : mm : ss"); + dateData.dateWeek = weekday[dayjs().day()]; + }, 1000); +}; +timeFn() const showSetting = () => {}; </script> -- Gitblit v1.8.0