提交 f1dc82d0 authored 作者: 钟是志's avatar 钟是志

FormArray组件修改

上级 4298b2f2
...@@ -24,6 +24,9 @@ const DiyInput = props => { ...@@ -24,6 +24,9 @@ const DiyInput = props => {
} else { } else {
config.placeholder = config.placeholder || '点击输入'; config.placeholder = config.placeholder || '点击输入';
} }
if(config.readOnly) {
delete config.otherProps?.placeholder;
}
return ( return (
<InputItem <InputItem
key={config.key} key={config.key}
...@@ -43,11 +46,15 @@ const DiyInput = props => { ...@@ -43,11 +46,15 @@ const DiyInput = props => {
const DiyTextarea = props => { const DiyTextarea = props => {
let { config, formValue, changeValue, noLengthLimit, rows } = props; let { config, formValue, changeValue, noLengthLimit, rows } = props;
console.log(config);
if (config.readOnly) { if (config.readOnly) {
config.placeholder = ''; config.placeholder = '';
} else { } else {
config.placeholder = config.placeholder || '点击输入'; config.placeholder = config.placeholder || '点击输入';
} }
if(config.readOnly) {
delete config.otherProps?.placeholder;
}
return ( return (
<TextareaItem <TextareaItem
key={config.key} key={config.key}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论