From b7f96194c4f0381b1478ba7b6e951aed86e47ee0 Mon Sep 17 00:00:00 2001 From: jimmychai Date: Wed, 26 Jul 2023 18:34:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-130613=20fix:=20=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A0=91=E5=B1=95=E5=BC=80=E6=B2=A1=E6=9C=89=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/case/ztree/asynctree.js | 43 ++++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/packages/fineui/src/case/ztree/asynctree.js b/packages/fineui/src/case/ztree/asynctree.js index f9b5bf6b6..20c698cc7 100644 --- a/packages/fineui/src/case/ztree/asynctree.js +++ b/packages/fineui/src/case/ztree/asynctree.js @@ -1,7 +1,19 @@ -import { cjkEncodeDO, deepClone, each, extend, isEmpty, isNotNull, isNull, shortcut } from "@/core"; +import { + cjkEncodeDO, + deepClone, + each, + extend, + isEmpty, + isNotNull, + isNull, + shortcut, + AbsoluteLayout, + createWidget, +} from "@/core"; import { TreeView } from "./treeview"; import { TreeRenderPageService } from "./treerender.page.service"; import $ from "jquery"; +import { IconLabel } from "@/base"; @shortcut() export class AsyncTree extends TreeView { @@ -197,7 +209,34 @@ export class AsyncTree extends TreeView { }, options ); - o.itemsCreator(op, complete); + + let loadingIcon; + createWidget({ + type: AbsoluteLayout.xtype, + element: `#${treeNode.tId}`, + css: { + position: "relative", + }, + items: [ + { + el: { + type: IconLabel.xtype, + width: 20, + height: 20, + cls: "button-loading-font anim-rotate bi-card", + ref: ref => { + loadingIcon = ref; + }, + }, + left: 5, + top: 5, + }, + ], + }); + o.itemsCreator(op, (...args) => { + complete.apply(this, args); + loadingIcon.destroy(); + }); } // 展开节点会将halfCheck置为false以开启自动计算半选, 所以第一次展开节点的时候需要在置为false之前获取配置 From cb2f0bd3be4df67788dcde9476a843d855be14bc Mon Sep 17 00:00:00 2001 From: jimmychai Date: Fri, 28 Jul 2023 18:53:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?BI-130613=20fix:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/case/ztree/asynctree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fineui/src/case/ztree/asynctree.js b/packages/fineui/src/case/ztree/asynctree.js index 20c698cc7..7921ef821 100644 --- a/packages/fineui/src/case/ztree/asynctree.js +++ b/packages/fineui/src/case/ztree/asynctree.js @@ -213,7 +213,7 @@ export class AsyncTree extends TreeView { let loadingIcon; createWidget({ type: AbsoluteLayout.xtype, - element: `#${treeNode.tId}`, + element: self.element.find(`#${treeNode.tId}`), css: { position: "relative", },