<el-cascader
ref="cascaderhouAddr"
v-model="PersonForm.houArr"
:options="xzqhOptions"
@change="onhouChange"
:show-all-levels="false"
placeholder="户籍所在地"
:disabled="isDisabled"
:key="isResouceShow"
/>
问题:回显数据后,再次点击原数据组件无反应(选择了其他数据后无法再选择回显的那个数据)
期望:可以选择原来的数据
解决:
1.在组件上添加该属性
:key="isResouceShow"
2.change事件中修改变量 isResouceShow 的值
++this.isResouceShow // key值改变了,cascader就会重新渲染
这里的问题是组件重新渲染之后,bug就解决了。