颜色选择器 用户可以自己选择主题色,觉得不错可以点个赞哦 👍 使用环境为 uni-app
。
github仓库: https://github.com/strugglerx/uniapp_color_pick
参数 | 描述 | 类型 | 默认值 |
---|---|---|---|
:unitWidth | 基准单位,右边色相带宽度为40,左边选择块宽高为40*7+20,单位为px,需要使用者自己规划布局 | number | 40 |
参数 | 描述 | 类型 | 默认值 |
---|---|---|---|
@callBack | 返回选择的颜色 | object | -- |
*.vue
<color-picker :unitWidth="unitWidth" @callBack="callBack"/>
import colorPicker from "../../components/struggler-colorPicker/struggler-colorPicker"
export default {
data() {
return {
unitWidth:30
}
},
components:{
colorPicker
},
methods:{
callBack(e){
//do Something
}
}
}
如在使用中发现bug或有优化的建议和意见,请发邮件 str@li.cm 或在 gitHub 上反馈。
⚡wechat:strongdreams
- 2019/12/03 v0.0.1