el-cascader 返回最后一级
时间: 2023-08-20 09:08:12 浏览: 168
vue el-cascader所需要的省市区街道联动的数据格式
el-cascader返回最后一级的配置可以使用show-all-levels属性,将其设置为false。这样,el-cascader组件只会显示最后一级的选项。 [3 例如:
<el-cascader :options="signList" v-model="signListId" filterable clearable :show-all-levels="false" :props="{ multiple: true, emitPath: false, value: 'id', label: 'name' }"></el-cascader>
在上面的示例中,show-all-levels属性被设置为false,这样el-cascader只会返回最后一级的选项,而不会显示所有级别的选项。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [el-cascader选择任意一级会出现暂无数据的面版及点击到最后一级会出现loading且不会消失](https://blog.csdn.net/weixin_49686572/article/details/128221273)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [el-cascader多选只展示最后一级,只返回最后一级](https://blog.csdn.net/weixin_54682740/article/details/122490682)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文