<template>
    <div class="file-preview-container">
        <iframe style="background:#fff!important;margin:0px auto;"  width="100%" height="100%" :src="previewUrl" frameborder="0"></iframe>
    </div>
</template>
<script lang="ts" setup>
import {ref,onMounted,defineProps} from 'vue'
import { getAppEnvConfig } from '@/utils/env';
import {Base64} from 'js-base64'

const {VITE_GLOB_FILE_PREVIEW} = getAppEnvConfig();

const props = defineProps(["fileUrl"]);

const previewUrl = VITE_GLOB_FILE_PREVIEW+"/onlinePreview?url="+encodeURIComponent(Base64.encode(props.fileUrl))


onMounted(()=>{
    
})
</script>
<style lang="scss" scoped>
.file-preview-container{
    width:100%;
    height:100%;
}

::v-deep .docx-wrapper{
    background:none!important;
}

::v-deep .docx-wrapper section {
    box-shadow: none!important;
}
</style>