<template>
    <el-card> 动态导入js模块示例 </el-card>
</template>

<script setup lang="jsx">
import { onMounted } from 'vue';
import dynamicImportModule from './index.js';

defineOptions({
    name: 'DynamicImport',
});

onMounted(() => {
    dynamicImportModule('moduleA', { name: 'dynamicModuleA', type: 'init' }).then((res) => {
        console.log('拿到异步加载成功之后的返回结果', res);
    });

    // dynamicImportModule('moduleA', { name: 'dynamicModuleA', type: 'getData' }).then((res) => {
    //     console.log('拿到异步加载成功之后的返回结果', res);
    // });
});
</script>

<style lang="scss" scoped></style>
