先创建一个js文件.例如index.js
export {default as Sidebar} from './Sidebar'
export {default as Navbar} from './Navbar'
export {default as Main} from './Main'
在组件中引入对应组件
import {Sidebar, Navbar} from './components'