使用Cascader 級聯選擇器中出現如下問題:
<el-cascader
v-model="selectedKeys"
:options="parentsData"
:props="cascaderProps"
@change="parentsCateChange">
</el-cascader>
官方文檔中沒有設置項,解決方法:
在全局css文件中,或模板組件的style中加入如下代碼:
.el-cascader-panel {
height: 200px;
}
添加後效果如圖: