<template>
    <div class="account_newFollow">
		<div class="account_generalMessage_title modal_title_text">
			<span>新增粉丝</span>
			<div class="account_generalMessage_title_setting" @click="allRead">全部已读</div>
		</div>
		<div class="account_generalMessage_center modal_title_text">
			<div class="account_generalMessage_item" v-for="item in dataList" :key="item.id" @click="setRead(item)">
				<a-badge :dot="item.isRead == 0"></a-badge>
				<div class="account_generalMessage_item_right">
					<div class="account_generalMessage_item_right_img">
						<img src="https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png" alt="">
					</div>
					<div class="account_generalMessage_item_right_title">
						<div class="">{{ item.senderUserName }}</div>
						<div class="modal_title_text_intro">{{ item.createTime }} 关注了你</div>
					</div>
				</div>
				<div class="account_generalMessage_item_left">
					<div>回关</div>
				</div>
			</div>
		</div>
    </div>
</template>
<script lang="ts">
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
    components:{
    },
	emits:['setReadStatus','setAllmessage'],
    setup(prop,{emit}) {
		const router = useRouter()
        const store = useStore();
		let accountMessage = reactive({
			activeKey: ref('1'),
			dataList:ref([
				
			])
		})
		let setmessageList = (data:any)=>{
			accountMessage.dataList = data.content
		}
		let setRead = (item:any)=>{
			emit('setReadStatus',item)
			item.isRead = 1
		}
		let allRead = ()=>{
			emit('setAllmessage')
		}
		onMounted (()=>{
		})
        return{
           ...toRefs(accountMessage),
		   setmessageList,
		   setRead,
		   allRead
        }
    },
    data(){
        return{
            
        }
    },
})
</script>
<style lang="less" scoped>
.account_newFollow{
	width: 100%;
	.account_generalMessage_center{
		.account_generalMessage_item{
			.account_generalMessage_item_right{
				display: flex;
				align-items: center;
				.account_generalMessage_item_right_img{
					width: 8rem;
					height: 8rem;
					margin-right: 2rem;
					cursor: pointer;
					img{
						width: 100%;
						height: 100%;
						border-radius: 50%;
					}
				}
			}
			.account_generalMessage_item_left{
				div{
					padding: .5rem 2rem;
					border-radius: 4rem;
					border: 2px solid #e9eaec;
					cursor: pointer;
				}
			}
		}
		.account_generalMessage_item:last-child{
			margin-bottom: 0;
			border-bottom: none;
		}
	}
}
</style>
