组件按需导出
// 导出
export { default as text } from "./text/index";
export { default as video } from "./video/index";
// 引入
import { text, video } from '../components/index.js'
// 使用
export default {
components: {
text,
video
}
}
组件全部导出
// 导出
import text from './text/index'
import video from './text/index'
//方法一
export default {
IsText,
RunHorseLamp
}
//方法二
let data = {
IsText,
RunHorseLamp
}
export default data
// 引入
import data from '../components/index.js'
// 使用
export default {
components: {
...data
}
}
博主真是太厉害了!!!
看的我热血沸腾啊https://www.jiwenlaw.com/
叼茂SEO.bfbikes.com
怎么收藏这篇文章?
看的我热血沸腾啊https://www.237fa.com/
想想你的文章写的特别好www.jiwenlaw.com
看的我热血沸腾啊www.jiwenlaw.com