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