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{}},
 })
Menu