Skip to content

Commit

Permalink
更新文字修改颜色bug
Browse files Browse the repository at this point in the history
  • Loading branch information
more-strive committed Aug 13, 2024
1 parent d36e7c4 commit f18bd2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/Editor/CanvasRight/Backgrounds/ElementFill.vue
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ const updateBackground = (props: Partial<BackgroundElement>) => {
const [canvas] = useCanvas();
if (!canvasObject.value) return;
const color = props.color ? props.color : (handleElement.value as TextboxElement).color;
canvasObject.value.set({ fill: props.fill, color, fillType: background.value.fillType, background: { ...background.value, ...props }, opacity: props.opacity });
const opacity = props.opacity !== undefined ? props.opacity : 1
canvasObject.value.set({ fill: props.fill, color, fillType: background.value.fillType, background: { ...background.value, ...props }, opacity });
canvas.renderAll();
templatesStore.modifedElement();
};
Expand Down

0 comments on commit f18bd2a

Please sign in to comment.