【发布时间】:2021-11-27 12:51:27
【问题描述】:
我在组件标签中定义了一个型号名称,如下所示:
<b-table-column v-if="" field="columnName" v-slot="itemProps">
<SelectableAttribute
:attr-name="props2.row.fieldClass"
:attr-id="itemProps.row.id"
:model-id="props.row.id"
:model-name="NewParticipant"
>
但是我收到此错误:
[Vue warn]: Property or method "NewParticipant" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
我不太确定我应该如何定义模型名称,我假设在我的道具中,但在哪里?我在下面附上了代码。
export default {
props: {
participants:
{
type: Array,
default: null
},
},
components: {
SelectableAttribute
},
【问题讨论】: