组件按需导出

// 导出
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
  }
}