mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
refactor: improve components load method, and improve provide app
This commit is contained in:
@@ -259,11 +259,14 @@ function openVideoPageIfBvidExists() {
|
||||
window.open(`https://www.bilibili.com/video/${bvid}`, '_self')
|
||||
}
|
||||
|
||||
provide('handleBackToTop', handleBackToTop)
|
||||
provide('handleRefresh', handleRefresh)
|
||||
provide('activatedPage', activatedPage)
|
||||
provide('scrollbarRef', scrollbarRef)
|
||||
provide('mainAppRef', mainAppRef)
|
||||
provide<BewlyAppProvider>('BEWLY_APP', {
|
||||
activatedPage,
|
||||
mainAppRef,
|
||||
scrollbarRef,
|
||||
handleBackToTop,
|
||||
handlePageRefresh,
|
||||
handleReachBottom,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useDateFormat } from '@vueuse/core'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
// import type { HistoryItem } from './types'
|
||||
import type { Ref } from 'vue'
|
||||
import { getCSRF, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main'
|
||||
import { calcCurrentTime } from '~/utils/dataFormatter'
|
||||
import { Business } from '~/models/video/history'
|
||||
|
||||
Reference in New Issue
Block a user