我正在转换一个ASPX页面到vue。所有的vue组件都被正确加载了,我也得到了refs对象
`<test-report ref="testReport" ></test-report>
<script>
method:{
Loaded:{
this.objResult = this.refs.testReport
}
},`
但是在提交ASPX页面后,我需要在vue组件中显示一些其他数据,但refs对象显示未定义。我需要在该对象内部调用另一个函数,但它显示为undefined。
`<script>
method:{
AfterLoaded:{
this.objResult = this.refs.testReport //showing undefined
}
},
</script>`请帮帮忙
发布于 2019-09-26 15:44:40
尝试在您的案例中使用this.$refs.nameOfRef或this.$refs.testReport
https://stackoverflow.com/questions/58111438
复制相似问题