2023-09-06 11:28:22 +08:00
|
|
|
<template>
|
2023-10-16 16:14:37 +08:00
|
|
|
<div class="leftTop" v-if="projectData">
|
2023-09-07 11:27:21 +08:00
|
|
|
<Card title="宣传视频">
|
|
|
|
|
<div class="videoBox">
|
2023-10-16 16:14:37 +08:00
|
|
|
<video :src="BASEURL + '/image/' + projectData.videoUrl" class="videos" autoplay controls loop></video>
|
2023-09-07 11:27:21 +08:00
|
|
|
</div>
|
|
|
|
|
</Card>
|
|
|
|
|
</div>
|
2023-09-06 11:28:22 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2023-09-07 11:27:21 +08:00
|
|
|
import Card from "@/components/card.vue";
|
2023-10-16 16:14:37 +08:00
|
|
|
import { ref, onMounted, watch } from "vue";
|
|
|
|
|
// ts
|
|
|
|
|
type Props = {
|
|
|
|
|
projectData?: any; // 传入项目信息
|
|
|
|
|
};
|
|
|
|
|
// withDefaults 定义默认值(传入的数据类型同默认值)
|
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
|
|
|
projectData: null
|
|
|
|
|
});
|
|
|
|
|
// 项目信息
|
|
|
|
|
const projectData = ref(null as any);
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => props.projectData,
|
|
|
|
|
newVal => {
|
|
|
|
|
// console.log(newVal, "newVal");
|
|
|
|
|
if (newVal) {
|
|
|
|
|
// props.xData = newVal;
|
|
|
|
|
projectData.value = newVal;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
const BASEURL = import.meta.env.VITE_API_URL;
|
2023-09-06 11:28:22 +08:00
|
|
|
</script>
|
|
|
|
|
|
2023-09-07 11:27:21 +08:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.leftTop {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
.videoBox {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: url("@/assets/images/comprehensiveManage/project10.png") no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
.videos {
|
|
|
|
|
width: 78%;
|
|
|
|
|
height: 92%;
|
|
|
|
|
margin: 3% 11%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
::v-deep .h-card .content {
|
|
|
|
|
background: none;
|
|
|
|
|
}
|
2023-10-16 16:14:37 +08:00
|
|
|
</style>
|