滑块
# 配置代码
data() {
return {
widgetForm: {
"list":[{
label: '滑块',
type: 'slider',
options: {
defaultValue: 0,
width: '100%',
min: 0,
max: 100,
step: 1,
disabled: false,
range: false,
rules
}
}],
"config":{ //config里包含的是表单属性
...
}
}
};
},
# 参数说明
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
label | 名称 | string | -- | -- |
type | 组件类型 | string | -- | -- |
options | 配置参数 | Array | -- | [] |
# options参数说明
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
width | 宽度 | string | % px | -- |
defaultValue | 默认值 | string | -- | -- |
step | 步长 | number | -- | 1 |
min | 最小值 | number | -- | 0 |
max | 最大值 | number | -- | 100 |
range | 是否为范围选择 | boolean | -- | false |
disabled | 是否禁用 | boolean | -- | false |
rules | 查看规则配置 | Array | [] | -- |
更多配置参考:
element-ui https://element.eleme.cn/#/zh-CN/component/slider
element-plus https://element-plus.org/zh-CN/component/slider.html