[update] 修改bug87605
This commit is contained in:
@@ -23,9 +23,11 @@
|
||||
@check="onCheck"
|
||||
@select="onSelect"
|
||||
@expand="onExpand"
|
||||
@load="onLoad"
|
||||
:loadData="loadData"
|
||||
:expandedKeys="expandedKeys"
|
||||
:checkedKeys="checkedKeys"
|
||||
:loadedKeys="loadedKeys"
|
||||
:selectedKeys.sync="selectedKeys">
|
||||
|
||||
<template slot="title" slot-scope="{dataRef}">
|
||||
@@ -175,6 +177,7 @@ export default {
|
||||
checkedKeys: [],
|
||||
checkedRows: [],
|
||||
selectedKeys: [],
|
||||
loadedKeys: [],
|
||||
searchValue: '', // 查询框内容
|
||||
replaceFields: {},
|
||||
dataSourceRight: [],
|
||||
@@ -324,11 +327,16 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad (loadedKeys) {
|
||||
this.loadedKeys = loadedKeys
|
||||
},
|
||||
onExpand (expandedKeys) {
|
||||
console.log('========expandedKeys', expandedKeys)
|
||||
this.expandedKeys = expandedKeys
|
||||
},
|
||||
// 异步加载
|
||||
async loadData (node) {
|
||||
console.log('-------------loadData', node)
|
||||
if (node.dataRef.children) {
|
||||
return
|
||||
}
|
||||
@@ -364,14 +372,18 @@ export default {
|
||||
this.visible = false
|
||||
this.checkedKeys = []
|
||||
this.expandedKeys = []
|
||||
this.loadedKeys = []
|
||||
this.dataSourceRight = []
|
||||
this.treeData = []
|
||||
this.searchValue = ''
|
||||
},
|
||||
onSearch (value) {
|
||||
this.searchValue = value
|
||||
this.autoExpandParent = true
|
||||
// this.autoExpandParent = true
|
||||
this.getTreeData()
|
||||
this.expandedKeys = []
|
||||
this.loadedKeys = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 设置树只能选第三级
|
||||
setOnlySelectThreeLevel (treeData) {
|
||||
|
||||
Reference in New Issue
Block a user