|
|
@ -1,22 +1,22 @@ |
|
|
|
/* eslint no-console:0 */ |
|
|
|
// this file is not used if use https://github.com/ant-design/babel-plugin-antd
|
|
|
|
|
|
|
|
import { |
|
|
|
Rate, Affix, DatePicker, Tooltip, Tag, Carousel, Tabs, Modal, Dropdown, Progress, Popover, Select, |
|
|
|
Breadcrumb, Popconfirm, Pagination, Steps, InputNumber, Switch, Checkbox, Table, Collapse, message, |
|
|
|
Slider, QueueAnim, Radio, notification, Alert, Validation, Tree, TreeSelect, Upload, |
|
|
|
Badge, Menu, Timeline, Button, Icon, Row, Col, Spin, Form, Input, Calendar, TimePicker, |
|
|
|
Card, LocaleProvider, Transfer, Cascader, |
|
|
|
} from 'antd'; |
|
|
|
function camelCase(name) { |
|
|
|
return name.charAt(0).toUpperCase() + |
|
|
|
name.slice(1).replace(/-(\w)/g, (m, n) => { |
|
|
|
return n.toUpperCase(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
const req = require.context('./components', true, /^\.\/[^_][\w-]+\/(style\/)?index\.jsx?$/); |
|
|
|
|
|
|
|
// copy from above
|
|
|
|
export { |
|
|
|
Rate, Affix, DatePicker, Tooltip, Tag, Carousel, Tabs, Modal, Dropdown, Progress, Popover, Select, |
|
|
|
Breadcrumb, Popconfirm, Pagination, Steps, InputNumber, Switch, Checkbox, Table, Collapse, message, |
|
|
|
Slider, QueueAnim, Radio, notification, Alert, Validation, Tree, TreeSelect, Upload, |
|
|
|
Badge, Menu, Timeline, Button, Icon, Row, Col, Spin, Form, Input, Calendar, TimePicker, |
|
|
|
Card, LocaleProvider, Transfer, Cascader, |
|
|
|
}; |
|
|
|
req.keys().forEach((mod) => { |
|
|
|
const v = req(mod); |
|
|
|
const match = mod.match(/^\.\/([^_][\w-]+)\/index\.jsx?$/); |
|
|
|
if (match && match[1]) { |
|
|
|
exports[camelCase(match[1])] = v; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
if (typeof console !== 'undefined' && console.warn) { |
|
|
|