feat: 优化视频插件

This commit is contained in:
539943419 committed 2024-09-26 20:38:57 +08:00
1 parent 8d738ef3f9
commit 5173b28ec5
6 files changed
+122 -28

No files matched your search

@@ -0,0 +1,40 @@
<template>
<Teleport :to="player.root">
<App v-bind="pick(toRaw(props), ['player', 'root'])"></App>
</Teleport>
</template>
<script setup lang="ts">
import { onMounted, Component, toRaw } from "vue";
import Player from "xgplayer/es/player";
import { pick } from "lodash";
const props = defineProps({
player: {
type: Player,
required: true
},
root: {
type: Element,
required: true
},
App: {
type: Object as () => Component,
required: true
}
})
onMounted(() => {
console.log(props)
})
</script>
<style lang="scss" scoped>
.test {
width: 50px;
height: 50px;
background-color: aliceblue;
position: absolute;
right: 0;
}
</style>