<script setup lang="ts">

import { ref } from 'vue';



const props = defineProps<{
    file: string,
}>()

const files = ref(props.file.split(";").map(str => {
    const [part, name] = str.split("|")
    return {
        url: window.GLOBAL_CONFIG.oss + part,
        name: name ?? part
    }
}))

</script>

<template>
    <div class="flex flex-col">
        <div v-for="({ name, url }) in files" class="w-full">
            <el-link type="primary" :href="url">{{ name }}</el-link>
        </div>
    </div>
</template>

