zoukankan      html  css  js  c++  java
  • Vue如何使用$refs

    首先要在标签上定义ref="xxx"

    然后可以在代码中调用

    this.$refs.xxx

    <el-tree
                style="     background: rgba(33, 43, 53, 0.2);
                    color: white;
                    height: 250px;
                    overflow-y: auto;
                    font-size: 14px;"
                class="filter-tree"
                :render-after-expand="false"
                default-expand-all
                show-checkbox
                node-key="id"
                :data="data"
                :props="defaultProps"
                :filter-node-method="filterNode"
                :expand-on-click-node="true"
                @check-change="layerTreeCheckChanged"
                @node-contextmenu="rightClick"
                @node-click="nodeClick"
                ref="tree">

    数据绑定:data

              this.$nextTick(_=>{
                  setTimeout(_=>{
                    tree.setChecked(this.rightNode,true,true);
                  },500)
               })

    this.$nextTick()和tree.setChecked()两个事件会触发什么?

    tree.setChecked()会触发tree的check-change事件。。

    parseMsg->drawPoint
    怎么执行的呢?
    是由EventBus.$emit("queryTrack",str)发送
    然后this.ws2.send(sql)
    ws2接收到消息之后,又发送UDP信息
    on("UDP",)
    执行parseMsg。。调用drawPoint
  • 相关阅读:
    2019暑假集训 windy数
    2019暑假集训 数字游戏
    2019暑假集训 周年纪念晚会
    2019暑假集训 加分二叉树
    0013-求圆柱体体积
    0012-求滑动距离
    0011-绝对值函数
    0010-温度转换
    0009-乘法问题
    0008-三位数倒序问题
  • 原文地址:https://www.cnblogs.com/2008nmj/p/15497942.html
Copyright © 2011-2022 走看看