//MyVideo组件
//自行封装一个组件，利用iframe实现
<template>
    <iframe :onload="onloadCode" style="width:100%;height:100%;border:1px solid #fff;background: #000;"></iframe>
</template>
<script>
    export default {
        props: {
            src: {}
        },
        data() {
            return {
                onloadCode: '',
                lnglat: [114.76, 31.52],
                markers: [{
                    latitude: 31.52,
                    longitude: 114.76,
                    iconPath: '../../../static/tabs/add.png',
                    width: 25,
                    height: 25
                }]
            }
        },
        created() {
            this.onloadCode =
                `this.contentWindow.document.body.innerHTML = '<map style="width: 100%;" id="container" latitude="${this.lnglat[1]}" longitude="${this.lnglat[0]}" markers="${this.markers}" ></map>';`
        },
    }
</script>
<style lang="scss">
</style>