<template>
    <div class="audio-box">
        <div class="del-btn" @click="delAudio()">
            <ui-icon type="del"></ui-icon>
        </div>
        <div v-for="(i, index) in audioInfo" class="audio-msg">
            <ui-icon type="music"></ui-icon>
            <span>{{ i.name }}</span>
        </div>
    </div>
</template>

<script setup>
import { reactive, toRefs, onBeforeMount, onMounted, ref, computed } from 'vue'
import { useStore } from 'vuex'
import { Cropper, Loading, Dialog } from '@/global_components/'
import { custom } from '../constant.js'
import common from '@/utils/common'
const store = useStore()
const audioNum = ref(0)
const type = ref('audio')
const hotData = computed(() => store.getters['tag/hotData'])
const audioInfo = computed(() => {
    return hotData.value.media.audio
})
const delAudio = () => {
    store.commit('tag/delMetas', { type: type.value, index: audioNum.value })
}
</script>
<style lang="scss" scoped>
.del-btn {
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    position: absolute;
    cursor: pointer;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.audio-box {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    top: 0;
    left: 0;
    z-index: 10;
    .audio-msg {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        .iconfont {
            margin-right: 6px;
        }
    }
}
</style>
