前言
在form-model表单中写入a-cascader,现在开发编辑功能,需要a-cascader根据后端返回的值回显出来内容
关键点就是设置value,从级联中拿取值用:model,把值设置到级联中用value
<a-form-model-item label="所属行业" prop="belongIndustry">
<a-cascader :model="union.belongIndustry" :options="belongIndustryTree" placeholder="请选择"
:value="union.belongIndustry"
@change="(value, option) => handleGetName(value, option, 'union', 'belongIndustry')"></a-cascader>
</a-form-model-item>