123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <!-- 预览 弹窗列表 -->
- <template>
- <div class="musicPreview">
- <div class="headCon">
- <div class="headLeft">
- <div class="title">{{ musicObj.name }}</div>
- </div>
- <div class="headright">
- <img @click="emits('close')" class="closeBtn" src="../../cloudCoachElement/cloudCoachList/imgs/close.png" alt="" />
- </div>
- </div>
- <div class="content">
- <iframe v-if="props.musicObj.id" :key="props.musicObj.id" class="musicIframe" frameborder="0" :src="url"></iframe>
- </div>
- </div>
- </template>
- <script setup lang="ts">
- import { computed } from "vue"
- import { getMusicResourcesUrl } from "../index"
- const emits = defineEmits<{
- (event: "close"): void
- }>()
- const props = defineProps<{
- musicObj: Record<string, any>
- type: "MUSIC" | "INSTRUMENT" | "MUSICIAN"
- }>()
- const url = computed(() => {
- return getMusicResourcesUrl(props.type, "modal", props.musicObj.id)
- })
- </script>
- <style lang="scss" scoped>
- .musicPreview {
- width: 100%;
- height: 100%;
- .headCon {
- width: 100%;
- height: 64px;
- border-bottom: 1px solid #eaeaea;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .headLeft {
- margin-left: 30px;
- display: flex;
- align-items: center;
- .title {
- font-weight: 600;
- font-size: 18px;
- color: #131415;
- line-height: 24px;
- }
- }
- .headright {
- margin-right: 30px;
- display: flex;
- align-items: center;
- .closeBtn {
- width: 24px;
- height: 24px;
- cursor: pointer;
- &:hover {
- opacity: 0.8;
- }
- }
- }
- }
- .content {
- width: 100%;
- height: calc(100% - 64px);
- .musicIframe {
- width: 100%;
- height: 100%;
- }
- }
- }
- </style>
|