fix
This commit is contained in:
@@ -328,6 +328,9 @@ const handleToolClick = (tool) => {
|
||||
style="width: 0; height: 0; opacity: 0"
|
||||
/>
|
||||
|
||||
<slot name="customToolsTop" :tool-button-props="{ activeTool, canUndo, canRedo }" />
|
||||
|
||||
|
||||
<ToolButton
|
||||
v-for="tool in toolsList"
|
||||
:key="tool.id"
|
||||
@@ -339,7 +342,7 @@ const handleToolClick = (tool) => {
|
||||
/>
|
||||
|
||||
<!-- 自定义工具栏按钮插槽 -->
|
||||
<slot name="customTools" :tool-button-props="{ activeTool, canUndo, canRedo }" />
|
||||
<slot name="customToolsBottom" :tool-button-props="{ activeTool, canUndo, canRedo }" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1043,9 +1043,12 @@ defineExpose({
|
||||
@zoom-out="zoomOut"
|
||||
@undo-redo-status-changed="changeCanvas"
|
||||
>
|
||||
<template #customToolsTop="{ toolTopProps }">
|
||||
<slot name="customToolsTop" :tool-button-props="toolTopProps" />
|
||||
</template>
|
||||
<!-- 扩展插槽 -->
|
||||
<template #customTools="{ toolButtonProps }">
|
||||
<slot name="customTools" :tool-button-props="toolButtonProps" />
|
||||
<template #customToolsBottom="{ toolButtonProps }">
|
||||
<slot name="customToolsBottom" :tool-button-props="toolButtonProps" />
|
||||
</template>
|
||||
</ToolsSidebar>
|
||||
</div>
|
||||
|
||||
@@ -218,7 +218,7 @@ const isShowLeft = ref(true);
|
||||
</template>
|
||||
|
||||
<!-- 使用插槽添加自定义工具栏按钮 -->
|
||||
<template #customTools="{ toolButtonProps }">
|
||||
<template #customToolsBottom="{ toolButtonProps }">
|
||||
<!-- 分隔线 -->
|
||||
<div class="tool-separator"></div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user