mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
fix index
This commit is contained in:
30
index.js
30
index.js
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
// 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,
|
||||
};
|
||||
const req = require.context('./components', true, /^\.\/[^_][\w-]+\/(style\/)?index\.jsx?$/);
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user