🌱 video 缺乏数据源

This commit is contained in:
BTMuli
2023-12-08 13:28:23 +08:00
parent e61f9519db
commit 9aac81cbc4
3 changed files with 44 additions and 15 deletions

View File

@@ -0,0 +1,32 @@
<template>
<div class="tp-video-box">
{{ props.data }}
</div>
</template>
<script lang="ts" setup>
import { ref } from "vue";
// todo https://zhuanlan.zhihu.com/p/450632587
interface TpVideo {
insert: {
video: string;
};
}
interface TpVideoProps {
data: TpVideo;
}
const props = defineProps<TpVideoProps>();
const videoAspectRatio = ref<number>(16 / 9);
console.log("tpVideo", props.data.insert.video);
</script>
<style lang="css" scoped>
.tp-video-box {
position: relative;
max-width: 100%;
margin: 10px auto;
aspect-ratio: v-bind(videoAspectRatio);
}
</style>