1.fix bug (#431)
* 1.fix bug 2.update treeTable readme 3.update args name in treetable/eval.js * 1.treeTable animate
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
*/
|
||||
'use strict'
|
||||
import Vue from 'vue'
|
||||
export default function treeToArray(data, expandedAll, parent = null, level = null) {
|
||||
export default function treeToArray(data, expandAll, parent = null, level = null) {
|
||||
let tmp = []
|
||||
Array.from(data).forEach(function(record) {
|
||||
if (record._expanded === undefined) {
|
||||
Vue.set(record, '_expanded', expandedAll)
|
||||
Vue.set(record, '_expanded', expandAll)
|
||||
}
|
||||
let _level = 1
|
||||
if (level !== undefined && level !== null) {
|
||||
@@ -21,7 +21,7 @@ export default function treeToArray(data, expandedAll, parent = null, level = nu
|
||||
}
|
||||
tmp.push(record)
|
||||
if (record.children && record.children.length > 0) {
|
||||
const children = treeToArray(record.children, expandedAll, record, _level)
|
||||
const children = treeToArray(record.children, expandAll, record, _level)
|
||||
tmp = tmp.concat(children)
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user