From 54dfee40e336ad866918c9c46554c4ed4520f715 Mon Sep 17 00:00:00 2001 From: hdx Date: Wed, 20 Nov 2024 16:21:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(slider-100):=20=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=85=B6=E5=AE=83=20slider=20=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=B7=9F=E9=9A=8F=E5=8F=98=E5=8A=A8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/template/slider-100/slider-100.uvue | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pages/template/slider-100/slider-100.uvue b/pages/template/slider-100/slider-100.uvue index ff2410d3..02c35c0a 100644 --- a/pages/template/slider-100/slider-100.uvue +++ b/pages/template/slider-100/slider-100.uvue @@ -3,8 +3,8 @@ - - + @@ -32,11 +32,17 @@ sliderChanging(e : UniSliderChangeEvent) { this.updateSliderValue(e.detail.value) }, - updateSliderValue(value : number) { - // TODO 跳过vue框架,直接修改原生组件 - (this.$refs["slider"] as UniSliderElement[]).forEach((item) => { - item.value = value - }); + updateSliderValue(value : number) { + // #ifndef MP + // TODO 跳过vue框架,直接修改原生组件 + (this.$refs["slider"] as UniSliderElement[]).forEach((item) => { + item.value = value + }); + // #endif + + // #ifdef MP + this.sliderValue = value + // #endif } }, } -- GitLab