<script setup lang="ts">
import { ref } from 'vue'
import { useStore  } from 'vuex'
import poster from '@/assets/img/banner/poster.jpg'
const store = useStore()
const modelType = ref(1)//图片或视频类型
const columnImage  = ref("")//图片或视频地址
const posterImg = ref(poster)//视频封面图
modelType.value = store.state.menuList[store.state.sub]?.modelType
columnImage.value =store.state.menuList[store.state.sub]?.imagePath
</script>
<template>
    <div v-if="modelType==1" style="width:100%;height:100%;background-size:cover;background-position:center center;background-repeat:no-repeat; "
    :style="{backgroundImage:`url(${columnImage})`}">
    </div>

    <video v-if="modelType ==2" webkit-playsinline="webkit-playsinline" playsinline  id="videoPlay" autoplay loop muted preload="auto" :poster="posterImg"
        style="width:100%;height:100%;object-fit:fill;" :src="columnImage">
        <source type="video/mp4">
    </video>
</template>
<style lang="scss">
.common-bradcrumb-section{
    width:100vw;
}
</style>
