Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
4 changes: 2 additions & 2 deletions examples/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'rmc-picker/assets/index.css';
import 'rmc-date-picker/assets/index.css';
import 'rmc-calendar/assets/index.less';

import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Calendar, ExtraData, CalendarPropsType } from '../src';

import zhCN from '../src/locale/zh_CN';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"dependencies": {
"babel-runtime": "6.x",
"rc-animate": "^2.4.1",
"rmc-date-picker": "~6.0.0-alpha.10"
"rmc-date-picker": "~6.0.8"
},
"devDependencies": {
"@types/jest": "^21.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Animate from 'rc-animate';
import TimePicker from './TimePicker';

Expand Down
2 changes: 1 addition & 1 deletion src/TimePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import DateTimePicker from 'rmc-date-picker';
import { Models } from './date/DataTypes';

Expand Down
2 changes: 1 addition & 1 deletion src/calendar/AnimateWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';

export interface PropsType {
visible: boolean;
Expand Down
5 changes: 3 additions & 2 deletions tests/Calendar.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import * as React from 'react';
import Adapter from 'enzyme-adapter-react-15';
import { default as Enzyme, render } from 'enzyme';
import * as Enzyme from 'enzyme';
import { render } from 'enzyme';
import { renderToJson } from 'enzyme-to-json';
import { Calendar, Locale } from '../src';

Expand Down
7 changes: 4 additions & 3 deletions tests/DatePicker.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react';
import * as React from 'react';
import Adapter from 'enzyme-adapter-react-15';
import { default as Enzyme, render } from 'enzyme';
import * as Enzyme from 'enzyme';
import { renderToJson } from 'enzyme-to-json';
import { DatePicker } from '../src';

Enzyme.configure({ adapter: new Adapter() });

describe('DatePicker', () => {
it('renders correctly', () => {
const wrapper = render(
const wrapper = Enzyme.render(
<DatePicker
defaultDate={new Date(2017, 7, 15)}
/>
);
expect(renderToJson(wrapper)).toMatchSnapshot();
Expand Down
14 changes: 7 additions & 7 deletions tests/__snapshots__/Calendar.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -57,37 +57,37 @@ exports[`Calendar english. renders correctly 1`] = `
<div
class="cell cell-grey"
>
Sun
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change

Copy link
Author

@doxiaodong doxiaodong Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是依赖升级了造成的,依赖修复了 i18n 的问题

</div>
<div
class="cell"
>
Mon
</div>
<div
class="cell"
>
Tue
</div>
<div
class="cell"
>
Wed
</div>
<div
class="cell"
>
Thu
</div>
<div
class="cell"
>
Fir
</div>
<div
class="cell cell-grey"
>
Sat
</div>
</div>
<div
Expand Down
Loading