解决思路:
在页面初始化技术后根据组件的ref,直接给组件的inputValue
和inputTerxt
赋label的值(前提是你之前已经保存过这个值)
ref的部分属性
代码
<c-cascader
ref="place"
@blur=setPlaceInputValue
:props: "{emitPath: false, lazy: true, lazyLoad: this.lazyLoad }"
onChange={this.initAddress}>
</c-cascader>
初始化页面调用的方法:
this.$nextTick(() => {
this.setPlaceInputValue()
})
setPlaceInputValue() {
this.$refs.place.inputValue = this.censusRegisterPlaceName
this.$refs.place.presentText = this.censusRegisterPlaceName
}