From a8fcfc01d70f5dd373ca2676f30eae5d395664b6 Mon Sep 17 00:00:00 2001 From: jeremyjone Date: Sun, 30 Apr 2023 00:43:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=E4=BF=AE=E6=AD=A3=E6=BB=91?= =?UTF-8?q?=E5=9D=97=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/demo.vue | 20 ++++++++++++++++---- src/components/slider/index.vue | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/demo/demo.vue b/demo/demo.vue index 6694b70..a66a06c 100644 --- a/demo/demo.vue +++ b/demo/demo.vue @@ -2,7 +2,7 @@
- + div
- {{ - scope.row.startDate - }} + + {{ scope.row.startDate.getMonth() + 1 }}-{{ + scope.row.startDate.getDate() + }} + {{ scope.row.startDate.getHours() }}:{{ + scope.row.startDate.getMinutes() + }} + + + + {{ scope.row.endDate.getMonth() + 1 }}-{{ + scope.row.endDate.getDate() + }} + {{ scope.row.endDate.getHours() }}:{{ scope.row.endDate.getMinutes() }} + diff --git a/src/components/slider/index.vue b/src/components/slider/index.vue index 1a4e39d..1b144a8 100644 --- a/src/components/slider/index.vue +++ b/src/components/slider/index.vue @@ -43,7 +43,7 @@ const sliderLeft = computed( const sliderWidth = computed( () => - (props.data!.start.intervalTo(props.data?.end) / currentMillisecond.value) * + (props.data!.end.intervalTo(props.data?.start) / currentMillisecond.value) * ganttColumnWidth.value );