【发布时间】:2021-05-29 05:06:13
【问题描述】:
大家好,请告诉我如何解决这些问题。 问题 1. a-input v-decorator="['name']" initialValue="record.name"> 在输入中不显示来自数据库的数据,但可以在输入内容并提交表单后编辑值。这是我完整的html代码
<a-input v-decorator="['name']" initialValue="record.name" @input="record.name = $event.target.record.name"/>
问题 2。我将“v-decorator”替换为 v-model="record.name" 并且它可以工作,数据在 a-input 内可用于编辑,但是一旦提交表单,值不会传递给“ this.form”函数,因为输入的名称不存在。这是我完整的html代码
<a-input v-model="record.name" name="name" @input="record.name = $event.target.record.name"/>
可能的答案
1. how to set the "initial value" inside v-decorator for updating the value?
2. how to set "name" of input when using v-model which is already populated with record from database?
这里有人了解 vue js 中的 ant 设计吗?我需要帮助
【问题讨论】:
标签: vue.js antd ant-design-pro