File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/renderer/components/common Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 17
17
>
18
18
<n-drawer-content :title =" t('download.title')" closable :native-scrollbar =" false" >
19
19
<div class =" drawer-container" >
20
- <n-tabs type =" line" animated class =" h-full" >
20
+ <n-tabs type =" line" animated class =" h-full" v-model:value = " tabName " >
21
21
<!-- 下载列表 -->
22
22
<n-tab-pane name =" downloading" :tab =" t('download.tabs.downloading')" class =" h-full" >
23
23
<div class =" download-list" >
@@ -249,7 +249,7 @@ interface DownloadedItem {
249
249
picUrl: string ;
250
250
ar: { name: string }[];
251
251
}
252
-
252
+ const tabName = ref ( ' downloading ' );
253
253
const message = useMessage ();
254
254
// const playerStore = usePlayerStore();
255
255
const settingsStore = useSettingsStore ();
@@ -540,6 +540,16 @@ onMounted(() => {
540
540
const handleDrawerClose = () => {
541
541
settingsStore .showDownloadDrawer = false ;
542
542
};
543
+
544
+
545
+ watch (
546
+ () => tabName .value ,
547
+ (newVal ) => {
548
+ if (newVal ) {
549
+ refreshDownloadedList ();
550
+ }
551
+ }
552
+ );
543
553
</script >
544
554
545
555
<style lang="scss" scoped>
You can’t perform that action at this time.
0 commit comments