feat:RecordView 移除无用的 computed 和方法
This commit is contained in:
@@ -84,16 +84,6 @@ const filters = computed(() => [...baseFilters, ...customFilters.value])
|
|||||||
|
|
||||||
const profile = computed(() => store.userProfile || store.registrationData || {})
|
const profile = computed(() => store.userProfile || store.registrationData || {})
|
||||||
const events = computed(() => store.events || [])
|
const events = computed(() => store.events || [])
|
||||||
const heroTags = computed(() => {
|
|
||||||
const hobbies = profile.value.hobbies
|
|
||||||
if (Array.isArray(hobbies) && hobbies.length) return hobbies.slice(0, 4)
|
|
||||||
return []
|
|
||||||
})
|
|
||||||
|
|
||||||
const avatar = computed(() => {
|
|
||||||
const nickname = profile.value.nickname || 'User'
|
|
||||||
return `https://api.dicebear.com/7.x/avataaars/svg?seed=${encodeURIComponent(nickname)}&backgroundColor=b982ff`
|
|
||||||
})
|
|
||||||
|
|
||||||
const displayEvents = computed(() => {
|
const displayEvents = computed(() => {
|
||||||
if (activeFilter.value === 'all') return events.value
|
if (activeFilter.value === 'all') return events.value
|
||||||
@@ -162,10 +152,6 @@ const openDetail = (event) => {
|
|||||||
uni.navigateTo({ url: `/pages/life-event/detail?id=${event.id}` })
|
uni.navigateTo({ url: `/pages/life-event/detail?id=${event.id}` })
|
||||||
}
|
}
|
||||||
|
|
||||||
const editProfile = () => {
|
|
||||||
uni.navigateTo({ url: '/pages/onboarding/index?edit=1' })
|
|
||||||
}
|
|
||||||
|
|
||||||
const openSocialImport = () => {
|
const openSocialImport = () => {
|
||||||
uni.navigateTo({ url: '/pages/social-import/index' })
|
uni.navigateTo({ url: '/pages/social-import/index' })
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user