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