From c3e5164044579458924898d4d2964e640a6d0fbe Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 11 Jul 2025 11:19:47 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/11022 --- app/src/protyle/render/av/col.ts | 12 ++++++++++++ app/src/types/index.d.ts | 1 + 2 files changed, 13 insertions(+) diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts index a7f87393b..e6828a51d 100644 --- a/app/src/protyle/render/av/col.ts +++ b/app/src/protyle/render/av/col.ts @@ -955,6 +955,18 @@ export const showColMenu = (protyle: IProtyle, blockElement: Element, cellElemen updateAttrViewCellAnimation(blockElement.querySelector(`.av__row--header .av__cell[data-col-id="${colId}"]`), undefined, {pin: !isPin}); } }); + menu.addItem({ + icon: "iconRefresh", + label: window.siyuan.languages.syncColWidth, + click() { + transaction(protyle, [{ + action: "syncColWidth", + keyID: colId, + avID, + id: blockElement.getAttribute(Constants.CUSTOM_SY_AV_VIEW), + }]); + } + }); if (type !== "block") { if (type !== "relation") { menu.addItem({ diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts index b852dd637..4be9737e8 100644 --- a/app/src/types/index.d.ts +++ b/app/src/types/index.d.ts @@ -64,6 +64,7 @@ type TOperation = | "setAttrViewColDesc" | "setAttrViewBlockView" | "setAttrViewGroup" + | "syncColWidth" type TBazaarType = "templates" | "icons" | "widgets" | "themes" | "plugins" type TCardType = "doc" | "notebook" | "all" type TEventBus = "ws-main" | "sync-start" | "sync-end" | "sync-fail" |