Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite

This commit is contained in:
zhangyh
2025-09-18 10:58:09 +08:00
4 changed files with 25 additions and 22 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)

View File

@@ -870,7 +870,7 @@ export class ExportManager {
const clipObject = this.canvas?.clipPath;
if (!clipObject) {
console.warn("未找到可用的裁剪对象");
return null;
return null;
}
// 克隆对象作为裁剪路径
@@ -878,6 +878,7 @@ export class ExportManager {
clipObject,
false,
false
);
if (!clonedClipPath) {