如题,
label显示出来一直是"2测试false"
<FormFilter ref="filter" :config="config">
// 使用config配置的组件
</FormFilter>
data() {
return {
drawer: false,
drawers_s: false,
titleChange: true,
config: [
{
type: 'input',
key: 'subCode',
slot: 'name',
props: {
label: this.titleChange ? '1测试true' : '2测试false',
disabled: false
}
}
]
}
}
this.titleChange = true,
{
type: 'input',
key: 'subCode',
slot: 'name',
props: {
label: this.titleChange ? '1测试true' : '2测试false',
disabled: false
}
}
vue数据是按照props,methods,data,computed,watch的顺序进行初始化的,所以在props中找不到data中的数据