admin-vue3/src/views/ai/chat/index/components/message/MessageFollowUps.vue

45 lines
900 B
Vue

<template>
<div v-if="followUps && followUps.length > 0" class="w-[100%]">
{{item}}
<div
class="follow"
@click="followClick(follow)"
v-for="(follow,index) in followUps"
:key="index"
>
{{follow}}
</div>
</div>
</template>
<script setup lang="ts">
import {ChatMessageVO} from "@/api/ai/chat/message";
import {cloneDeep} from "lodash-es";
const emits = defineEmits([ 'onRefresh']) // 定义 emits
defineOptions({ name: 'MessageFollowUps' })
defineProps<{
followUps?: string[]
}>()
/** 刷新 */
const followClick = async (follow:string) => {
emits('onRefresh', {content:follow})
}
</script>
<style scoped lang="scss">
.follow{
border: 1px solid #dcdfe6;
padding: 10px;
margin-bottom: 5px;
width: 100%;
color:#606266;
border-radius: 5px;
}
.follow:hover{
background-color: #dcdcdc;
cursor: pointer;
}
</style>