From 8b39f5b70eda98841ca954506cb466eb35668251 Mon Sep 17 00:00:00 2001 From: lzp Date: Mon, 13 Apr 2026 17:09:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=B1=E5=BA=A6=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Canvas/DepthCanvas/manager/LayerManager.ts | 12 ++++++------ .../Canvas/DepthCanvas/manager/ObjectManager.ts | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/Canvas/DepthCanvas/manager/LayerManager.ts b/src/components/Canvas/DepthCanvas/manager/LayerManager.ts index db02e9e..fcfca62 100644 --- a/src/components/Canvas/DepthCanvas/manager/LayerManager.ts +++ b/src/components/Canvas/DepthCanvas/manager/LayerManager.ts @@ -279,7 +279,7 @@ export class LayerManager { }) this.setLayerPosition(rectObject, options) await this.canvasManager.add(rectObject, isRecord) - if (isActive) this.setActiveID(rectObject.info.id) + if (isActive) this.setActiveID(rectObject.info.id, false) return rectObject } /** 创建直线图层 */ @@ -303,7 +303,7 @@ export class LayerManager { }); this.setLayerPosition(arrowObject, options) await this.canvasManager.add(arrowObject, isRecord) - if (isActive) this.setActiveID(arrowObject.info.id) + if (isActive) this.setActiveID(arrowObject.info.id, false) return arrowObject } /** 创建椭圆图层 */ @@ -320,7 +320,7 @@ export class LayerManager { }) this.setLayerPosition(ellipseObject, options) await this.canvasManager.add(ellipseObject) - if (isActive) this.setActiveID(ellipseObject.info.id) + if (isActive) this.setActiveID(ellipseObject.info.id, false) return ellipseObject } /** 创建三角形图层 */ @@ -339,7 +339,7 @@ export class LayerManager { }) this.setLayerPosition(triangleObject, options) await this.canvasManager.add(triangleObject, isRecord) - if (isActive) this.setActiveID(triangleObject.info.id) + if (isActive) this.setActiveID(triangleObject.info.id, false) return triangleObject } /** 创建五角星图层 */ @@ -360,7 +360,7 @@ export class LayerManager { }) this.setLayerPosition(starObject, options) await this.canvasManager.add(starObject, isRecord) - if (isActive) this.setActiveID(starObject.info.id) + if (isActive) this.setActiveID(starObject.info.id, false) return starObject } /** 创建箭头图层 */ @@ -384,7 +384,7 @@ export class LayerManager { }); this.setLayerPosition(arrowObject, options) await this.canvasManager.add(arrowObject, isRecord) - if (isActive) this.setActiveID(arrowObject.info.id) + if (isActive) this.setActiveID(arrowObject.info.id, false) return arrowObject } diff --git a/src/components/Canvas/DepthCanvas/manager/ObjectManager.ts b/src/components/Canvas/DepthCanvas/manager/ObjectManager.ts index 8266181..c9f5160 100644 --- a/src/components/Canvas/DepthCanvas/manager/ObjectManager.ts +++ b/src/components/Canvas/DepthCanvas/manager/ObjectManager.ts @@ -217,11 +217,12 @@ export class ObjectManager { const object = this.canvasManager.getObjectById(id) if (!object) return null const type = object.type - const isWidth = object.hasOwnProperty('width') - const isHeight = object.hasOwnProperty('height') + const isWidth = options.hasOwnProperty('width') + const isHeight = options.hasOwnProperty('height') if (isWidth || isHeight) { const width = isWidth ? options.width : object.width const height = isHeight ? options.height : object.height + console.log(width, height) if (type === "polygon") { if (object.points.length === 10) {// 五角星 options.points = getStarArr(width, height) From 1301fd3825df635a01c5e8b553323963ff220bee Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Tue, 14 Apr 2026 09:34:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20sketch=E8=87=AA=E5=8A=A8=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E5=88=B0=E5=BA=95=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/agent/components/Agent.vue | 11 ++++++----- src/views/home/agent/components/Preview.vue | 11 +++++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/views/home/agent/components/Agent.vue b/src/views/home/agent/components/Agent.vue index e2d6465..40fdc23 100644 --- a/src/views/home/agent/components/Agent.vue +++ b/src/views/home/agent/components/Agent.vue @@ -226,9 +226,9 @@ ...params, // configParams: JSON.stringify(params.configParams) configParams: JSON.stringify({ - type: params.configParams.type||'', - region: params.configParams.region||'', - style: params.configParams.style||'', + type: params.configParams.type || '', + region: params.configParams.region || '', + style: params.configParams.style || '', temperature: params.configParams.temperature }) }) @@ -236,7 +236,8 @@ const response = await fetch(`${BASEURL}${chatUrl}?${urlParams.toString()}`, { method: 'GET', - signal: abortController.signal + signal: abortController.signal, + keepalive: true }) // 检查响应内容类型,判断是否为流式响应 @@ -680,7 +681,7 @@ Object.entries(newData).forEach(([key, value]) => { if (!existingKeys.has(key)) { - targetArr.unshift({ [key]: value }) + targetArr.push({ [key]: value }) existingKeys.add(key) } }) diff --git a/src/views/home/agent/components/Preview.vue b/src/views/home/agent/components/Preview.vue index 158f983..70dfabf 100644 --- a/src/views/home/agent/components/Preview.vue +++ b/src/views/home/agent/components/Preview.vue @@ -1,5 +1,6 @@