From e66837cb0d890efb8f5f7e05a9e4bcae025a565b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 18 Aug 2026 18:43:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(tree):=20Tree=20=E5=9B=BE=E6=A0=87=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20/bricks/imgs/=20=E7=BB=9D=E5=AF=B9=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=EF=BC=8C=E7=BB=95=E8=BF=87=20bricks.path=20=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=20bug=EF=BC=88currentScriptPath=20=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=20/=20=E5=AF=BC=E8=87=B4=E5=9B=BE=E6=A0=87=20404=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bricks/agent_input.js | 2 ++ bricks/tree.js | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bricks/agent_input.js b/bricks/agent_input.js index 8786a52..06f5831 100644 --- a/bricks/agent_input.js +++ b/bricks/agent_input.js @@ -6,6 +6,8 @@ bricks.AgentInput = class extends bricks.VBox { constructor(opts) { opts.height = 'auto'; opts.width = '100%'; + // 默认内边距,避免子控件(输入框/模型选择器/按钮)贴边;可用 opts.padding 覆盖 + if (opts.padding === undefined) opts.padding = '8px 12px'; super(opts); // file upload diff --git a/bricks/tree.js b/bricks/tree.js index fe69fa1..0bf1dbc 100644 --- a/bricks/tree.js +++ b/bricks/tree.js @@ -93,11 +93,11 @@ bricks.TreeNode = class extends bricks.VBox { states:[ { state: 'open', - url: bricks_resource('imgs/node-expand.svg') + url: '/bricks/imgs/node-expand.svg' }, { state: 'close', - url: bricks_resource('imgs/node-collapse.svg') + url: '/bricks/imgs/node-collapse.svg' } ], rate: 1, @@ -172,9 +172,9 @@ bricks.TreeNode = class extends bricks.VBox { } if (! icons){ icons = { - open: bricks_resource('imgs/open-folder.svg'), - close: bricks_resource('imgs/close-folder.svg'), - leaf: bricks_resource('imgs/close-folder.svg') + open: '/bricks/imgs/open-folder.svg', + close: '/bricks/imgs/close-folder.svg', + leaf: '/bricks/imgs/close-folder.svg' }; } this.icons_urls = icons;