Bootstrap

VUE:el-tree 节点 双击事件

<el-tree :data="DataSet.data" :props="{children: 'data',label: 'name'}" :render-content="DataSet.RenderContent" @node-click="DataSet_NodeClick" style="margin-top: 6px;"></el-tree>

<script>

// el_tree 双击事件

const dbc_el_tree = { count: 0, prev: null, timer: null }

const dbClicks = (node, id, cb) => {

dbc_el_tree.count++;

if ((dbc_el_tree.prev === node[id]) && dbc_el_tree.count >= 2) { cb() }

dbc_el_tree.prev = node[id];

dbc_el_tree.timer = setTimeout(_ => { dbc_el_tree.count = 0; dbc_el_tree.prev = null; }, 300);

}

export default {

data() {

;