重写重新生成的逻辑

This commit is contained in:
RockYang
2025-05-28 20:57:27 +08:00
parent 6b6fe1bebd
commit 81b32523ed
7 changed files with 22 additions and 38 deletions

View File

@@ -26,7 +26,7 @@
</el-tooltip>
</span>
<span v-if="!readOnly" class="flex">
<span class="bar-item" @click="reGenerate()">
<span class="bar-item" @click="reGenerate(data.id)">
<el-tooltip class="box-item" effect="dark" content="重新生成" placement="bottom">
<el-icon><Refresh /></el-icon>
</el-tooltip>
@@ -79,7 +79,7 @@
</el-tooltip>
</span>
<span v-if="!readOnly" class="flex">
<span class="bar-item bg" @click="reGenerate()">
<span class="bar-item bg" @click="reGenerate(data.id)">
<el-tooltip class="box-item" effect="dark" content="重新生成" placement="bottom">
<el-icon><Refresh /></el-icon>
</el-tooltip>
@@ -223,8 +223,8 @@ const stopSynthesis = () => {
}
// 重新生成
const reGenerate = () => {
emits('regen')
const reGenerate = (messageId) => {
emits('regen', messageId)
}
</script>

View File

@@ -60,9 +60,7 @@ const props = defineProps({
show: Boolean,
})
const showDialog = computed(() => {
return props.show
})
const showDialog = ref(props.show)
const emits = defineEmits(['hide'])
const close = function () {
emits('hide', false)