From cb9ade2afd2a367ad767bc605ab7086c695dd010 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 09 十二月 2022 15:53:32 +0800 Subject: [PATCH] 2022-12-09 --- src/components/normalform/modalform/mkTable/index.jsx | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/normalform/modalform/mkTable/index.jsx b/src/components/normalform/modalform/mkTable/index.jsx index c5ae0e9..ae23f22 100644 --- a/src/components/normalform/modalform/mkTable/index.jsx +++ b/src/components/normalform/modalform/mkTable/index.jsx @@ -75,14 +75,14 @@ class EditableCell extends Component { getInput = (form) => { - const { inputType, options, min, max, unlimit } = this.props + const { inputType, options, min, max, unlimit, allowClear } = this.props if (inputType === 'number' && unlimit) { return <InputNumber onPressEnter={() => this.getValue(form)} /> } else if (inputType === 'number') { return <InputNumber min={min} max={max} precision={0} onPressEnter={() => this.getValue(form)} /> } else if (inputType === 'color') { - return <ColorSketch /> + return <ColorSketch allowClear={allowClear}/> } else if (inputType === 'icon') { return <MkEditIcon allowClear/> } else if (inputType === 'select') { @@ -420,6 +420,7 @@ unlimit: col.unlimit, required: col.required !== false ? true : false, title: col.title, + allowClear: col.allowClear === true, editing: this.isEditing(record), onSave: this.execSave, }), @@ -452,6 +453,7 @@ })} /> </DndProvider> + {this.props.tip ? this.props.tip : null} </div> </EditableContext.Provider> ) -- Gitblit v1.8.0