mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
20 lines
464 B
TypeScript
20 lines
464 B
TypeScript
import { mountVueComponent } from '@/core/utils'
|
|
|
|
let panelVm: Vue & {
|
|
toggleDisplay: () => void
|
|
}
|
|
|
|
export const getPanelLoadState = async () => {
|
|
return Boolean(panelVm)
|
|
}
|
|
|
|
export const mountPanel = async () => {
|
|
const panel = await import('./Panel1.vue').then(m => m.default)
|
|
panelVm = mountVueComponent(panel)
|
|
document.body.insertAdjacentElement('beforeend', panelVm.$el)
|
|
}
|
|
|
|
export const togglePanelDisplay = async () => {
|
|
panelVm.toggleDisplay()
|
|
}
|