🎨 多选复制到单选中会变为多个

This commit is contained in:
Vanessa 2024-11-06 11:06:22 +08:00
parent 2ba5242920
commit cf4e9f22ac

View file

@ -107,6 +107,9 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
cellValue.isDetached = true;
delete cellValue.block.id;
} else if (type === "select" || type === "mSelect") {
if (type === "select" && cellValue.type === "mSelect" && cellValue.mSelect.length > 0) {
cellValue.mSelect.splice(1, cellValue.mSelect.length - 1);
}
const operations = mergeAddOption(columns.find(e => e.id === cellElement.dataset.colId), cellValue, avID);
doOperations.push(...operations.doOperations);
undoOperations.push(...operations.undoOperations);