diff --git a/pages/component/slider-100/slider-100.uvue b/pages/component/slider-100/slider-100.uvue index 7214aa9b607bff8de0ebc1572d09da0b6ce2214f..89a040f15930b936e973a8342cec7092829b9d70 100644 --- a/pages/component/slider-100/slider-100.uvue +++ b/pages/component/slider-100/slider-100.uvue @@ -1,23 +1,9 @@ @@ -38,19 +24,8 @@ this.updateSliderValue(e.detail.value) }, updateSliderValue(value : number) { - // this.sliderValue = value - // TODO 跳过vue框架,直接修改原生组件 - (this.$refs["slider1"] as UniSliderElement[]).forEach((item) => { - item.value = value - }); - (this.$refs["slider2"] as UniSliderElement[]).forEach((item) => { - item.value = value - }); - (this.$refs["slider3"] as UniSliderElement[]).forEach((item) => { - item.value = value - }); - (this.$refs["slider4"] as UniSliderElement[]).forEach((item) => { + (this.$refs["slider"] as UniSliderElement[]).forEach((item) => { item.value = value }); } @@ -63,15 +38,14 @@ flex: 1; } - .flex-row { + .grid-view { flex-direction: row; - } - - .flex-fill { - flex: 1; + flex-wrap: wrap; } .slider { - margin: 1px 0.5px; + width: 25%; + margin-top: 1px; + margin-bottom: 1px; }