Merge remote-tracking branch 'origin/main' into feature/0909_主agent优化
# Conflicts: # src/views/home/components/history-conversation-drawer/index.vue
This commit is contained in:
@ -1,20 +1,19 @@
|
||||
<template>
|
||||
<a-modal v-model:visible="visible" title="删除对话" width="400px" @close="onClose">
|
||||
<Modal v-model:open="visible" title="删除对话" width="400px" @cancel="onClose" centered>
|
||||
<div class="flex items-center">
|
||||
<img :src="icon1" width="20" height="20" class="mr-12px" />
|
||||
<span>确认删除对话吗?删除后,聊天记录将不可恢复。</span>
|
||||
</div>
|
||||
<template #footer>
|
||||
<a-button size="large" @click="onClose">取消</a-button>
|
||||
<a-button type="primary" class="ml-16px !bg-#f64b31 !border-none" status="danger" size="large" @click="onDelete"
|
||||
>确定</a-button
|
||||
>
|
||||
<Button @click="onClose">取消</Button>
|
||||
<Button type="primary" danger @click="onDelete">确定</Button>
|
||||
</template>
|
||||
</a-modal>
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { Modal, Button, message } from 'ant-design-vue';
|
||||
import { deleteHistoryItem } from '@/api/all/chat';
|
||||
import icon1 from '@/assets/img/media-account/icon-warn-1.png';
|
||||
|
||||
@ -41,7 +40,7 @@ const open = (record) => {
|
||||
async function onDelete() {
|
||||
const { code } = await deleteHistoryItem(conversationId.value);
|
||||
if (code === 200) {
|
||||
AMessage.success('删除成功');
|
||||
message.success('删除成功');
|
||||
emits('delete', conversationId.value);
|
||||
onClose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user