mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-18 03:17:29 +08:00
✨ feat: 优化路由持久化
This commit is contained in:
@@ -43,12 +43,14 @@ if (route.query.type) {
|
||||
watch(
|
||||
() => route.query,
|
||||
async newParams => {
|
||||
const params = {
|
||||
tag: newParams.type || '',
|
||||
limit: 30,
|
||||
before: 0
|
||||
if(newParams.type){
|
||||
const params = {
|
||||
tag: newParams.type || '',
|
||||
limit: 30,
|
||||
before: 0
|
||||
}
|
||||
loadList(newParams.type);
|
||||
}
|
||||
loadList(newParams.type);
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -33,11 +33,13 @@ const loadPage = async () => {
|
||||
|
||||
const { data: recordData } = await getUserRecord(user.userId)
|
||||
recordList.value = recordData.allData
|
||||
|
||||
|
||||
}
|
||||
loadPage()
|
||||
|
||||
watch(() => router.currentRoute.value, (to) => {
|
||||
if (to.path === "/user") {
|
||||
loadPage()
|
||||
}
|
||||
})
|
||||
|
||||
const isShowList = ref(false)
|
||||
const list = ref<Playlist>()
|
||||
|
||||
Reference in New Issue
Block a user