Skip to content

table中使用input出现Cannot read properties of null (reading 'value') #6801

@gh-Nick

Description

@gh-Nick
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.20

示例代码

<a-table :columns="columns" :data-source="columnDates" bordered size="small" :pagination="false" :row-selection="rowSelection" :rowKey="(record,index)=>record.columnName" :scroll="{x:'max-content',y:450 }"> <template #bodyCell="{ column,record , text,index }"> <template v-if="column.dataIndex === 'columnName'">
<a-form-item :name="['columns', index, 'columnName']" hasFeedback :rules="{required: true,message: '字段不能为空',}"> <a-input v-model:value="record.columnName" />

</a-form-item> </template>

错误信息

ERROR
Cannot read properties of null (reading 'value')
TypeError: Cannot read properties of null (reading 'value')
at eval (webpack-internal:///./node_modules/ant-design-vue/es/input/Input.js:200:30)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions