feat:增加跳转内容

This commit is contained in:
huangzhe
2025-08-06 21:22:54 +08:00
parent 389769a444
commit b910b85905
4 changed files with 102 additions and 5 deletions

View File

@@ -0,0 +1,89 @@
<script>
export default {
name: 'chat-entry',
props: {
ignoreList: {
type: Array,
default: () => []
},
_list: {
type: Array,
default: () => ([
{
id: '1',
name: 'productAssistant',
title: '产品助手',
desc: "通用产品助手"
}, {
id: '2',
name: 'productRecommend',
title: '产品推荐',
desc: "根据实际情况推荐产品"
}, {
id: '3',
name: 'productKnowledge',
title: '产品知识助手',
desc: "全面理解产品知识"
}
])
}
},
data() {
return {
}
},
computed: {
list() {
// console.log(this._list);
// return this._list
return this._list.filter(item => !this.ignoreList.includes(item.id))
}
},
methods: {
handleClick(item) {
this.$router.push({
name: item.name
})
}
}
}
</script>
<template>
<div class="chat-entry-container">
<div v-for="item in list" :key="item.id" @click="handleClick(item)">
<div>{{ item.title }}</div>
<div>{{ item.desc }}</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.chat-entry-container {
position: absolute;
bottom: 120px;
left: 20px;
background-color: transparent;
display: flex;
gap: 10px;
&>div {
background-color: white;
padding: 10px 15px;
border-radius: 10px;
& :nth-child(1) {
// font-size: 16px;
font-weight: bold;
}
& :nth-child(2) {
font-size: 12px;
color: #999;
}
}
}
</style>

View File

@@ -23,8 +23,9 @@
<van-icon name="upgrade" size="2em" @click="scrollToTop" />
</div> -->
</main>
<chat-entry :ignore-list="['1']" />
<chatMessage ref="chatMessage" :messages.sync="messages" :messageStatus.sync="messageStatus" :is-deep.sync="isDeep"
<chat-message ref="chatMessage" :messages.sync="messages" :messageStatus.sync="messageStatus" :is-deep.sync="isDeep"
:conversation-id.sync="conversationId" :is-searching.sync="isSearching" :product-name.sync="productName"
:autoScrollEnabled.sync="autoScrollEnabled" @getIsThink="getIsThink" action="normal_chat"
@initBotMessage="initBotMessage" />
@@ -38,6 +39,7 @@ import SvgIcon from '@/components/svg-icon/index.vue'
import HotProducts from '@/views/AI-new/components/HotProducts.vue'
import sticky from '@/views/AI/components/sticky.vue'
import chatMessage from '@/views/AI-new/components/chat-new.vue'
import ChatEntry from "./components/chat-entry.vue"
export default {
components: {
@@ -48,6 +50,7 @@ export default {
HotProducts,
chatMessage,
sticky,
ChatEntry,
},
data() {
return {
@@ -98,7 +101,7 @@ export default {
this.isThink = e
},
getHotProducts(e) {
console.log(e)
// console.log(e)
this.hotList = e
},

View File

@@ -18,7 +18,7 @@
<van-icon name="upgrade" size="2em" @click="scrollToTop" />
</div>
</main>
<ChatEntry :ignoreList="['3']" />
<chatMessage :messages.sync="messages" :messageStatus.sync="messageStatus" :is-deep.sync="isDeep"
:conversation-id.sync="conversationId" :is-searching.sync="isSearching" :product-name.sync="productName"
:autoScrollEnabled.sync="autoScrollEnabled" @getIsThink="getIsThink" action="chat"
@@ -33,6 +33,7 @@ import SvgIcon from '@/components/svg-icon/index.vue'
import HotProducts from '@/views/AI-new/components/HotProducts.vue'
import sticky from '@/views/AI/components/sticky.vue'
import chatMessage from '@/views/AI-new/components/chat-new.vue'
import ChatEntry from "../../components/chat-entry.vue"
export default {
components: {
@@ -42,7 +43,8 @@ export default {
messageComponent,
HotProducts,
chatMessage,
sticky
sticky,
ChatEntry
},
data() {
return {

View File

@@ -18,6 +18,7 @@
<van-icon name="upgrade" size="2em" @click="scrollToTop" />
</div>
</main>
<ChatEntry :ignoreList="['2']" />
<chatMessage :messages.sync="messages" :messageStatus.sync="messageStatus" :is-deep.sync="isDeep"
:conversation-id.sync="conversationId" :is-searching.sync="isSearching" :product-name.sync="productName"
@@ -34,6 +35,7 @@ import SvgIcon from '@/components/svg-icon/index.vue'
import HotProducts from '@/views/AI-new/components/HotProducts.vue'
import sticky from '@/views/AI/components/sticky.vue'
import chatMessage from '@/views/AI-new/components/chat-new.vue'
import ChatEntry from "../../components/chat-entry.vue"
export default {
components: {
@@ -43,7 +45,8 @@ export default {
messageComponent,
HotProducts,
chatMessage,
sticky
sticky,
ChatEntry
},
data() {
return {