feat: 1.固定图层缩略图(完成)
2.工具栏新增插槽(完成) 3.loadJSON的元素顺序回发生错误
This commit is contained in:
@@ -85,6 +85,11 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false, // 是否允许擦除背景图层
|
||||
},
|
||||
|
||||
showFixedLayer: {
|
||||
type: Boolean,
|
||||
default: false, // 是否显示固定图层
|
||||
},
|
||||
});
|
||||
|
||||
// 引用和状态
|
||||
@@ -676,6 +681,7 @@ const changeCanvas = (command) => {
|
||||
// 提供外部ref实例方法
|
||||
defineExpose({
|
||||
layers, // 图层数据
|
||||
activeTool, // 当前选中的工具
|
||||
getCanvasManager: () => canvasManager, // 获取画布管理器实例
|
||||
// type : isBackground isFixed flag: 是否可擦除图层
|
||||
setFixedLayerErasable: ({ type = "isFixed", flag = false }) => {
|
||||
@@ -862,7 +868,12 @@ defineExpose({
|
||||
@zoom-in="zoomIn"
|
||||
@zoom-out="zoomOut"
|
||||
@undo-redo-status-changed="changeCanvas"
|
||||
/>
|
||||
>
|
||||
<!-- 扩展插槽 -->
|
||||
<template #customTools="{ toolButtonProps }">
|
||||
<slot name="customTools" :tool-button-props="toolButtonProps" />
|
||||
</template>
|
||||
</ToolsSidebar>
|
||||
</div>
|
||||
|
||||
<div
|
||||
@@ -934,6 +945,7 @@ defineExpose({
|
||||
:activeLayerId="activeLayerId"
|
||||
:activeElementId="activeElementId"
|
||||
:thumbnailManager="canvasManager.thumbnailManager"
|
||||
:showFixedLayer="showFixedLayer"
|
||||
@add-layer="addLayer"
|
||||
@set-active-layer="setActiveLayer"
|
||||
@toggle-layer-visibility="toggleLayerVisibility"
|
||||
|
||||
Reference in New Issue
Block a user