mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
fix repeat loading allpoints
This commit is contained in:
@@ -107,6 +107,12 @@ function switchAuth(token: string) {
|
||||
useAuth.setCurrentAuth(token)
|
||||
message.success('已选择账号')
|
||||
}
|
||||
let isFirstMounted = true
|
||||
function onAllPointPaneMounted() {
|
||||
if (!isFirstMounted) return
|
||||
isFirstMounted = false
|
||||
getAllPoints()
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const route = useRoute()
|
||||
@@ -175,7 +181,7 @@ onMounted(async () => {
|
||||
</NCard>
|
||||
<NDivider />
|
||||
<NTabs v-if="hash" v-model:value="hash" default-value="points" animated>
|
||||
<NTabPane name="points" tab="我的积分" display-directive="show:lazy" @vue:mounted="getAllPoints()">
|
||||
<NTabPane name="points" tab="我的积分" display-directive="show:lazy" @vue:mounted="onAllPointPaneMounted">
|
||||
<NDivider style="margin-top: 10px" />
|
||||
<NButton style="margin-bottom: 10px" @click="getAllPoints()" size="small" type="primary">刷新</NButton>
|
||||
<NDivider />
|
||||
|
||||
Reference in New Issue
Block a user