Antd-Helper
1、功能点
- react 的 antd 组件库的 vs-code 扩展
- 支持对 antd react 组件的属性;加入属性说明,属性类型 (覆盖 90%组件)
- 支持 antd 自动导入(覆盖业务常用组件 90%)
- 支持子组件,自动导入,声明
- 支持 message,Modal 函数提示和自动导入,函数导入自动生成基本模版
- 支持 Import 多行/单行语句的导入,去重判断
- 支持子组件自动声明时声明去重
2、支持的 子组件
{ name: "Option", parent: "Select", type: TagType.Inner, statement: "const { Option } = Select;" },
{ name: "OptGroup", parent: "Select", type: TagType.Inner, statement: "const { OptGroup } = Select;" },
{ name: "TextArea", parent: "Input", type: TagType.Inner, statement: "const { TextArea } = Input;" },
{ name: "InputGroup", parent: "Input", type: TagType.Rename, cname:"Group", statement: "const InputGroup = Input.Group;" },
{ name: "Search", parent: "Input", type: TagType.Inner, statement: "const { Search } = Input;" },
{ name: "MonthPicker", parent: "DatePicker", type: TagType.Inner, statement: "const { MonthPicker } = DatePicker;" },
{ name: "RangePicker", parent: "DatePicker", type: TagType.Inner, statement: "const { RangePicker } = DatePicker;" },
{ name: "WeekPicker", parent: "DatePicker", type: TagType.Inner, statement: "const { WeekPicker } = DatePicker;" },
{ name: "FormItem", parent: "Form", type: TagType.Rename, cname:"Item", statement: "const FormItem = Form.Item;" },
{ name: "CheckboxGroup", parent: "Checkbox", type: TagType.Rename, cname:"Group", statement: "const CheckboxGroup = Checkbox.Group;" },
{ name: "RadioButton", parent: "Radio", type: TagType.Rename, cname:"Button", statement: "const RadioButton = Radio.Button;" },
{ name: "RadioGroup", parent: "Radio", type: TagType.Rename, cname:"Group", statement: "const RadioGroup = Radio.Group;" }
3、 函数支持
"message.success(content, [duration], onClose)",
"message.error(content, [duration], onClose)",
"message.info(content, [duration], onClose)",
"message.warning(content, [duration], onClose)",
"message.warn(content, [duration], onClose)",
"message.loading(content, [duration], onClose)",
"Modal.info({})",
"Modal.success({})",
"Modal.error({})",
"Modal.warning({})",
"Modal.confirm({})",