<LampColorSlider
trackStyle={{
height: '25px',
width: ${viewWidth - 40}px
,
}}
thumbStyle={{ height: '29px', background: hueToRGBString(selectedHue) }}
value={selectedHue}
onTouchEnd={hueValue => {
console.log('slider选中的hue', hueValue);
setDefaultColorIndex(-1);
Code: Select all
setSelectedHue(hueValue);
if (opration === 2) {
publishSameHueDP(hueValue);
}
}}
></LampColorSlider>
在点击slider的时候onTouchEnd很难触发