提到的SjsSlider是物料广场中的 '@ray-js/components-ty-slider/lib/slider'包的中的组件吗?
[求助]滑动选择器slider组件onChange无回调
Re: [求助]滑动选择器slider组件onChange无回调
是的. yarn add --registry=https://registry.npmjs.org/ @ray-js/components-ty-slider@0.2.40
建议用最新版
Code: Select all
import SjsSlider from '@ray-js/components-ty-slider/lib/SjsSlider';
<SjsSlider
instanceId="test_slider_id"
trackStyle={{ width: '200px' }}
barStyle={{ backgroundColor: '#f7bc46' }}
step={1}
min={0}
max={3}
bindmove={e => {
dealBrightness(e, true);
}}
bindend={e => {
dealBrightness(e, false);
}}
/>