The Vue, global variable 'Vue' imported by CDN cannot be used in the Script tag of Type=Module. Is there any way to solve it?

problem description

after using the inport import module, the Vue component cannot be registered using the global variable of Vue in the Scruipt tag

Mvc+Vue
import


import

related codes

/ / Vue registers components in Modult

<script >
    let DragDialog
</script>
<script type="module">
    import elDragDialog from "/js/Vue/el-dragDialog/index.js"
    console.info(elDragDialog)
    var Main = Vue.extend({
        directives: {
            elDragDialog 
        },
        data(){return{}},
     })
 </script>

/ / receive using global variables, but execute in the wrong order

<script >
    let DragDialog;
</script>
<script type="module">
    import elDragDialog from "/js/Vue/el-dragDialog/index.js"
    DragDialog = elDragDialog
    console.info(DragDialog)
</script>
<script>
    console.info(DragDialog)
    var Main = Vue.extend({
        directives: {
            DragDialog
        },
        data(){return{}},
     })
 </script>

what result do you expect? What is the error message actually seen?

Nov.19,2021

scope problem. I solved

import elDragDialog from '/js/Vue/el-dragDialog/index.js'
console.info(elDragDialog)
var Main = window.Vue.extend({
    directives: {
        elDragDialog 
    },
    data(){return{}},
 })
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3fefa-2c4cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3fefa-2c4cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?