From a65e9e3c8a969a3cb4397a09dd91080f10d9f73b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 1 Jul 2025 11:30:50 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/15189 --- app/src/protyle/render/av/render.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index a2bd29359..0b84e2639 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -514,14 +514,20 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => { }); } else if (operation.action === "setAttrViewShowIcon") { Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => { - item.querySelectorAll('.av__cell[data-dtype="block"] .b3-menu__avemoji, .av__cell[data-dtype="relation"] .b3-menu__avemoji').forEach(item => { + item.querySelectorAll('.av__cell[data-dtype="block"] .b3-menu__avemoji, .av__cell[data-dtype="relation"] .b3-menu__avemoji').forEach(cellItem => { if (operation.data) { - item.classList.remove("fn__none"); + cellItem.classList.remove("fn__none"); } else { - item.classList.add("fn__none"); + cellItem.classList.add("fn__none"); } }); }); + } else if (operation.action === "setAttrViewColWrap") { + Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => { + item.querySelectorAll(`.av__cell[data-col-id="${operation.id}"],.av__cell[data-field-id="${operation.id}"]`).forEach(cellItem => { + cellItem.setAttribute("data-wrap", operation.data.toString()); + }); + }); } else { // 修改表格名 avID 传入到 id 上了 https://github.com/siyuan-note/siyuan/issues/12724 const avID = operation.action === "setAttrViewName" ? operation.id : operation.avID;