import { defineComponent, reactive, ref } from "vue"; import styles from "./index.module.less"; import { Icon } from "vant"; export default defineComponent({ name: "the-video", props:{ src: { type: String, default: '' } }, setup(props) { const videoRef = ref() const videoData = reactive({ play: false, }); const toggle = () => { videoData.play = !videoData.play if (videoData.play) { videoRef.value?.play() } else { videoRef.value?.pause() } } return () => (
{/*
{videoData.play ? : }
*/}
); }, });