This commit is contained in:
X1627315083
2025-09-18 10:39:35 +08:00
parent a151b712ca
commit fc8a62c9fb
3 changed files with 23 additions and 21 deletions

6
components.d.ts vendored
View File

@@ -24,14 +24,8 @@ declare module 'vue' {
ASpin: typeof import('ant-design-vue/es')['Spin']
ASwitch: typeof import('ant-design-vue/es')['Switch']
ATable: typeof import('ant-design-vue/es')['Table']
ATabPane: typeof import('ant-design-vue/es')['TabPane']
ATabs: typeof import('ant-design-vue/es')['Tabs']
AUpload: typeof import('ant-design-vue/es')['Upload']
ElCascader: typeof import('element-plus/es')['ElCascader']
ElLoading: typeof import('element-plus/es')['ElLoading']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}

View File

@@ -327,22 +327,24 @@ const handleToolClick = (tool) => {
@change="fillColorChange"
style="width: 0; height: 0; opacity: 0"
/>
<slot name="customToolsTop" :tool-button-props="{ activeTool, canUndo, canRedo }" />
<div class="tools-list">
<slot name="customToolsTop" :tool-button-props="{ activeTool, canUndo, canRedo }" />
<ToolButton
v-for="tool in toolsList"
:key="tool.id"
:tool="tool"
:active-tool="activeTool"
:can-undo="canUndo"
:can-redo="canRedo"
@click="handleToolClick"
/>
<ToolButton
v-for="tool in toolsList"
:key="tool.id"
:tool="tool"
:active-tool="activeTool"
:can-undo="canUndo"
:can-redo="canRedo"
@click="handleToolClick"
/>
<!-- 自定义工具栏按钮插槽 -->
<slot name="customToolsBottom" :tool-button-props="{ activeTool, canUndo, canRedo }" />
<!-- 自定义工具栏按钮插槽 -->
<slot name="customToolsBottom" :tool-button-props="{ activeTool, canUndo, canRedo }" />
</div>
</div>
</template>
@@ -350,17 +352,22 @@ const handleToolClick = (tool) => {
.tools-sidebar {
display: flex;
flex-direction: column;
gap: 1.0rem;
padding: 1.5rem 1.0rem;
border-right: .1rem solid #e0e0e0;
background-color: #ffffff;
user-select: none;
min-width: 5.8rem;
height: 100%;
padding-top: .5rem;
/* overflow-y: auto; */
/* overflow-x: hidden; */
}
.tools-list{
display: flex;
flex-direction: column;
gap: 1.0rem;
flex: 1;
}
.red-green-mode {
background-color: #fff4f4;
}

View File

@@ -806,6 +806,7 @@ const changeCanvas = async (command) => {
setTimeout(async ()=>{
const imageData = await canvasManager.exportImage({
restoreOpacityInRedGreen: true, // 恢复红绿图模式下的透明度
isCropByBg:true,
});
emit("trigger-red-green-mouseup", imageData);
},100)