diff --git a/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java b/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java index 0b0650478..7c3c15876 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java @@ -446,12 +446,14 @@ public abstract class CellQuickEditor extends QuickEditor { Style oldStyle = cellElement == null ? Style.DEFAULT_STYLE : cellElement.getStyle(); Style style = formatPane.update(oldStyle); for (TemplateCellElement cellElement : allCellElements) { - Format elementFormat = cellElement.getStyle().getFormat(); + Style cellElementStyle = cellElement.getStyle(); + Format elementFormat = cellElementStyle.getFormat(); Format paneFormat = style.getFormat(); if (!Objects.equals(paneFormat, elementFormat)) { // 点击单元格,但未设置格式时,不将单元格设置为编辑状态,防止将所选的每个单元格都设置为编辑状态 editingElementCase.addCellElement(cellElement); - cellElement.setStyle(style); + Style newStyle = cellElementStyle.deriveFormat(paneFormat); + cellElement.setStyle(newStyle); updateStyle = true; } }