Skip to content

Commit

Permalink
fix: 统一文件命名,解决 babel-plugin-import 下的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhan committed Jul 5, 2021
1 parent 0f97eb9 commit a064242
Show file tree
Hide file tree
Showing 77 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/calendar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Radio from '../radio';
import Select from '../select';
import Calendar from './src/FullCalendar';
import './style/index.less';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';
import localeData from 'dayjs/plugin/localeData';

dayjs.extend(localeData);
Expand Down
2 changes: 1 addition & 1 deletion src/date-picker/wrapPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import san from 'san';
import {classCreator} from '../core/util/index';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';
import dayjs from 'dayjs';
import weekYear from 'dayjs/plugin/weekYear';
import weekOfYear from 'dayjs/plugin/weekOfYear';
Expand Down
2 changes: 1 addition & 1 deletion src/empty/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import san, {DataTypes} from 'san';
import {classCreator} from '../core/util';
import defaultEmptyImg from './empty.svg';
import simpleEmptyImg from './simple.svg';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';

const prefixCls = classCreator('empty')();

Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export {default as Menu} from './menu';
export {default as Modal} from './modal';
export {default as Notification} from './notification';
export {default as Pagination} from './pagination';
export {default as PageHeader} from './pageheader';
export {default as PageHeader} from './page-header';
export {default as Popconfirm} from './popconfirm';
export {default as Popover} from './popover';
export {default as Progress} from './progress';
Expand All @@ -61,7 +61,7 @@ export {default as TimePicker} from './time-picker';
export {default as Timeline} from './timeline';
export {default as Tooltip} from './tooltip';
export {default as Upload} from './upload';
export {default as LocaleProvider} from './localeprovider';
export {default as LocaleProvider} from './locale-provider';
export {default as Result} from './result';
export {default as Descriptions} from './descriptions';
export {default as Typography} from './typography';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
```html
<template>
<div>
<s-localeprovider locale="{{locale}}">
<s-locale-provider locale="{{locale}}">
<s-pagination defaultCurrent="{{1}}" total="{{50}}" showSizeChanger="{{true}}" />
</s-localeprovider>
</s-locale-provider>
</div>
</template>
<script>
import {Pagination, LocaleProvider} from 'santd';
import zhCN from 'santd/localeprovider/zh_CN';
import zhCN from 'santd/locale-provider/zh_CN';
export default {
initData() {
Expand All @@ -22,7 +22,7 @@ export default {
}
},
components: {
's-localeprovider': LocaleProvider,
's-locale-provider': LocaleProvider,
's-pagination': Pagination
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LocaleProvider只需在应用外围包裹一次即可全局生效。

```js
import {LocaleProvider} from 'santd';
import zh_CN from 'santd/localeprovider/zh_CN';
import zh_CN from 'santd/locale-provider/zh_CN';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';

Expand All @@ -22,14 +22,14 @@ return san.defineComponent({
's-localprovider': LocaleProvider
},
template: '<div>
<s-localeprovider locale=\"{{locale}}\"><app /></s-localeprovider>
<s-locale-provider locale=\"{{locale}}\"><app /></s-locale-provider>
</div>'
})
```
我们提供了英语,中文,俄语,法语,德语等多种语言支持,所有语言包可以在 [这里](https://github.com/ecomfe/santd/tree/master/src/localeprovider) 找到。
我们提供了英语,中文,俄语,法语,德语等多种语言支持,所有语言包可以在 [这里](https://github.com/ecomfe/santd/tree/master/src/locale-provider) 找到。

## 增加语言包
如果你找不到你需要的语言包,欢迎你在 [英文语言包](https://github.com/ecomfe/santd/blob/master/src/localeprovider/default.js) 的基础上创建一个新的语言包,并给我们 Pull Request。
如果你找不到你需要的语言包,欢迎你在 [英文语言包](https://github.com/ecomfe/santd/blob/master/src/locale-provider/default.js) 的基础上创建一个新的语言包,并给我们 Pull Request。


## 代码演示
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<s-radiobutton key="cn" value="zhCN">中文</s-radiobutton>
</s-radiogroup>
</div>
<s-localeprovider locale="{{locale}}">
<s-locale-provider locale="{{locale}}">
<div class="locale-components">
<div class="example">
<s-pagination defaultCurrent="{{1}}" total="{{50}}" showSizeChanger="{{true}}" />
Expand Down Expand Up @@ -42,7 +42,7 @@
<p>Locale Modal</p>
</s-modal>
</div>
</s-localeprovider>
</s-locale-provider>
</div>
</template>
<script>
Expand All @@ -60,8 +60,8 @@ import {
Calendar,
Table
} from 'santd';
import zhCN from 'santd/localeprovider/zh_CN';
import enUS from 'santd/localeprovider/en_US';
import zhCN from 'santd/locale-provider/zh_CN';
import enUS from 'santd/locale-provider/en_US';
export default {
initData() {
Expand All @@ -81,7 +81,7 @@ export default {
}
},
components: {
's-localeprovider': LocaleProvider,
's-locale-provider': LocaleProvider,
's-pagination': Pagination,
's-radiogroup': Radio.Group,
's-radiobutton': Radio.Button,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/modal/ConfirmDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {classCreator} from '../core/util';
import icon from '../icon';
import Dialog from './Dialog';
import ActionButton from './ActionButton';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';


const prefixCls = classCreator('modal')();
Expand Down
2 changes: 1 addition & 1 deletion src/modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {classCreator} from '../core/util';
import Dialog from './Dialog';
import button from '../button';
import icon from '../icon';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';

const prefixCls = classCreator('modal')();

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pagination/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import san from 'san';
import Icon from '../icon';
import {classCreator} from '../core/util';
import pagination from './Pagination';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';

const prefixCls = classCreator('pagination')();

Expand Down
2 changes: 1 addition & 1 deletion src/popconfirm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {classCreator} from '../core/util';
import Tooltip from '../tooltip';
import Button from '../button';
import Icon from '../icon';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';

const prefixCls = classCreator('popover')();

Expand Down
2 changes: 1 addition & 1 deletion src/time-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Placement from './placements';
import dayjs from 'dayjs';
import Panel from './Panel';
import Icon from '../icon';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';

const prefixCls = classCreator('time-picker')();
const noop = function () {};
Expand Down
2 changes: 1 addition & 1 deletion src/transfer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {classCreator} from '../core/util';
import Empty from '../empty';
import List from './List';
import Operation from './Operation';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';

const prefixCls = classCreator('transfer')();
const emptyPrefixCls = classCreator('empty')();
Expand Down
2 changes: 1 addition & 1 deletion src/typography/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import icon from '../icon';
import tooltip from '../tooltip';
import copy from 'copy-to-clipboard';
import {classCreator, getComponentChildren} from '../core/util';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';

const prefixCls = classCreator('typography')();

Expand Down
2 changes: 1 addition & 1 deletion src/upload/Upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import uniqBy from 'lodash/uniqBy';
import findIndex from 'lodash/findIndex';
import {classCreator} from '../core/util';
import {fileToObject, genPercentAdd, getFileItem, removeFileItem} from './utils';
import localeReceiver from '../localeprovider/receiver';
import localeReceiver from '../locale-provider/receiver';

const prefixCls = classCreator('upload')();

Expand Down

0 comments on commit a064242

Please sign in to comment.