feat:进度条公共组件

This commit is contained in:
jxxghp
2024-04-25 15:07:35 +08:00
parent cdbcef5232
commit 5895cea587
10 changed files with 139 additions and 309 deletions

View File

@@ -0,0 +1,17 @@
<script setup lang="ts">
const props = defineProps({
value: Number,
text: String,
})
</script>
<template>
<!-- 手动整理进度框 -->
<VDialog :scrim="false" width="25rem">
<VCard color="primary">
<VCardText class="text-center">
{{ props.text }}
<VProgressLinear color="white" class="mb-0 mt-1" :model-value="props.value" indeterminate />
</VCardText>
</VCard>
</VDialog>
</template>

View File

@@ -5,6 +5,7 @@ import store from '@/store'
import api from '@/api'
import { numberValidator } from '@/@validators'
import { useDisplay } from 'vuetify'
import ProgressDialog from './ProgressDialog.vue'
// 显示器宽度
const display = useDisplay()
@@ -262,14 +263,7 @@ async function transfer() {
</VCardActions>
</VCard>
<!-- 手动整理进度框 -->
<VDialog v-model="progressDialog" :scrim="false" width="25rem">
<VCard color="primary">
<VCardText class="text-center">
{{ progressText }}
<VProgressLinear v-if="progressValue" color="white" class="mb-0 mt-1" :model-value="progressValue" />
</VCardText>
</VCard>
</VDialog>
<ProgressDialog v-if="progressDialog" v-model="progressDialog" :text="progressText" :value="progressValue" />
<!-- TMDB ID搜索框 -->
<VDialog v-model="tmdbSelectorDialog" width="40rem" scrollable max-height="85vh">
<TmdbSelector v-model="transferForm.tmdbid" @close="tmdbSelectorDialog = false" />

View File

@@ -3,6 +3,7 @@ import api from '@/api'
import { Subscribe } from '@/api/types'
import { formatDateDifference } from '@core/utils/formatters'
import { useDisplay } from 'vuetify'
import ProgressDialog from './ProgressDialog.vue'
// 显示器宽度
const display = useDisplay()
@@ -204,13 +205,6 @@ const dropdownItems = ref([
</VList>
</VCard>
<!-- 进度框 -->
<VDialog v-model="progressDialog" :scrim="false" width="25rem">
<VCard color="primary">
<VCardText class="text-center">
{{ progressText }}
<VProgressLinear indeterminate color="white" class="mb-0 mt-1" />
</VCardText>
</VCard>
</VDialog>
<ProgressDialog v-if="progressDialog" v-model="progressDialog" :text="progressText" />
</VDialog>
</template>