This commit is contained in:
parent
6521d4c537
commit
4598025f2b
2 changed files with 6 additions and 3 deletions
|
@ -394,7 +394,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
if (operation.action === "setAttrViewColWidth") {
|
||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
||||
const cellElement = item.querySelector(`.av__cell[data-col-id="${operation.id}"]`) as HTMLElement;
|
||||
if (!cellElement || cellElement.style.width === operation.data) {
|
||||
if (!cellElement || cellElement.style.width === operation.data || item.getAttribute("custom-sy-av-view") !== operation.keyID) {
|
||||
return;
|
||||
}
|
||||
item.querySelectorAll(".av__row").forEach(rowItem => {
|
||||
|
|
|
@ -439,18 +439,21 @@ export class WYSIWYG {
|
|||
if (!newWidth || newWidth === oldWidth) {
|
||||
return;
|
||||
}
|
||||
const viewId = nodeElement.getAttribute("custom-sy-av-view");
|
||||
transaction(protyle, [{
|
||||
action: "setAttrViewColWidth",
|
||||
id: dragColId,
|
||||
avID: avId,
|
||||
data: newWidth + "px",
|
||||
blockID
|
||||
blockID,
|
||||
keyID: viewId // 仅前端使用,用于推送时不影响其他视图 https://github.com/siyuan-note/siyuan/issues/11019
|
||||
}], [{
|
||||
action: "setAttrViewColWidth",
|
||||
id: dragColId,
|
||||
avID: avId,
|
||||
data: oldWidth + "px",
|
||||
blockID
|
||||
blockID,
|
||||
keyID: viewId
|
||||
}]);
|
||||
};
|
||||
this.preventClick = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue