修改
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
<template>
|
||||
<div class="sent-container">
|
||||
<!-- 深空背景 -->
|
||||
<div class="space-background">
|
||||
<div class="stars" ref="stars"></div>
|
||||
</div>
|
||||
|
||||
<!-- 顶部导航 -->
|
||||
<div class="header glass-card">
|
||||
<van-icon name="arrow-left" size="24" @click="goBack" />
|
||||
@@ -138,7 +133,6 @@ export default {
|
||||
setup() {
|
||||
const router = useRouter()
|
||||
const active = ref(2)
|
||||
const stars = ref(null)
|
||||
const sortType = ref('sendDate')
|
||||
const showSort = ref(false)
|
||||
const showPreview = ref(false)
|
||||
@@ -176,37 +170,6 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
// 生成星空背景
|
||||
const generateStars = () => {
|
||||
if (!stars.value) return
|
||||
|
||||
const starsContainer = stars.value
|
||||
const starCount = 100
|
||||
|
||||
for (let i = 0; i < starCount; i++) {
|
||||
const star = document.createElement('div')
|
||||
star.className = 'star'
|
||||
|
||||
// 随机位置
|
||||
const left = Math.random() * 100
|
||||
const top = Math.random() * 100
|
||||
|
||||
// 随机大小
|
||||
const size = Math.random() * 3 + 1
|
||||
|
||||
// 随机动画延迟
|
||||
const delay = Math.random() * 4
|
||||
|
||||
star.style.left = `${left}%`
|
||||
star.style.top = `${top}%`
|
||||
star.style.width = `${size}px`
|
||||
star.style.height = `${size}px`
|
||||
star.style.animationDelay = `${delay}s`
|
||||
|
||||
starsContainer.appendChild(star)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取已发送邮件列表
|
||||
const fetchMails = async (reset = false) => {
|
||||
if (loading.value || finished.value) return
|
||||
@@ -378,13 +341,11 @@ export default {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
generateStars()
|
||||
fetchMails(true)
|
||||
})
|
||||
|
||||
return {
|
||||
active,
|
||||
stars,
|
||||
sortType,
|
||||
showSort,
|
||||
showPreview,
|
||||
|
||||
Reference in New Issue
Block a user