From 2dc82c80007e3ea9da2715c7df686261d5a7709a Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Fri, 16 Oct 2020 16:22:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9C=88=E6=97=A5=E5=8E=86=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/date.ts | 12 ++++++++-- src/views/regime/date.vue | 46 +++++++++++++++++++++++++++++---------- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/src/utils/date.ts b/src/utils/date.ts index 2478765..1dbf9a8 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -2,7 +2,7 @@ import dayjs from 'dayjs' interface Date{ day?: number; - list?: Array; + list?: Array; } interface GetDate{ @@ -46,7 +46,8 @@ export function getdate(yue?: number): GetDate{ i++; const zhou = Math.floor((i + w - 1) / 7) const d = { - day: i + day: i, + list: [] } if(date[zhou] == undefined){ date[zhou] = [] @@ -91,4 +92,11 @@ export function getweek(zhou?: number){ } console.log(date) return {date, year, yue, day, zhou} +} + + +export function getDay(date: string){ + const now = dayjs(date) + console.log(now.date()) + return now.date(); } \ No newline at end of file diff --git a/src/views/regime/date.vue b/src/views/regime/date.vue index 81ae416..eaa4720 100644 --- a/src/views/regime/date.vue +++ b/src/views/regime/date.vue @@ -28,11 +28,11 @@
-
+
{{i.day}} - +
+

{{i}}

+
@@ -186,8 +186,8 @@ }