<template>
    <div id="placeholder"></div>
</template>

<script>
export default {
    props: ['url', "fileType", "filename"],
    data() {
        return {
            
        };
    },
    mounted() {
        var docEditor = new DocsAPI.DocEditor("placeholder", {
            "document": {
                "fileType": this.fileType,
                "permissions": {
                    "edit": false,
                    "copy": false,
                    "download": false,
                    "print": false,
                    "chat": false
                },
                // "key": "C8D7FB890BAC496FB0D27B163EDB88BDAA",
                "title": this.filename,
                "url": this.url,
            },
            "height": "400px",
            "width": "100%",
            "editorConfig": {
                "mode": 'view',
                "customization": {
                    //是否显示插件
                    "plugins": false,
                    "feedback": {
                        "url": "https://example.com",
                        "visible": false
                    },
                    "help": false
                },
                about: false,
            }

        });
    }
}
</script>