From d5a8f5c874d62a298ae7756646155199ebe7b849 Mon Sep 17 00:00:00 2001 From: hdx Date: Sat, 26 Aug 2023 17:00:21 +0800 Subject: [PATCH] =?UTF-8?q?slider-100:=20TODO=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=BB=91=E5=8A=A8=E6=97=B6=E5=85=B6=E4=BB=96slider=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/slider-100/slider-100.uvue | 39 ++++++++++++++++------ 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/pages/component/slider-100/slider-100.uvue b/pages/component/slider-100/slider-100.uvue index 77c77f87..e8bdb935 100644 --- a/pages/component/slider-100/slider-100.uvue +++ b/pages/component/slider-100/slider-100.uvue @@ -5,20 +5,20 @@ - + - + - + - + @@ -36,7 +36,26 @@ }, methods: { sliderChanging(e : SliderChangeEvent) { - this.sliderValue = e.detail.value + // this.sliderValue = e.detail.value + + // TODO + const sliderValue = e.detail.value; + (this.$refs["slider1"]! as ComponentPublicInstance[]).forEach((item) => { + item.$data["sliderValue"] = sliderValue + item.$callMethod("_onRender") + }); + (this.$refs["slider2"]! as ComponentPublicInstance[]).forEach((item) => { + item.$data["sliderValue"] = sliderValue + item.$callMethod("_onRender") + }); + (this.$refs["slider3"]! as ComponentPublicInstance[]).forEach((item) => { + item.$data["sliderValue"] = sliderValue + item.$callMethod("_onRender") + }); + (this.$refs["slider4"]! as ComponentPublicInstance[]).forEach((item) => { + item.$data["sliderValue"] = sliderValue + item.$callMethod("_onRender") + }); }, }, } @@ -56,6 +75,6 @@ } .slider { - margin: 2px 0.5px; + margin: 1px 0.5px; } \ No newline at end of file -- GitLab