Vue uses componet dynamic components to dynamically switch how to import single-page component templates?

parent component: item.index.vue

<template>
    <div>
        <compoent :is="comp"></compoent>
    </div>
</template>
<script>
    export default {
        computed: {
            comp: function () {
                return import("./component/item1.form")
        }
    },
}
</script>

subcomponent: item1.form.vue

<template>
    <div>
        111
    </div>
</template>
    
<script>
    export default {
        data () {
            return {
                msg: "hello"
            };
        }
    };
</script>

error message

clipboard.png

Mar.23,2021

return () = > import ('. / component/item1.form')
if import has variables, you need to use a string template to parse
return () = > import (. / component/item$ {this.formItem.item_type} .form );

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-1b3932a-2c156.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-1b3932a-2c156.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?