Browse Source

fix index

pull/1933/head
yiminghe 9 years ago
parent
commit
777692a207
  1. 0
      components/_util/isCssAnimationSupported.js
  2. 0
      components/_util/openAnimation.js
  3. 2
      components/badge/ScrollNumber.jsx
  4. 2
      components/menu/index.jsx
  5. 2
      components/spin/index.jsx
  6. 2
      components/tree/index.jsx
  7. 30
      index.js
  8. 3
      site/theme/template/Layout/index.jsx

0
components/util/isCssAnimationSupported.js → components/_util/isCssAnimationSupported.js

0
components/util/openAnimation.js → components/_util/openAnimation.js

2
components/badge/ScrollNumber.jsx

@ -1,6 +1,6 @@
import React, { createElement } from 'react';
import { findDOMNode } from 'react-dom';
import isCssAnimationSupported from '../util/isCssAnimationSupported';
import isCssAnimationSupported from '../_util/isCssAnimationSupported';
function getNumberArray(num) {
return num ?

2
components/menu/index.jsx

@ -1,6 +1,6 @@
import React from 'react';
import RcMenu, { Item, Divider, SubMenu, ItemGroup } from 'rc-menu';
import animation from '../util/openAnimation';
import animation from '../_util/openAnimation';
function noop() {
}

2
components/spin/index.jsx

@ -1,7 +1,7 @@
import React from 'react';
import { findDOMNode } from 'react-dom';
import classNames from 'classnames';
import isCssAnimationSupported from '../util/isCssAnimationSupported';
import isCssAnimationSupported from '../_util/isCssAnimationSupported';
import warning from 'warning';
export default class Spin extends React.Component {

2
components/tree/index.jsx

@ -1,6 +1,6 @@
import React from 'react';
import RcTree from 'rc-tree';
import animation from '../util/openAnimation';
import animation from '../_util/openAnimation';
export default class Tree extends React.Component {
static TreeNode = RcTree.TreeNode;

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();
});
}
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) {

3
site/theme/template/Layout/index.jsx

@ -1,5 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as antd from '../../../../index';
import { addLocaleData, IntlProvider } from 'react-intl';
import Header from './Header';
import Footer from './Footer';
@ -10,7 +11,7 @@ import '../../static/style';
// Expose to iframe
window.react = React;
window['react-dom'] = ReactDOM;
window.antd = require('antd');
window.antd = antd;
// Enable Google Analytics
if (!location.port) {

Loading…
Cancel
Save