<el-cascader :style="aotuStyle" ref="elcascader" v-model="discipline_value" :options="discipline_list" :key="isResouceShow" popper-class="discipline" separator="" :show-all-levels="isOld" :props="{value: 'id',label: 'name',expandTrigger: 'hover'}" @change="switchRole"></el-cascader>
created () { this.$refs.elcascader.$refs.popper.onmouseleave = function(){ that.$refs.elcascader.dropDownVisible = false } }
如果cascader 数据是异步获取的,this.$refs.elcascader可能获取不到,这个时候适当给个延迟函数