mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-15 09:48:14 +08:00
🌱 video 缺乏数据源
This commit is contained in:
32
src/components/post/tp-video.vue
Normal file
32
src/components/post/tp-video.vue
Normal 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>
|
||||
Reference in New Issue
Block a user