upgrade vuetify to 3.6.8

This commit is contained in:
jxxghp
2024-05-31 11:46:27 +08:00
parent b242e757e0
commit 23ac80886d
10 changed files with 25 additions and 42 deletions

View File

@@ -16,7 +16,7 @@ const variableTheme = controlledComputed(
)
// 定时器
let refreshTimer: NodeJS.Timer | null = null
let refreshTimer: NodeJS.Timeout | null = null
// 时间序列
const series = ref([

View File

@@ -17,7 +17,7 @@ const variableTheme = controlledComputed(
)
// 定时器
let refreshTimer: NodeJS.Timer | null = null
let refreshTimer: NodeJS.Timeout | null = null
// 时间序列
const series = ref([

View File

@@ -10,7 +10,7 @@ const headers = ['进程ID', '进程名称', '运行时间', '内存占用']
const processList = ref<Process[]>([])
// 定时器
let refreshTimer: NodeJS.Timer | null = null
let refreshTimer: NodeJS.Timeout | null = null
// 调用API加载数据
async function loadProcessList() {

View File

@@ -6,7 +6,7 @@ import type { ScheduleInfo } from '@/api/types'
const schedulerList = ref<ScheduleInfo[]>([])
// 定时器
let refreshTimer: NodeJS.Timer | null = null
let refreshTimer: NodeJS.Timeout | null = null
// 调用API加载定时服务列表
async function loadSchedulerList() {

View File

@@ -4,7 +4,7 @@ import api from '@/api'
import type { DownloaderInfo } from '@/api/types'
// 定时器
let refreshTimer: NodeJS.Timer | null = null
let refreshTimer: NodeJS.Timeout | null = null
// 下载器信息
const downloadInfo = ref<DownloaderInfo>({

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import PullRefresh from 'pull-refresh-vue3'
import { VPullToRefresh } from 'vuetify/labs/VPullToRefresh'
import api from '@/api'
import type { DownloadingInfo } from '@/api/types'
import NoDataFound from '@/components/NoDataFound.vue'
@@ -7,7 +7,7 @@ import DownloadingCard from '@/components/cards/DownloadingCard.vue'
import store from '@/store'
// 定时器
let refreshTimer: NodeJS.Timer | null = null
let refreshTimer: NodeJS.Timeout | null = null
// 数据列表
const dataList = ref<DownloadingInfo[]>([])
@@ -20,8 +20,7 @@ async function fetchData() {
try {
dataList.value = await api.get('download/')
isRefreshed.value = true
}
catch (error) {
} catch (error) {
console.error(error)
}
}
@@ -41,10 +40,8 @@ const filteredDataList = computed(() => {
// 从Vuex Store中获取用户信息
const superUser = store.state.auth.superUser
const userName = store.state.auth.userName
if (superUser)
return dataList.value
else
return dataList.value.filter(data => data.userid === userName || data.username === userName)
if (superUser) return dataList.value
else return dataList.value.filter(data => data.userid === userName || data.username === userName)
})
// 加载时获取数据
@@ -67,23 +64,10 @@ onUnmounted(() => {
</script>
<template>
<LoadingBanner
v-if="!isRefreshed"
class="mt-12"
/>
<PullRefresh
v-model="loading"
@refresh="onRefresh"
>
<div
v-if="filteredDataList.length > 0"
class="grid gap-3 grid-downloading-card"
>
<DownloadingCard
v-for="data in filteredDataList"
:key="data.hash"
:info="data"
/>
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
<VPullToRefresh v-model="loading" @load="onRefresh" :pull-down-threshold="64">
<div v-if="filteredDataList.length > 0" class="grid gap-3 grid-downloading-card">
<DownloadingCard v-for="data in filteredDataList" :key="data.hash" :info="data" />
</div>
<NoDataFound
v-if="filteredDataList.length === 0 && isRefreshed"
@@ -91,5 +75,5 @@ onUnmounted(() => {
error-title="没有任务"
error-description="正在下载的任务将会显示在这里"
/>
</PullRefresh>
</VPullToRefresh>
</template>

View File

@@ -10,7 +10,7 @@ const $toast = useToast()
const schedulerList = ref<ScheduleInfo[]>([])
// 定时器
let refreshTimer: NodeJS.Timer | null = null
let refreshTimer: NodeJS.Timeout | null = null
// 调用API加载定时服务列表
async function loadSchedulerList() {

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import PullRefresh from 'pull-refresh-vue3'
import { VPullToRefresh } from 'vuetify/labs/VPullToRefresh'
import api from '@/api'
import type { Subscribe } from '@/api/types'
import NoDataFound from '@/components/NoDataFound.vue'
@@ -60,7 +60,7 @@ const filteredDataList = computed(() => {
<template>
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
<PullRefresh v-model="loading" @refresh="onRefresh">
<VPullToRefresh v-model="loading" @load="onRefresh">
<div v-if="filteredDataList.length > 0" class="mx-3 grid gap-4 grid-subscribe-card p-1">
<SubscribeCard
v-for="data in filteredDataList"
@@ -76,7 +76,7 @@ const filteredDataList = computed(() => {
error-title="没有订阅"
error-description="请通过搜索添加电影电视剧订阅"
/>
</PullRefresh>
</VPullToRefresh>
<!-- 底部操作按钮 -->
<VFab
v-if="store.state.auth.superUser"