feat: 修复画布部分bug

This commit is contained in:
bighuixiang
2025-06-23 00:40:45 +08:00
parent ea1480dd7c
commit 4da5f7d105
14 changed files with 718 additions and 198 deletions

View File

@@ -25,6 +25,10 @@ const props = defineProps({
canvasColor: String,
brushSize: Number,
enabledRedGreenMode: Boolean,
showLayersPanel: {
type: Boolean,
default: true, // 是否显示图层面板
},
});
const emit = defineEmits([
@@ -337,12 +341,11 @@ onMounted(() => {
</div> -->
<!-- 绘图工具设置 -->
<div class="canvas-settings gap-20">
<div class="canvas-settings gap-20" v-if="!props.enabledRedGreenMode">
<div
class="btn"
:class="{ active: showBrushPanel }"
@click="toggleBrushPanel"
v-if="!props.enabledRedGreenMode"
>
<!-- <span class="setting-label">笔刷:</span>/ -->
<div class="brush-selector">
@@ -369,6 +372,7 @@ onMounted(() => {
</div>
</div>
<div
v-if="showLayersPanel"
class="btn"
:class="{ active: isShowLayerPanel }"
@click="showLayerPanel"

View File

@@ -1,6 +1,5 @@
<script setup>
import { ref, watch, nextTick, onMounted, onUnmounted } from "vue";
import SvgIcon from "../../../SvgIcon/index.vue";
const props = defineProps({
visible: Boolean,

View File

@@ -2,7 +2,6 @@
import { ref, nextTick, computed, inject } from "vue";
import { Checkbox } from "ant-design-vue";
import { VueDraggable } from "vue-draggable-plus";
import SvgIcon from "../../../SvgIcon/index.vue";
import { isGroupLayer } from "../../utils/layerHelper";
// 设置组件名称,用于递归渲染

View File

@@ -1,7 +1,6 @@
<script setup>
import { computed, ref, nextTick, inject } from "vue";
import { findLayerRecursively, isGroupLayer } from "../../utils/layerHelper";
import SvgIcon from "../../../SvgIcon/index.vue";
import ContextMenu from "./ContextMenu.vue";
import LayerItem from "./LayerItem.vue";
import LayersList from "./LayersList.vue"; // 引入 LayersList 组件