mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
353fdc7b29
commit
6378d1e738
3 changed files with 45 additions and 8 deletions
|
|
@ -32,6 +32,7 @@ import {updateCellsValue} from "./cell";
|
|||
import {openCalcMenu} from "./calc";
|
||||
import * as dayjs from "dayjs";
|
||||
import {confirmDialog} from "../../../dialog/confirmDialog";
|
||||
import {escapeAttr} from "../../../util/escape";
|
||||
|
||||
export const openMenuPanel = (options: {
|
||||
protyle: IProtyle,
|
||||
|
|
@ -1074,7 +1075,11 @@ export const openMenuPanel = (options: {
|
|||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "addColOptionOrCell") {
|
||||
addColOptionOrCell(options.protyle, data, options.cellElements, target, menuElement, options.blockElement);
|
||||
if (target.querySelector(".b3-menu__checked")) {
|
||||
removeCellOption(options.protyle, data, options.cellElements, menuElement.querySelector(`.b3-chips .b3-chip[data-content="${escapeAttr(target.dataset.name)}"]`), options.blockElement);
|
||||
} else {
|
||||
addColOptionOrCell(options.protyle, data, options.cellElements, target, menuElement, options.blockElement);
|
||||
}
|
||||
window.siyuan.menus.menu.remove();
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue