新增画布是否可以修改背景

This commit is contained in:
李志鹏
2025-11-13 16:53:45 +08:00
parent e806e0da73
commit 08f4f9bd89
3 changed files with 8 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ const props = defineProps({
type: Boolean,
default: true, // 是否显示图层面板
},
isBackgroundChangeable: Boolean,
});
const emit = defineEmits([
@@ -312,7 +313,7 @@ onMounted(() => {
"
/>
</div>
<div class="setting-group">
<div class="setting-group" v-if="isBackgroundChangeable">
<span class="setting-label">{{ $t("Canvas.color") }}</span>
<div class="color-picker-wrapper">
<input

View File

@@ -101,7 +101,10 @@ const props = defineProps({
type: Boolean,
default: false, // 是否允许擦除背景图层
},
isBackgroundChangeable: {
type: Boolean,
default: true, // 是否允许修改背景图层
},
showFixedLayer: {
type: Boolean,
default: false, // 是否显示固定图层
@@ -1153,6 +1156,7 @@ defineExpose({
:brushSize="brushSize"
:enabledRedGreenMode="enabledRedGreenMode"
:showLayersPanel="showLayersPanel"
:isBackgroundChangeable="isBackgroundChangeable"
@update:canvasWidth="canvasWidth = $event"
@update:canvasHeight="canvasHeight = $event"
@update:canvasColor="canvasColor = $event"

View File

@@ -5,6 +5,7 @@
@canvasInit="canvasInit"
@changeCanvas="changeCanvas"
is-general
:isBackgroundChangeable="false"
ref="editCanvas"></editCanvas>
</div>
<div class="btn">