欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Vue – 基础学习(4):动态加载和注册组件

程序员文章站 2022-03-18 16:37:09
// var myComponent =() => import(`./../../components/custom_panel/${t_url}.vue`);// //var myComponent = resolve => require.ensure([], () => resolve(re ......
// var mycomponent =() => import(`./../../components/custom_panel/${t_url}.vue`);
// //var mycomponent = resolve => require.ensure([], () => resolve(require(`./../../components/custom_panel/${t_url}.vue`)));
// var mycomponent = require(`./../../components/custom_panel/${t_url}.vue`).default;
// return mycomponent;


// console.log(this.$options.components);

tempcomponentlist[value.tabstitlevalue] = () => import(`../../components/${value.componentpath}.vue`);