Commit 0989bbc6 authored by 前端-许佳敏's avatar 前端-许佳敏

补充自定义组件在不可编辑状态下

parent 22afb944
......@@ -61,6 +61,10 @@ const CardCheckBox = (props) => {
const value: number[] = props.value || []
const handleChange = (id) => {
// 如果处于不可编辑状态, 则无法选择
if (!props.editable) {
return false
}
if (value.includes(id)) {
const newValue = findItemAndDelete(value, id)
props.mutators.change(newValue)
......
......@@ -7,6 +7,7 @@ const CustomSlider = (props) => {
return (
<div style={{width: '100%'}}>
<Slider
disabled={!props.editable}
value={value}
onChange={e => props.mutators.change(e)}
{...props.props['x-component-props']}></Slider>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment