diff --git a/src/views/ai/writer/components/Left.vue b/src/views/ai/writer/components/Left.vue index e7851649..b09982b0 100644 --- a/src/views/ai/writer/components/Left.vue +++ b/src/views/ai/writer/components/Left.vue @@ -91,7 +91,7 @@
- 重置 + 重置 生成
@@ -120,8 +120,10 @@ defineProps<{ const emits = defineEmits<{ (e: 'submit', params: Partial) (e: 'example', param: 'write' | 'reply') + (e: 'reset') }>() +/** 点击示例的时候,将定义好的文章作为示例展示出来 **/ const example = (type: 'write' | 'reply') => { formData.value = { ...initData, @@ -129,7 +131,11 @@ const example = (type: 'write' | 'reply') => { } emits('example', type) } - +/** 重置,将表单值作为初选值 **/ +const reset = () => { + formData.value = {...initData} + emits('reset') +} const selectedTab = ref(AiWriteTypeEnum.WRITING) const tabs: { text: string diff --git a/src/views/ai/writer/components/Right.vue b/src/views/ai/writer/components/Right.vue index 4b27ef8c..393a055b 100644 --- a/src/views/ai/writer/components/Right.vue +++ b/src/views/ai/writer/components/Right.vue @@ -1,24 +1,37 @@