<template>
    <vue-office-pptx
		v-loading="loading"
        :src="src"
        style="width: 100%;height: 100%" 
    />
</template>

<script>
//引入VueOfficePdf组件
import VueOfficePptx from '@vue-office/pptx'

export default {
	props:{
		src:{
			typeof:String,
			default:""
		}
	},
	name:"vuePptx",
    components: {
        VueOfficePptx
    },
    data() {
        return {
            loading:false
        }
    },
    methods: {
        renderedHandler() {
            console.log("渲染完成")
			this.loading = false
        },
        errorHandler() {
            console.log("渲染失败")
			this.$message({
				type:"error",
				message:"加载失败"
			})
        }
    }
}
</script>
<style scoped lang="scss">
	::v-deep .vue-office-pptx-main{
		height: 100% !important;
	}
	::v-deep .pptx-preview-wrapper{
		height: 100% !important;
	}
</style>