value值:指定选项的值为选项对象的某个属性值(选中的属性)
label值: 指定选项标签为选项对象的某个属性值(看到的属性)
children: 指定选项的子选项为选项对象的某个属性值(用于级联)
v-model由于数据的双向绑定,绑定selectedKeys值,在实例中,value值用于存储对象的id, 因此selectedKeys也是一个用于存放选定对象的id的数组,
<!-- props用来指定配置对象 -->
<!-- option用来指定数据源 -->
<el-cascader
:options="parentCateList"
:props="cascaderProps"
v-model="selectedKeys"
@change="parentCateChanged"
clearable
></el-cascader>
cascaderProps: {
value: 'cat_id',
label: 'cat_name',
children: 'children',
expandTrigger: 'hover',
checkStrictly: true
},
selectedKeys: [],