update vuetify => 3.5.7

This commit is contained in:
jxxghp
2024-04-02 11:37:25 +08:00
parent 1488017bf2
commit fd1ee398c4
9 changed files with 145 additions and 125 deletions

View File

@@ -1,5 +1,4 @@
<script lang="ts" setup>
import { useDefer } from '@/@core/utils/dom'
import api from '@/api'
import type { Plugin } from '@/api/types'
import NoDataFound from '@/components/NoDataFound.vue'
@@ -24,9 +23,6 @@ const PluginAppDialog = ref(false)
// 插件安装统计
const PluginStatistics = ref<{ [key: string]: number }>({})
// 延迟加载
let defer = (_: number) => true
// 关闭插件市场窗口
function pluginDialogClose() {
PluginAppDialog.value = false
@@ -98,7 +94,6 @@ function refreshData() {
// 对uninstalledList进行排序按PluginStatistics倒序
const sortedUninstalledList = computed(() => {
const list = uninstalledList.value.filter(item => !item.has_update)
defer = useDefer(list.length)
if (PluginStatistics.value.length === 0)
return list
return list.sort((a, b) => {
@@ -155,11 +150,14 @@ onBeforeMount(() => {
>
<!-- Dialog Activator -->
<template #activator="{ props }">
<VBtn
icon="mdi-store-plus"
<VFab
v-bind="props"
icon="mdi-store-plus"
location="bottom end"
size="x-large"
class="fixed right-5 bottom-5"
fixed
app
appear
/>
</template>
@@ -198,18 +196,13 @@ onBeforeMount(() => {
/>
</div>
<div v-if="isAppMarketLoaded" class="grid gap-4 grid-plugin-card">
<div
v-for="(data, index) in sortedUninstalledList"
:key="index"
>
<PluginAppCard
v-if="defer(index)"
:key="`${data.id}_v${data.plugin_version}`"
:plugin="data"
:count="PluginStatistics[data.id || '0']"
@install="pluginInstalled"
/>
</div>
<PluginAppCard
v-for="data in sortedUninstalledList"
:key="`${data.id}_v${data.plugin_version}`"
:plugin="data"
:count="PluginStatistics[data.id || '0']"
@install="pluginInstalled"
/>
</div>
<NoDataFound
v-if="uninstalledList.length === 0 && isAppMarketLoaded"

View File

@@ -307,6 +307,30 @@ const dropdownItems = ref([
</script>
<template>
<!-- 底部操作按钮 -->
<VFab
v-if="selected.length > 0"
icon="mdi-trash-can-outline"
color="error"
location="bottom end"
size="x-large"
fixed
app
appear
@click="removeHistoryBatch"
/>
<VFab
v-if="selected.length > 0"
class="mb-2"
icon="mdi-redo-variant"
location="bottom end"
size="x-large"
fixed
app
appear
@click="retransferBatch"
/>
<VCard class="pb-5">
<VCardItem>
<VCardTitle>
@@ -354,29 +378,29 @@ const dropdownItems = ref([
<template #item.title="{ item }">
<div class="d-flex align-center">
<VAvatar>
<VIcon :icon="getIcon(item.value.type || '')" />
<VIcon :icon="getIcon(item.type || '')" />
</VAvatar>
<div class="d-flex flex-column ms-1">
<span class="d-block text-high-emphasis">
{{ item.value.title }} {{ item.value.seasons }}{{ item.value.episodes }}
{{ item?.title }} {{ item?.seasons }}{{ item?.episodes }}
</span>
<small>{{ item.value.category }}</small>
<small>{{ item?.category }}</small>
</div>
</div>
</template>
<template #item.src="{ item }">
<small>{{ item.value.src }} <br>=> {{ item.value.dest }}</small>
<small>{{ item?.src }} <br>=> {{ item?.dest }}</small>
</template>
<template #item.mode="{ item }">
<VChip variant="outlined" color="primary" size="small">
{{ TransferDict[item.value.mode] }}
{{ TransferDict[item?.mode || ''] }}
</VChip>
</template>
<template #item.status="{ item }">
<VChip v-if="item.value.status" color="success" size="small">
<VChip v-if="item?.status" color="success" size="small">
成功
</VChip>
<v-tooltip v-else :text="item.value.errmsg">
<v-tooltip v-else :text="item?.errmsg">
<template #activator="{ props }">
<VChip v-bind="props" color="error" size="small">
失败
@@ -385,7 +409,7 @@ const dropdownItems = ref([
</v-tooltip>
</template>
<template #item.date="{ item }">
<small>{{ item.value.date }}</small>
<small>{{ item?.date }}</small>
</template>
<template #item.actions="{ item }">
<IconBtn>
@@ -397,7 +421,7 @@ const dropdownItems = ref([
:key="i"
variant="plain"
:base-color="menu.props.color"
@click="menu.props.click(item.value)"
@click="menu.props.click(item)"
>
<template #prepend>
<VIcon :icon="menu.props.prependIcon" />
@@ -413,19 +437,6 @@ const dropdownItems = ref([
</template>
</VDataTableServer>
</VCard>
<!-- 底部操作按钮 -->
<span v-if="selected.length > 0" class="fixed right-5 bottom-5">
<VTooltip text="批量重新整理">
<template #activator="{ props }">
<VBtn v-bind="props" icon="mdi-redo-variant" class="me-2" color="primary" size="x-large" @click="retransferBatch" />
</template>
</VTooltip>
<VTooltip text="批量删除">
<template #activator="{ props }">
<VBtn v-bind="props" icon="mdi-trash-can-outline" color="error" size="x-large" @click="removeHistoryBatch" />
</template>
</VTooltip>
</span>
<!-- 底部弹窗 -->
<VBottomSheet v-model="deleteConfirmDialog" inset>
<VCard class="text-center rounded-t">

View File

@@ -70,13 +70,16 @@ onBeforeMount(fetchData)
error-description="已添加并支持的站点将会在这里显示"
/>
<!-- 新增站点按钮 -->
<VBtn
<VFab
icon="mdi-plus"
location="bottom end"
size="x-large"
class="fixed right-5 bottom-5"
oper="add"
fixed
app
appear
@click="siteAddDialog = true"
/>
<!-- 新增站点弹窗 -->
<SiteAddEditForm
v-if="siteAddDialog"
v-model="siteAddDialog"

View File

@@ -93,12 +93,15 @@ const filteredDataList = computed(() => {
/>
</PullRefresh>
<!-- 底部操作按钮 -->
<span class="fixed right-5 bottom-5">
<VTooltip text="设置默认订阅规则">
<template #activator="{ props }">
<VBtn v-bind="props" icon="mdi-file-document-edit" class="me-2" color="primary" size="x-large" @click="subscribeEditDialog = true" />
</template>
</vtooltip></span>
<VFab
icon="mdi-file-document-edit"
location="bottom end"
size="x-large"
fixed
app
appear
@click="subscribeEditDialog = true"
/>
<!-- 订阅编辑弹窗 -->
<SubscribeEditForm
v-model="subscribeEditDialog"