From 1b9778abe6d560e0ef208b59d55baf25916e115e Mon Sep 17 00:00:00 2001 From: LiRuoChen <571244399@qq.com> Date: Mon, 3 Aug 2026 17:50:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=A8=E6=A0=BC=E5=9C=A8?= =?UTF-8?q?=E5=81=9A=E6=88=90=E9=A2=84=E5=88=B6=E4=BD=93=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=EF=BC=8C=E4=B8=94=E5=AD=98=E5=9C=A8=E5=86=BB?= =?UTF-8?q?=E7=BB=93=E5=8D=95=E5=85=83=E6=A0=BC=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=EF=BC=8C=E5=86=BB=E7=BB=93=E5=8D=95=E5=85=83=E6=A0=BC=E7=9A=84?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=A4=8D=E7=94=A8=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=86=BB=E7=BB=93=E5=9C=A8=E5=8E=9F=E5=9C=B0=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XericUIActionTable.RendererFilter.cs | 4 ++-- .../Rendering/Elements/CellAssembler.cs | 20 +++++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Runtime/XTable/Rendering/Component/XericUIActionTable.RendererFilter.cs b/Runtime/XTable/Rendering/Component/XericUIActionTable.RendererFilter.cs index 90082d8..b1e757b 100644 --- a/Runtime/XTable/Rendering/Component/XericUIActionTable.RendererFilter.cs +++ b/Runtime/XTable/Rendering/Component/XericUIActionTable.RendererFilter.cs @@ -177,7 +177,7 @@ namespace XericUI.XTable.Rendering.Component { if (string.IsNullOrEmpty(data.Text)) return; - var txt = m_Assembler.GetText(cellId, "cell_text", cellNS); + var txt = m_Assembler.GetText(cellId, "cell_text", cellNS, ContentTransform); if (txt == null) return; txt.Rect.anchoredPosition = new Vector2(cellX + CellPadding, cellY); txt.Rect.sizeDelta = new Vector2(cellW - CellPadding2, cellH); @@ -201,7 +201,7 @@ namespace XericUI.XTable.Rendering.Component if (data.Image == null) return; Sprite sprite = GetOrCreateSprite(data.Image); - var img = m_Assembler.GetImage(cellId, "cell_image", cellNS); + var img = m_Assembler.GetImage(cellId, "cell_image", cellNS, ContentTransform); if (img == null) return; img.Rect.anchoredPosition = new Vector2(cellX + CellPadding, cellY); img.Rect.sizeDelta = new Vector2(cellW - CellPadding2, cellH); diff --git a/Runtime/XTable/Rendering/Elements/CellAssembler.cs b/Runtime/XTable/Rendering/Elements/CellAssembler.cs index 969d797..b39d93a 100644 --- a/Runtime/XTable/Rendering/Elements/CellAssembler.cs +++ b/Runtime/XTable/Rendering/Elements/CellAssembler.cs @@ -183,9 +183,15 @@ namespace XericUI.XTable.Rendering.Elements if (item != null) m_TextPool.ReleaseCell(item.CellId); } - private static void SetImageCounterActive(IReadOnlyList items) + private void SetImageCounterActive(IReadOnlyList items) { - for (int i = 0; i < items.Count; i++) items[i].Root.SetActive(true); + for (int i = 0; i < items.Count; i++) + { + // Counter 整体重新借出前清空历史 Slot 的视觉状态;未重新绑定的 Slot + // 即使随 Counter 激活,也不会保留冻结区域的旧内容。 + ResetImageDefaults(items[i]); + items[i].Root.SetActive(true); + } } private static void SetImageCounterInactive(IReadOnlyList items) @@ -197,9 +203,15 @@ namespace XericUI.XTable.Rendering.Elements } } - private static void SetTextCounterActive(IReadOnlyList items) + private void SetTextCounterActive(IReadOnlyList items) { - for (int i = 0; i < items.Count; i++) items[i].Root.SetActive(true); + for (int i = 0; i < items.Count; i++) + { + // Counter 整体重新借出前清空历史 Slot 的视觉状态;未重新绑定的 Slot + // 即使随 Counter 激活,也不会保留冻结区域的旧内容。 + ResetTextDefaults(items[i]); + items[i].Root.SetActive(true); + } } private static void SetTextCounterInactive(IReadOnlyList items)