Commit ffac116b by lijiabin

【需求 17679】 fix: 修复用户页面切换的bug

parent 4e84bdcb
......@@ -106,7 +106,7 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
getSelfCollectList,
{
defaultParams: {
type: ArticleTypeEnum.POST,
type: filterArticleType.value[0]!.value,
},
},
)
......@@ -119,6 +119,11 @@ const handleView = (item: SelfCollectDetailDto) => {
}
}
onActivated(() => {
searchParams.value.type = filterArticleType.value[0]!.value
refresh()
})
defineExpose({
refresh: () => {
searchParams.value.type = filterArticleType.value[0]!.value
......
......@@ -124,7 +124,7 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
immediate: false,
defaultParams: {
messageType: CommentTypeEnum.COMMNET_TO_OTHER,
type: ArticleTypeEnum.POST,
type: filterArticleType.value[0]!.value,
},
},
)
......@@ -151,6 +151,8 @@ const handleView = (item: SelfCommentItemDto) => {
onActivated(() => {
if (route.query.type) {
searchParams.value.type = route.query.type as ArticleTypeEnum
} else {
searchParams.value.type = filterArticleType.value[0]!.value
}
if (route.query.messageType) {
searchParams.value.messageType = Number(route.query.messageType)
......
......@@ -109,11 +109,16 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
getSelfDraftList,
{
defaultParams: {
type: ArticleTypeEnum.POST,
type: filterArticleType.value[0]!.value,
},
},
)
onActivated(() => {
searchParams.value.type = filterArticleType.value[0]!.value
refresh()
})
defineExpose({
refresh: () => {
searchParams.value.type = filterArticleType.value[0]!.value
......
......@@ -104,11 +104,16 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
getSelfPraiseList,
{
defaultParams: {
type: ArticleTypeEnum.POST,
type: filterArticleType.value[0]!.value,
},
},
)
onActivated(() => {
searchParams.value.type = filterArticleType.value[0]!.value
refresh()
})
const handleView = (item: SelfPraiseDetailDto) => {
if (item.type === ArticleTypeEnum.VIDEO) {
window.open(`/videoDetail/${item.id}`)
......
......@@ -105,11 +105,16 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
getSelfPublishList,
{
defaultParams: {
type: ArticleTypeEnum.POST,
type: filterArticleType.value[0]!.value,
},
},
)
onActivated(() => {
searchParams.value.type = filterArticleType.value[0]!.value
refresh()
})
const handleView = (item: SelfPublishDetailDto) => {
if (item.type === ArticleTypeEnum.VIDEO) {
window.open(`/videoDetail/${item.id}`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment