其他分享
首页 > 其他分享> > 渐变色滑块插件slider_gradient使用说明

渐变色滑块插件slider_gradient使用说明

作者:互联网

应用场景

参数说明

NameTypeDescriptionDefault
initValueintDefault valueSlider default minimum
minintSlider minimum0
maxintSlider maximum100
isShowLabelboolShow the label on the sliderfalse
labelStringLabel displays data. It is valid only when “isShowlabel” is true.null
isGradientBgboolWhether the background color of the background slider is a gradient.true
onChangeSliderChangeCallbackA custom callback function that triggers as long as the slider movesnull
onChangeEndSliderChangeCallbackA Custom callback function triggered by slider stop movementnull
onChangeBeginSliderChangeCallbackA Custom callback function triggered by slider start movementnull
colorsList< Color >Slider background gradient from left to rightThere are two colors by default, the first app is the main color, and the second is white
labelStyleLabelStyleCustom label stylethis
sliderStyleSliderStyleslider label stylethis
thumbStyleThumbStylethumb label stylethis

总结

开发项目时需要一个渐变色背景的滑块,大概找了下没找到合适的,刚好有时间所以就自己写了一个,内容比较冷门想着以后有可能还会用到就练手写了个组件。

标签:function,插件,滑块,callback,gradient,渐变色,label,slider,background
来源: https://blog.csdn.net/weixin_43822182/article/details/118392716