From 1e51e00840bc0180819ff84804ea8cc6eeac1dd0 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Wed, 1 Mar 2023 18:16:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=BB=A5=E5=8F=8A=E6=96=B0=E5=A2=9E=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=90=8E=E7=9A=84=E5=9B=9E=E8=B0=83=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/admin/components/editor/index.vue | 12 +++++++++++- resources/admin/composables/curd/useCreate.ts | 15 ++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/resources/admin/components/editor/index.vue b/resources/admin/components/editor/index.vue index fb7ce4f..564e30a 100644 --- a/resources/admin/components/editor/index.vue +++ b/resources/admin/components/editor/index.vue @@ -1,6 +1,6 @@ @@ -52,6 +52,7 @@ const props = defineProps({ ], }, }) + const aipKey: string = 's1ntkmnev0ggx0hhaqnubrdxhv0ly99uyrdbckeaycx7iz6v' const uploaded = (blobInfo, progress) => new Promise((resolve, reject) => { @@ -88,9 +89,18 @@ const config = { const emits = defineEmits(['update:modelValue']) const content = ref(props.modelValue) +// 创建的时候 watch(content, value => { emits('update:modelValue', value) }) + +// 回显监听 +watch( + () => props.modelValue, + value => { + content.value = value + }, +)