mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-11 18:10:49 +08:00
fix ApexCharts
This commit is contained in:
@@ -101,4 +101,4 @@
|
||||
"workbox-window": "^7.3.0"
|
||||
},
|
||||
"packageManager": "yarn@1.22.18"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,59 +132,63 @@ onBeforeMount(() => {
|
||||
<VWindow v-model="activeTab" class="mt-5 disable-tab-transition" :touch="false">
|
||||
<VWindowItem value="download">
|
||||
<transition name="fade-slide" appear>
|
||||
<VDataTable
|
||||
items-per-page="50"
|
||||
:headers="downloadHeaders"
|
||||
:items="downloadInfos"
|
||||
:items-length="totalCount"
|
||||
density="compact"
|
||||
item-value="title"
|
||||
return-object
|
||||
fixed-header
|
||||
hover
|
||||
items-per-page-text="每页条数"
|
||||
page-text="{0}-{1} 共 {2} 条"
|
||||
loading-text="加载中..."
|
||||
>
|
||||
<template #item.episode_number="{ item }">
|
||||
<div class="text-high-emphasis pt-1">{{ item.episode_number }}. {{ item.title }}</div>
|
||||
</template>
|
||||
<template #item.torrent_title="{ item }">
|
||||
<div class="text-xs" v-for="file in item.download">
|
||||
【{{ file.site_name }}】{{ file.torrent_title }}
|
||||
</div>
|
||||
</template>
|
||||
<template #item.file_path="{ item }">
|
||||
<div class="text-xs" v-for="file in item.download">{{ file.file_path }}</div>
|
||||
</template>
|
||||
<template #no-data> 没有数据 </template>
|
||||
</VDataTable>
|
||||
<div>
|
||||
<VDataTable
|
||||
items-per-page="50"
|
||||
:headers="downloadHeaders"
|
||||
:items="downloadInfos"
|
||||
:items-length="totalCount"
|
||||
density="compact"
|
||||
item-value="title"
|
||||
return-object
|
||||
fixed-header
|
||||
hover
|
||||
items-per-page-text="每页条数"
|
||||
page-text="{0}-{1} 共 {2} 条"
|
||||
loading-text="加载中..."
|
||||
>
|
||||
<template #item.episode_number="{ item }">
|
||||
<div class="text-high-emphasis pt-1">{{ item.episode_number }}. {{ item.title }}</div>
|
||||
</template>
|
||||
<template #item.torrent_title="{ item }">
|
||||
<div class="text-xs" v-for="file in item.download">
|
||||
【{{ file.site_name }}】{{ file.torrent_title }}
|
||||
</div>
|
||||
</template>
|
||||
<template #item.file_path="{ item }">
|
||||
<div class="text-xs" v-for="file in item.download">{{ file.file_path }}</div>
|
||||
</template>
|
||||
<template #no-data> 没有数据 </template>
|
||||
</VDataTable>
|
||||
</div>
|
||||
</transition>
|
||||
</VWindowItem>
|
||||
<VWindowItem value="library">
|
||||
<transition name="fade-slide" appear>
|
||||
<VDataTable
|
||||
items-per-page="50"
|
||||
:headers="libraryHeaders"
|
||||
:items="libraryInfos"
|
||||
:items-length="totalCount"
|
||||
density="compact"
|
||||
item-value="title"
|
||||
return-object
|
||||
fixed-header
|
||||
hover
|
||||
items-per-page-text="每页条数"
|
||||
page-text="{0}-{1} 共 {2} 条"
|
||||
loading-text="加载中..."
|
||||
>
|
||||
<template #item.episode_number="{ item }">
|
||||
<div class="text-high-emphasis pt-1">{{ item.episode_number }}. {{ item.title }}</div>
|
||||
</template>
|
||||
<template #item.file_path="{ item }">
|
||||
<div class="text-xs" v-for="file in item.library">{{ file.file_path }}</div>
|
||||
</template>
|
||||
<template #no-data> 没有数据 </template>
|
||||
</VDataTable>
|
||||
<div>
|
||||
<VDataTable
|
||||
items-per-page="50"
|
||||
:headers="libraryHeaders"
|
||||
:items="libraryInfos"
|
||||
:items-length="totalCount"
|
||||
density="compact"
|
||||
item-value="title"
|
||||
return-object
|
||||
fixed-header
|
||||
hover
|
||||
items-per-page-text="每页条数"
|
||||
page-text="{0}-{1} 共 {2} 条"
|
||||
loading-text="加载中..."
|
||||
>
|
||||
<template #item.episode_number="{ item }">
|
||||
<div class="text-high-emphasis pt-1">{{ item.episode_number }}. {{ item.title }}</div>
|
||||
</template>
|
||||
<template #item.file_path="{ item }">
|
||||
<div class="text-xs" v-for="file in item.library">{{ file.file_path }}</div>
|
||||
</template>
|
||||
<template #no-data> 没有数据 </template>
|
||||
</VDataTable>
|
||||
</div>
|
||||
</transition>
|
||||
</VWindowItem>
|
||||
</VWindow>
|
||||
|
||||
@@ -42,7 +42,9 @@ onMounted(async () => {
|
||||
<VWindow v-model="activeTab" class="mt-5 disable-tab-transition" :touch="false">
|
||||
<VWindowItem v-for="item in downloaders" :value="item.name">
|
||||
<transition name="fade-slide" appear>
|
||||
<DownloadingListView :name="item.name" />
|
||||
<div>
|
||||
<DownloadingListView :name="item.name" />
|
||||
</div>
|
||||
</transition>
|
||||
</VWindowItem>
|
||||
</VWindow>
|
||||
|
||||
@@ -70,7 +70,9 @@ function jumpTab(tab: string) {
|
||||
<!-- 规则 -->
|
||||
<VWindowItem value="rule">
|
||||
<transition name="fade-slide" appear>
|
||||
<AccountSettingRule />
|
||||
<div>
|
||||
<AccountSettingRule />
|
||||
</div>
|
||||
</transition>
|
||||
</VWindowItem>
|
||||
|
||||
|
||||
@@ -30,17 +30,23 @@ function jumpTab(tab: string) {
|
||||
<VWindow v-model="activeTab" class="mt-5 disable-tab-transition" :touch="false">
|
||||
<VWindowItem value="mysub">
|
||||
<transition name="fade-slide" appear>
|
||||
<SubscribeListView :type="subType" :subid="subId" />
|
||||
<div>
|
||||
<SubscribeListView :type="subType" :subid="subId" />
|
||||
</div>
|
||||
</transition>
|
||||
</VWindowItem>
|
||||
<VWindowItem value="popular">
|
||||
<transition name="fade-slide" appear>
|
||||
<SubscribePopularView :type="subType" />
|
||||
<div>
|
||||
<SubscribePopularView :type="subType" />
|
||||
</div>
|
||||
</transition>
|
||||
</VWindowItem>
|
||||
<VWindowItem value="share">
|
||||
<transition name="fade-slide" appear>
|
||||
<SubscribeShareView />
|
||||
<div>
|
||||
<SubscribeShareView />
|
||||
</div>
|
||||
</transition>
|
||||
</VWindowItem>
|
||||
</VWindow>
|
||||
|
||||
@@ -23,6 +23,8 @@ const variableTheme = controlledComputed(
|
||||
() => vuetifyTheme.current.value.variables,
|
||||
)
|
||||
|
||||
const chartKey = ref(0)
|
||||
|
||||
// 定时器
|
||||
let refreshTimer: NodeJS.Timeout | null = null
|
||||
|
||||
@@ -129,6 +131,10 @@ onUnmounted(() => {
|
||||
refreshTimer = null
|
||||
}
|
||||
})
|
||||
|
||||
onActivated(() => {
|
||||
chartKey.value += 1
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -142,7 +148,7 @@ onUnmounted(() => {
|
||||
<VCardTitle>CPU</VCardTitle>
|
||||
</VCardItem>
|
||||
<VCardText>
|
||||
<VApexChart type="line" :options="chartOptions" :series="series" :height="150" />
|
||||
<VApexChart :key="chartKey" type="line" :options="chartOptions" :series="series" :height="150" />
|
||||
<p class="text-center font-weight-medium mb-0">当前:{{ current }}%</p>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
|
||||
@@ -24,6 +24,8 @@ const variableTheme = controlledComputed(
|
||||
() => vuetifyTheme.current.value.variables,
|
||||
)
|
||||
|
||||
const chartKey = ref(0)
|
||||
|
||||
// 定时器
|
||||
let refreshTimer: NodeJS.Timeout | null = null
|
||||
|
||||
@@ -135,6 +137,10 @@ onUnmounted(() => {
|
||||
refreshTimer = null
|
||||
}
|
||||
})
|
||||
|
||||
onActivated(() => {
|
||||
chartKey.value += 1
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -148,7 +154,7 @@ onUnmounted(() => {
|
||||
<VCardTitle>内存</VCardTitle>
|
||||
</VCardItem>
|
||||
<VCardText>
|
||||
<VApexChart type="area" :options="chartOptions" :series="series" :height="150" />
|
||||
<VApexChart :key="chartKey" type="area" :options="chartOptions" :series="series" :height="150" />
|
||||
<p class="text-center font-weight-medium mb-0">当前:{{ formatBytes(usedMemory) }}</p>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
|
||||
Reference in New Issue
Block a user