- Button
- Alert
- Icon
- Input
- AutoComplete
- Menu
- Tab
- Progress
- Transition
- Upload
- UploadList
- Progress
- 发请求
- 对拖拽上传的文件类型检查
- 拖拽上传
- Carousel
- CarouselArrow 左右的箭头
- CarouselIndicator 下面的指示器
整体架构
使用 monorepo 的方式,用于开发UI组件库和测试UI组件库
Ha0ranUI├─ .gitignore├─ lerna-debug.log├─ lerna.json├─ package.json├─ packages│ ├─ test-ui-component // 测试UI组件库│ └─ ui-with-rollup // UI组件库│ ├─ .babelrc│ ├─ .gitignore│ ├─ components│ ├─ dist│ ├─ index.js│ ├─ package.json│ ├─ README.md│ ├─ rollup.config.js│ ├─ tsconfig.json│ ├─ yarn-error.log│ └─ yarn.lock└─ yarn.lock
Upload组件
参考 rc-upload & antd
📦Upload┣ 📜AjaxUpload.tsx // 上传组件┣ 📜attr-accept.ts // 拖拽上传时对类型做检查┣ 📜dragger.tsx┣ 📜index.ts┣ 📜interface.tsx // 类型接口┣ 📜request.ts // 发送ajax请求┣ 📜traverseFileTree.ts // 遍历文件夹┣ 📜uid.ts // 生成uid┣ 📜Upload.tsx┗ 📜uploadList.tsx
request 使用原生 ajax 发送请求,需要调用 onprogress 方法上传进度
Carousel 组件
需要考虑到左右箭头,下面 indicator(样式、位置)、轮播滚动方向、滚动动画等
