flat: 消息
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
<!-- 顶部头部区域 -->
|
||||
<view class="container-header">
|
||||
<view class="header-btnLf button-click" @click="changeType(0)" :class="{ active: state.current === 0 }">
|
||||
已读消息
|
||||
<view class="btns-wd"></view>
|
||||
全部消息
|
||||
<!-- <view class="btns-wd"></view> -->
|
||||
</view>
|
||||
<view class="header-btnLf button-click" @click="changeType(1)" :class="{ active: state.current === 1 }">
|
||||
未读消息
|
||||
<view class="btns-wd"></view>
|
||||
<view class="btns-wd" v-if="unreadCount"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -39,7 +39,14 @@ import UnreadComponent from './unread.vue';
|
||||
const loadedMap = reactive([false, false]);
|
||||
const swiperRefs = [ref(null), ref(null)];
|
||||
const components = [ReadComponent, UnreadComponent];
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useReadMsg } from '@/stores/useReadMsg';
|
||||
const { unreadCount } = storeToRefs(useReadMsg());
|
||||
|
||||
onShow(() => {
|
||||
// 获取消息列表
|
||||
useReadMsg().fetchMessages();
|
||||
});
|
||||
const state = reactive({
|
||||
current: 0,
|
||||
all: [{}],
|
||||
|
Reference in New Issue
Block a user