el-dialog 嵌套子组件数据不刷新

<!-- 展示通道测量值 -->
    <el-dialog :title="analogTitle" :visible.sync="analogOpen" width="400px" append-to-body @close="closeDialog">
      <div>
        <analogCurve v-if="reFresh" :mac="analogMac" :channelAddress="analogChannelAddress"/>
      </div>
    </el-dialog>
 
 
data定义:
reFresh: true,
 
methods:
closeDialog(){
        this.$nextTick(()=>{
          this.reFresh = false
      })
 
    //子组件刷新
    reFreshChild(){
      this.reFresh= false
      this.$nextTick(()=>{
          this.reFresh = true
      })
    },
打开dialog调用:
this.reFreshChild()
 
posted @ 2022-04-15 18:06  雨后丶云初霁  阅读(502)  评论(0编辑  收藏  举报