Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.0k views
in Technique[技术] by (71.8m points)

Ant design pro中如何对ProTable绑定的表单中的Input输入框作更改

Ant design中的proTable可以自动根据表格内容生成一个Form,如下图所示:
image.png

Form中默认的是input输入框,现在我想要对其中的input输入框作一些操作,也就是想用input组件的api,比如点击input输入框后下方就出现一段灰色提示语,比如输入数据的格式要求,就像注册邮箱那种提示。

请问这里要怎样才能对这里的input输入框作操作呢?columns的相关api中好像没有针对input的操作

const columns: ProColumns<TableListItem>[] = [
    {
      title: '规则名称',
      dataIndex: 'name',
      tip: '规则名称是唯一的 key',
      formItemProps: {
        rules: [
          {
            required: true,
            message: '规则名称为必填项',
          },
        ],
      },
      render: (dom, entity) => {
        return <a onClick={() => setRow(entity)}>{dom}</a>;
      },
    },
     {
      title: '描述',
      dataIndex: 'desc',
      valueType: 'textarea',
    },
  ]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...