react将多个公共组件归成一类,方便调用

目录结构

.
├── component                  # 公共组件存放
├   ├── example                
├   ├  ├── example1.ts             # 例子1
├   ├  ├── example2.ts             # 例子2
├   ├  ├── example3.ts             # 例子3
├   ├── example_index.ts       # example归类
├── app.ts

example_index.ts

export * from "./example/example1";
export * from "./example/example2";
export * from "./example/example3";

app.ts

import { Example1, Example2, Example3 } from "./components";

posted @ 2019-07-01 17:59  xiaobe  阅读(1451)  评论(0编辑  收藏  举报