|
|
|
@ -10,9 +10,9 @@ import {
|
|
|
|
|
jsonEncode, |
|
|
|
|
delay, each, replaceAll, |
|
|
|
|
isUndefined, isNotEmptyArray, deepClone, map, Tree, |
|
|
|
|
isNull, shortcut |
|
|
|
|
isNull, shortcut, VerticalLayout, Layout, DefaultLayout |
|
|
|
|
} from "@/core"; |
|
|
|
|
import { Msg, Pane } from "@/base"; |
|
|
|
|
import { Msg, Pane, LoadingBar, Text } from "@/base"; |
|
|
|
|
|
|
|
|
|
@shortcut() |
|
|
|
|
export class TreeView extends Pane { |
|
|
|
@ -43,12 +43,12 @@ export class TreeView extends Pane {
|
|
|
|
|
|
|
|
|
|
this._createTree(); |
|
|
|
|
this.tip = createWidget({ |
|
|
|
|
type: "bi.loading_bar", |
|
|
|
|
type: LoadingBar.xtype, |
|
|
|
|
invisible: true, |
|
|
|
|
handler: () => this._loadMore(), |
|
|
|
|
}); |
|
|
|
|
createWidget({ |
|
|
|
|
type: "bi.vertical", |
|
|
|
|
type: VerticalLayout.xtype, |
|
|
|
|
scrollable: true, |
|
|
|
|
scrolly: false, |
|
|
|
|
element: this, |
|
|
|
@ -68,11 +68,11 @@ export class TreeView extends Pane {
|
|
|
|
|
this.tree.destroy(); |
|
|
|
|
} |
|
|
|
|
this.tree = createWidget({ |
|
|
|
|
type: "bi.layout", |
|
|
|
|
type: Layout.xtype, |
|
|
|
|
element: `<ul id='${this.id}' class='ztree${BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? " solid'" : "'"}></ul>`, |
|
|
|
|
}); |
|
|
|
|
createWidget({ |
|
|
|
|
type: "bi.default", |
|
|
|
|
type: DefaultLayout.xtype, |
|
|
|
|
element: this, |
|
|
|
|
items: [this.tree], |
|
|
|
|
}); |
|
|
|
@ -386,7 +386,7 @@ export class TreeView extends Pane {
|
|
|
|
|
root: true, |
|
|
|
|
keyword: o.paras.keyword, |
|
|
|
|
}, newNode, { |
|
|
|
|
type: "bi.text", |
|
|
|
|
type: Text.xtype, |
|
|
|
|
text: replaceAll(newNode.text, "\n", " "), |
|
|
|
|
})); |
|
|
|
|
const fragment = BI.Widget._renderEngine.createElement("<div>"); |
|
|
|
|