diff --git a/pages/template/slider-100/slider-100.uvue b/pages/template/slider-100/slider-100.uvue index ff2410d3058d0dfb15c9b54b8efc0535a880793c..02c35c0a506e090e67c37b7dda172c7a4c8e7c0b 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 } }, }