feat: 伴游的调整
This commit is contained in:
83
src/pages/ChatMain/ChatGuide/index.vue
Normal file
83
src/pages/ChatMain/ChatGuide/index.vue
Normal file
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<view class="empty-container">
|
||||
<!-- 图片变量 -->
|
||||
<image v-if="!hasMessage" :src="imageSrc" mode="aspectFit" class="main-image"></image>
|
||||
|
||||
<!-- 主标题变量 -->
|
||||
<view v-if="!hasMessage" class="title">{{ mainTitle }}</view>
|
||||
|
||||
<!-- 副标题变量 -->
|
||||
<view v-if="!hasMessage" class="sub-title-wrapper">
|
||||
<text class="dot"></text>
|
||||
<text class="sub-title">{{ subTitle }}</text>
|
||||
<text class="dot"></text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
const props = defineProps({
|
||||
hasMessage: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 图片路径
|
||||
imageSrc: {
|
||||
type: String,
|
||||
default: '/static/come_chat_image.png'
|
||||
},
|
||||
// 主标题
|
||||
mainTitle: {
|
||||
type: String,
|
||||
default: '和我聊聊天吧!'
|
||||
},
|
||||
// 副标题
|
||||
subTitle: {
|
||||
type: String,
|
||||
default: '这里什么都没有哦'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.empty-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 90px 0;
|
||||
|
||||
.main-image {
|
||||
width: 160px;
|
||||
height: 180px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #2c3e50;
|
||||
margin-bottom: 4px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sub-title-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.sub-title {
|
||||
font-size: 12px;
|
||||
color: #afb9c1;
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #42b983;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user