Skip to content

Commit

Permalink
feat: Tag and Timeline组件
Browse files Browse the repository at this point in the history
  • Loading branch information
lili.21 committed Aug 1, 2023
1 parent 853f2ff commit 961cd88
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,27 @@ Replacing `<path>` and `<transform>` with appropriate values.
- [x] Popover
- [x] Col
- [x] Row
- [ ] Tag
- [ ] Timeline
- [x] Tag
- [x] Timeline
- [ ] Collapse
- [ ] Pagination
- [ ] Form相关
- [ ] Select
- [ ] SelectProps
- [ ] DatePicker
- [ ] TimePicker
- [ ] Input
- [ ] InputNumber
- [ ] Radio
- [ ] Switch
- [ ] Checkbox
- [ ] Upload
- [ ] AutoComplete
- [ ] Dropdown
- [ ] Form
- [ ] FormInstance
- [ ] Icon
- [ ] Space
- [ ] Avatar
- [ ] List
- [ ] Alert
- [ ] Menu
4 changes: 3 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ const TRANSFORMER_INQUIRER_CHOICES = [
'Slider',
'Popover',
'Col',
'Row'
'Row',
'Tag',
'Timeline'
]
.sort((a, b) => a.localeCompare(b))
.map((v) => ({
Expand Down
9 changes: 9 additions & 0 deletions transforms/Tag.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { removeAntdImportAndAddSemiImport } = require('./utils')
module.exports = function transformer(file, api) {
const j = api.jscodeshift
const root = j(file.source)

removeAntdImportAndAddSemiImport(j, root, 'Tag', 'Tag')

return root.toSource()
}
9 changes: 9 additions & 0 deletions transforms/Timeline.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { removeAntdImportAndAddSemiImport } = require('./utils')
module.exports = function transformer(file, api) {
const j = api.jscodeshift
const root = j(file.source)

removeAntdImportAndAddSemiImport(j, root, 'Timeline', 'Timeline')

return root.toSource()
}

0 comments on commit 961cd88

Please sign in to comment.