<el-cascader v-model="gids" :options="options" placeholder="導(dǎo)入到分類" ref="myCascader" @change="cascaderChange" :props="{ checkStrictly: true }" ></el-cascader>
cascaderChange(){
let node = this.$refs.myCascader.getCheckedNodes()[0];
// 判斷是否是最后一級
!node.hasChildren && this.$refs.myCascader.toggleDropDownVisible();
}
<style lang="less">
.el-cascader-panel .el-radio{
width: 100%;
height: 100%;
z-index: 10;
position: absolute;
top: 10px;
right: 10px;
}
.el-cascader-panel .el-radio__input{
visibility: hidden;
}
.el-cascader-panel .el-cascader-node__postfix {
top: 10px;
}
</style>
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者