mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-22 16:59:46 +08:00
fix Teleport
This commit is contained in:
@@ -51,8 +51,8 @@ onUnmounted(() => {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
inset-block-end: 30px;
|
||||
inset-inline-end: 30px;
|
||||
inset-block-end: 2rem;
|
||||
inset-inline-end: 2rem;
|
||||
}
|
||||
|
||||
.global-action-button {
|
||||
|
||||
@@ -34,6 +34,8 @@ function getApiPath(paths: string[] | string) {
|
||||
<VPageContentTitle :title="title" />
|
||||
<PersonCardListView v-if="type === 'person'" :apipath="getApiPath(props.paths || '')" :params="route.query" />
|
||||
<MediaCardListView v-else :apipath="getApiPath(props.paths || '')" :params="route.query" />
|
||||
<VScrollToTopBtn />
|
||||
<Teleport to="body" v-if="route.path === '/browse'">
|
||||
<VScrollToTopBtn />
|
||||
</Teleport>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -19,6 +19,9 @@ const display = useDisplay()
|
||||
// PWA模式检测
|
||||
const { appMode } = usePWA()
|
||||
|
||||
// 路由
|
||||
const route = useRoute()
|
||||
|
||||
// 从用户 Store 中获取superuser信息
|
||||
const superUser = useUserStore().superUser
|
||||
|
||||
@@ -353,7 +356,7 @@ onDeactivated(() => {
|
||||
</draggable>
|
||||
|
||||
<!-- 底部操作按钮(只在非移动设备上显示) -->
|
||||
<Teleport to="body">
|
||||
<Teleport to="body" v-if="route.path === '/dashboard'">
|
||||
<VFab
|
||||
v-if="!appMode"
|
||||
icon="mdi-view-dashboard-edit"
|
||||
|
||||
@@ -16,6 +16,9 @@ const display = useDisplay()
|
||||
// 国际化
|
||||
const { t } = useI18n()
|
||||
|
||||
// 路由
|
||||
const route = useRoute()
|
||||
|
||||
const activeTab = ref('')
|
||||
|
||||
// 本地存储键值
|
||||
@@ -151,10 +154,6 @@ onBeforeMount(async () => {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
onActivated(async () => {
|
||||
await loadExtraDiscoverSources()
|
||||
sortSubscribeOrder()
|
||||
@@ -246,7 +245,9 @@ onActivated(async () => {
|
||||
</VCard>
|
||||
</VDialog>
|
||||
<!-- 快速滚动到顶部按钮 -->
|
||||
<VScrollToTopBtn />
|
||||
<Teleport to="body" v-if="route.path === '/discover'">
|
||||
<VScrollToTopBtn />
|
||||
</Teleport>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -11,6 +11,9 @@ const display = useDisplay()
|
||||
// 国际化
|
||||
const { t } = useI18n()
|
||||
|
||||
// 路由
|
||||
const route = useRoute()
|
||||
|
||||
// 当前选择的分类
|
||||
const currentCategory = ref(t('recommend.all'))
|
||||
|
||||
@@ -300,7 +303,9 @@ onActivated(async () => {
|
||||
</VDialog>
|
||||
|
||||
<!-- 快速滚动到顶部按钮 -->
|
||||
<VScrollToTopBtn />
|
||||
<Teleport to="body" v-if="route.path === '/recommend'">
|
||||
<VScrollToTopBtn />
|
||||
</Teleport>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ const progressSSE = useProgressSSE(
|
||||
`${import.meta.env.VITE_API_BASE_URL}system/progress/search`,
|
||||
handleProgressMessage,
|
||||
'resource-search-progress',
|
||||
progressActive
|
||||
progressActive,
|
||||
)
|
||||
|
||||
// 使用SSE监听加载进度
|
||||
@@ -288,7 +288,9 @@ onUnmounted(() => {
|
||||
<!-- 初始加载状态 -->
|
||||
<LoadingBanner v-else-if="!isRefreshed && !(progressEnabled || progressValue > 0)" />
|
||||
<!-- 滚动到顶部按钮 -->
|
||||
<VScrollToTopBtn />
|
||||
<Teleport to="body" v-if="route.path === '/resource'">
|
||||
<VScrollToTopBtn />
|
||||
</Teleport>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -300,7 +302,6 @@ onUnmounted(() => {
|
||||
justify-content: center;
|
||||
inset-block-start: env(safe-area-inset-top);
|
||||
inset-inline: 0;
|
||||
padding-block-start: 4rem;
|
||||
}
|
||||
|
||||
.search-progress-card {
|
||||
|
||||
@@ -1526,9 +1526,9 @@ function onDragStartPlugin(evt: any) {
|
||||
</VWindow>
|
||||
</div>
|
||||
|
||||
<div v-if="isRefreshed">
|
||||
<!-- 插件搜索图标 -->
|
||||
<Teleport to="body">
|
||||
<!-- 插件搜索图标 -->
|
||||
<Teleport to="body" v-if="route.path === '/plugins'">
|
||||
<div v-if="isRefreshed">
|
||||
<VFab
|
||||
v-if="!appMode"
|
||||
icon="mdi-magnify"
|
||||
@@ -1541,8 +1541,8 @@ function onDragStartPlugin(evt: any) {
|
||||
@click="SearchDialog = true"
|
||||
:class="{ 'mb-12': appMode }"
|
||||
/>
|
||||
</Teleport>
|
||||
</div>
|
||||
</div>
|
||||
</Teleport>
|
||||
<!-- 插件市场设置窗口 -->
|
||||
<PluginMarketSettingDialog
|
||||
v-if="MarketSettingDialog"
|
||||
|
||||
@@ -700,7 +700,7 @@ onMounted(() => {
|
||||
</VCard>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<Teleport to="body">
|
||||
<Teleport to="body" v-if="route.path === '/history'">
|
||||
<div v-if="isRefreshed && selected.length > 0">
|
||||
<VFab
|
||||
icon="mdi-trash-can-outline"
|
||||
|
||||
@@ -13,6 +13,9 @@ import { usePWA } from '@/composables/usePWA'
|
||||
// 国际化
|
||||
const { t } = useI18n()
|
||||
|
||||
// 路由
|
||||
const route = useRoute()
|
||||
|
||||
// APP
|
||||
const display = useDisplay()
|
||||
// PWA模式检测
|
||||
@@ -302,7 +305,7 @@ useDynamicButton({
|
||||
:error-description="filterOption === 'all' ? t('site.sitesWillBeShownHere') : t('common.tryChangingFilters')"
|
||||
/>
|
||||
<!-- 新增站点按钮 -->
|
||||
<Teleport to="body">
|
||||
<Teleport to="body" v-if="route.path === '/site'">
|
||||
<VFab
|
||||
v-if="isRefreshed && !appMode"
|
||||
icon="mdi-web-plus"
|
||||
|
||||
@@ -6,7 +6,6 @@ import NoDataFound from '@/components/NoDataFound.vue'
|
||||
import SubscribeCard from '@/components/cards/SubscribeCard.vue'
|
||||
import SubscribeHistoryDialog from '@/components/dialog/SubscribeHistoryDialog.vue'
|
||||
import { useUserStore } from '@/stores'
|
||||
import { useDisplay } from 'vuetify'
|
||||
import { useDynamicButton } from '@/composables/useDynamicButton'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { usePWA } from '@/composables/usePWA'
|
||||
@@ -14,8 +13,9 @@ import { usePWA } from '@/composables/usePWA'
|
||||
// 国际化
|
||||
const { t } = useI18n()
|
||||
|
||||
// APP
|
||||
const display = useDisplay()
|
||||
// 路由
|
||||
const route = useRoute()
|
||||
|
||||
// PWA模式检测
|
||||
const { appMode } = usePWA()
|
||||
|
||||
@@ -183,7 +183,7 @@ useDynamicButton({
|
||||
:error-description="keyword ? t('subscribe.noFilterData') : t('subscribe.noSubscribeData')"
|
||||
/>
|
||||
<!-- 底部操作按钮 -->
|
||||
<Teleport to="body">
|
||||
<Teleport to="body" v-if="route.path === '/subscribe'">
|
||||
<div v-if="isRefreshed">
|
||||
<VFab
|
||||
v-if="userStore.superUser && !appMode"
|
||||
|
||||
@@ -11,6 +11,9 @@ import { usePWA } from '@/composables/usePWA'
|
||||
// 国际化
|
||||
const { t } = useI18n()
|
||||
|
||||
// 路由
|
||||
const route = useRoute()
|
||||
|
||||
// PWA模式检测
|
||||
const { appMode } = usePWA()
|
||||
|
||||
@@ -95,7 +98,7 @@ useDynamicButton({
|
||||
</div>
|
||||
|
||||
<!-- 新增用户按钮 -->
|
||||
<Teleport to="body">
|
||||
<Teleport to="body" v-if="route.path === '/user'">
|
||||
<VFab
|
||||
v-if="isRefreshed && !appMode"
|
||||
icon="mdi-account-plus"
|
||||
|
||||
@@ -11,7 +11,9 @@ import { usePWA } from '@/composables/usePWA'
|
||||
// 国际化
|
||||
const { t } = useI18n()
|
||||
|
||||
// APP
|
||||
// 路由
|
||||
const route = useRoute()
|
||||
|
||||
// PWA模式检测
|
||||
const { appMode } = usePWA()
|
||||
|
||||
@@ -72,7 +74,7 @@ useDynamicButton({
|
||||
</div>
|
||||
|
||||
<!-- 新增按钮 -->
|
||||
<Teleport to="body">
|
||||
<Teleport to="body" v-if="route.path === '/workflow'">
|
||||
<VFab
|
||||
v-if="isRefreshed && !appMode"
|
||||
icon="mdi-plus"
|
||||
|
||||
Reference in New Issue
Block a user