Commit de0344c6 by zhaochengxiang

bug fix

parent 8e1b9f4f
......@@ -205,6 +205,7 @@ export const EditableCell = ({
index,
attributes,
types,
require,
children,
...restProps
}) => {
......@@ -213,7 +214,12 @@ export const EditableCell = ({
if (editing) {
if (dataIndex!=='attributesWithOrders' && dataIndex!=='indextype') {
const inputNode = inputType === 'check' ? <Checkbox /> : <Input />
let inputNode = <Input />
if (inputType === 'check') {
inputNode = <Checkbox />
} else if (inputType === 'textarea') {
inputNode = <Input.TextArea rows={3} />
}
editingComponent = (
<Form.Item
......@@ -224,7 +230,7 @@ export const EditableCell = ({
valuePropName={(inputType==='check')? 'checked': 'value'}
rules={[
{
required: (inputType === 'text'),
required: (require===null)?false:require,
message: `请输入${colTitle}!`,
},
]}
......@@ -674,6 +680,7 @@ const ImportActionIndex = (props) => {
dataIndex: 'name',
editable: true,
ellipsis: true,
require: true,
render: (text, record, index) => {
return (
<React.Fragment>
......@@ -762,6 +769,7 @@ const ImportActionIndex = (props) => {
inputType: (col.dataIndex==='unique') ? 'check' : 'text',
colTitle: col.title,
editing: isEditing(record),
require: col.require,
attributes,
types,
}),
......
......@@ -302,6 +302,7 @@ const ImportActionProcess = (props) => {
editable: true,
ellipsis: true,
require: true,
inputType: 'textarea',
render: (_, record, __) => {
return (
<Tooltip title={record.name}>
......@@ -316,6 +317,7 @@ const ImportActionProcess = (props) => {
editable: true,
ellipsis: true,
require: true,
inputType: 'textarea',
render: (_, record, __) => {
return (
<Tooltip title={record.remark}>
......@@ -338,8 +340,9 @@ const ImportActionProcess = (props) => {
onCell: (record) => ({
record,
dataIndex: col.dataIndex,
inputType: 'text',
inputType: col.inputType??'text',
colTitle: col.title,
require: col.require,
editing: isEditing(record),
}),
};
......
......@@ -163,7 +163,7 @@ export const EditableCell = ({
if (inputType === 'check') {
inputNode = <Checkbox />;
} else if (inputType === 'textarea') {
inputNode = <Input.TextArea autoSize={{ minRows: 1, maxRows: 6 }} />;
inputNode = <Input.TextArea rows={3} />;
} else if (inputType === 'datatype') {
inputNode = <DatatypeInput datatypes={datatypes} />;
}
......@@ -951,8 +951,7 @@ export const ImportActionTable = (props) => {
inputType = 'check';
} else if (
col.dataIndex === 'remark' ||
col.dataIndex === 'definition' ||
col.dataIndex === 'valueRange'
col.dataIndex === 'definition'
) {
inputType = 'textarea';
} else if (col.dataIndex === 'datatype') {
......
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