From b0dbb80a5054780aa2851c57bcf910c02a109033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Mon, 19 May 2025 15:12:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(intelligent-agent):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=8A=A9=E6=89=8B=E5=9B=BE=E6=A0=87=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=8A=9F=E8=83=BD=20=E8=A1=A8=E6=83=85=E5=8C=85=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A1=AE=E8=AE=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/info/index.vue | 116 +++++++++++++----- src/views/intelligent-agent/index.vue | 5 +- 2 files changed, 88 insertions(+), 33 deletions(-) diff --git a/src/views/intelligent-agent/components/info/index.vue b/src/views/intelligent-agent/components/info/index.vue index a542d14..8fed2a7 100644 --- a/src/views/intelligent-agent/components/info/index.vue +++ b/src/views/intelligent-agent/components/info/index.vue @@ -20,9 +20,25 @@ export default { } } }, + + watch: { + 'dialog.agent': { + handler(val) { + console.log(val) + this.image = val.image + this.imageType = val.imageType + this.background = val.backgroundColor + }, + immediate: true, + deep: true + } + }, + data() { return { isImage: '0', + image: '', + imageType: '', popover: false, background: '', chooseBack: [ @@ -79,8 +95,17 @@ export default { }, chooseGround(colors) { - this.$set(this.dialog.agent, 'backgroundColor', colors) + this.background = colors }, + + saveEmoji() { + this.dialog.agent.image = this.image + this.dialog.agent.imageType = this.imageType + this.$set(this.dialog.agent, 'backgroundColor', this.background) + + this.popover = false + }, + /** * 提交表单 */ @@ -104,8 +129,9 @@ export default { }, // 选择emoji selectEmoji(e) { - this.dialog.agent.image = e.data - this.dialog.agent.imageType = 'emoji' + this.image = e.data + this.imageType = 'emoji' + // this.dialog.agent.imageType = 'emoji' }, // 选择是否是上传图片 changeUploadImage(e) { @@ -129,11 +155,8 @@ export default { label-position="top" label-width="80px" > -
- - - - +
+
+ +
+ + 确认 + +
@@ -201,12 +236,22 @@ export default {
{{ dialog.agent.image }}
-
- +
+
+ + +
@@ -272,6 +317,28 @@ export default {
+