Files
dvcp_v2_wxcp_app/src/project/biaopin/AppDialogue/AppDialogue.vue

100 lines
2.1 KiB
Vue
Raw Normal View History

2024-07-15 16:43:11 +08:00
<template>
<div class="AppDialogue">
2024-07-15 17:03:58 +08:00
<div class="footer-tab" v-if="!showDetail">
2024-07-15 16:43:11 +08:00
<div class="item" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)">
<img :src="tabIndex == index ? item.selectIcon : item.icon" alt="">
<p :class="tabIndex == index ? 'active' : ''">{{item.text}}</p>
</div>
</div>
<Talk v-if="!tabIndex && !showDetail" />
<Record v-if="tabIndex && !showDetail" @toDetail="toDetail" />
2024-07-16 14:33:33 +08:00
<!-- <Detail v-if="showDetail" :params="params" @back="back" /> -->
2024-07-15 16:43:11 +08:00
</div>
</template>
<script>
import { mapState } from "vuex";
import Talk from './Talk'
import Record from './Record'
import Detail from './Detail'
export default {
name: "AppDialogue",
appName: "Copilot小助理",
data() {
return {
tabList: [
{
icon: require('./img/talk.png'),
selectIcon: require('./img/talk_selected.png'),
text: '对话',
},
{
icon: require('./img/record.png'),
selectIcon: require('./img/record_selected.png'),
text: '记录'
}
],
tabIndex: 0,
showDetail: false
};
},
components: {Talk, Record, Detail},
computed: {
...mapState(["user"]),
},
onLoad() {
},
onShow() {
document.title = "Copilot小助理"
},
methods: {
tabClick(index) {
this.tabIndex = index
},
toDetail(e) {
this.params = e
this.showDetail = true
},
back() {
this.showDetail = false
}
},
};
</script>
<style lang="scss" scoped>
.AppDialogue {
.footer-tab {
width: 100%;
height: 100px;
padding-bottom: 68px;
background: #fff;
position: fixed;
bottom: 0;
left: 0;
z-index: 9;
display: flex;
2024-07-16 14:33:33 +08:00
border-top: 1px solid #eee;
2024-07-15 16:43:11 +08:00
.item {
flex: 1;
text-align: center;
img {
width: 48px;
height: 48px;
margin: 12px 0 8px 0;
}
p {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 20px;
2024-07-16 14:33:33 +08:00
line-height: 28px;
2024-07-15 16:43:11 +08:00
color: #8A929F;
}
.active {
color: #026AF2;
}
}
}
}
</style>