账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    antd 的 Form 和 Table 怎么一起使用?
    53
    0
    import { useState } from "react";import { Table, Form, Input } from "antd";function TableFormValidate() { const [dataSource, setDataSource] = useState([ { id: 1, name: 'a' }, { id: 2, name: 'b' }, { id: 3, name: 'c' }, ]) const columns = [ { title: 'id', dataIndex: 'id' }, { title: '名字', dataIndex: 'name', render: (text, record, index) => ( <Form.Item name={[index, 'name']} rules={[{ require: true, message: '不能为空' }]}> <Input /> </Form.Item> ) }, ] return ( <div> <Form defaultValue={dataSource}> <Table columns={columns} dataSource={dataSource} pagination={false} rowKey="id" /> </Form > </div> )}export default TableFormValidate期望:对每个表格里的输入框都能进行验证
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 抱走的鹅 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部