Skip to content

Commit

Permalink
feat: upgrade deps, fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
paranoidjk committed Jul 22, 2017
1 parent 9e2f736 commit 21b76cc
Show file tree
Hide file tree
Showing 27 changed files with 191 additions and 182 deletions.
1 change: 1 addition & 0 deletions .stylelintrc
Expand Up @@ -3,6 +3,7 @@
"rules": {
at-rule-empty-line-before: null,
at-rule-name-space-after: null,
at-rule-no-unknown: null,
comment-empty-line-before: null,
declaration-bang-space-before: null,
declaration-empty-line-before: null,
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.en-US.md
Expand Up @@ -18,12 +18,12 @@ timeline: true

`2017-07-22`

- **Feature*
- **Feature**
- `ListItem` 支持 `onLongPress`. ([#1533](https://github.com/ant-design/ant-design-mobile/pull/1533))

- **Bug Fix**
- 修复 `Tabs` 滑动浮层覆盖 `Popup` 蒙版的问题。([#1512](https://github.com/ant-design/ant-design-mobile/pull/1512))
- 修复 `Switch` 在 android 上 0.5px 导致显示不正常的问题。((86dabf)[https://github.com/ant-design/ant-design-mobile/commit/86dabfea9841695fbca5319b422f11a0ddb17184])
- 修复 `Switch` 在 android 上 0.5px 导致显示不正常的问题。([86dabf](https://github.com/ant-design/ant-design-mobile/commit/86dabfea9841695fbca5319b422f11a0ddb17184))
- 修复 React Native `Modal.prompt` 键盘遮挡的问题。([#1489](https://github.com/ant-design/ant-design-mobile/issues/1489))

- **Improve && Enhancement**
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.zh-CN.md
Expand Up @@ -18,12 +18,12 @@ timeline: true

`2017-07-22`

- **Feature*
- **Feature**
- `ListItem` 支持 `onLongPress`. ([#1533](https://github.com/ant-design/ant-design-mobile/pull/1533))

- **Bug Fix**
- 修复 `Tabs` 滑动浮层覆盖 `Popup` 蒙版的问题。([#1512](https://github.com/ant-design/ant-design-mobile/pull/1512))
- 修复 `Switch` 在 android 上 0.5px 导致显示不正常的问题。((86dabf)[https://github.com/ant-design/ant-design-mobile/commit/86dabfea9841695fbca5319b422f11a0ddb17184])
- 修复 `Switch` 在 android 上 0.5px 导致显示不正常的问题。([86dabf](https://github.com/ant-design/ant-design-mobile/commit/86dabfea9841695fbca5319b422f11a0ddb17184))
- 修复 React Native `Modal.prompt` 键盘遮挡的问题。([#1489](https://github.com/ant-design/ant-design-mobile/issues/1489))

- **Improve && Enhancement**
Expand Down
2 changes: 1 addition & 1 deletion components/card/demo/basic.md
Expand Up @@ -32,5 +32,5 @@ ReactDOM.render(
</Card>
<WhiteSpace size="lg" />
</WingBlank>
, mountNode);
, mountNode);
````
2 changes: 1 addition & 1 deletion components/card/demo/full.md
Expand Up @@ -32,5 +32,5 @@ ReactDOM.render(
<Card.Footer content="footer content" extra={<div>extra footer content</div>} />
</Card>
</div>
, mountNode);
, mountNode);
````
4 changes: 2 additions & 2 deletions components/input-item/demo/basic.md
Expand Up @@ -53,8 +53,8 @@ class BasicInputExample extends React.Component {
});
}}
>
click to focus
</div>
click to focus
</div>
</List.Item>
</List>
<List renderHeader={() => 'Whether is controlled'}>
Expand Down
2 changes: 1 addition & 1 deletion components/menu/demo/basic.md
Expand Up @@ -128,7 +128,7 @@ class MenuExample extends React.Component {
onChange={this.onChange}
height={document.documentElement.clientHeight * 0.6}
/>
);
);
const loadingEl = (
<div style={{ width: '100%', height: document.documentElement.clientHeight * 0.6, display: 'flex', justifyContent: 'center' }}>
<ActivityIndicator size="large" />
Expand Down
2 changes: 1 addition & 1 deletion components/nav-bar/demo/basic.md
Expand Up @@ -27,5 +27,5 @@ ReactDOM.render(
]}
>NavBar</NavBar>
</div>
, mountNode);
, mountNode);
````
26 changes: 14 additions & 12 deletions components/popup/demo/basic-up.md
Expand Up @@ -26,20 +26,22 @@ class Test extends React.Component {
state = {
sel: '',
};
renderHeader = () => (
<div style={{ position: 'relative' }}>
委托买入
<span
style={{
position: 'absolute', right: 3, top: -5,
}}
onClick={() => this.onClose('cancel')}
>
<Icon type="cross" />
</span>
</div>
);
onClick = () => {
Popup.show(<div>
<List renderHeader={() => (
<div style={{ position: 'relative' }}>
委托买入
<span
style={{
position: 'absolute', right: 3, top: -5,
}}
onClick={() => this.onClose('cancel')}
>
<Icon type="cross" />
</span>
</div>)}
<List renderHeader={this.renderHeader}
className="popup-list"
>
{['股票名称', '股票代码', '买入价格', '买入数量', '更多', '更多'].map((i, index) => (
Expand Down
2 changes: 1 addition & 1 deletion components/slider/demo/icon-slider.md
Expand Up @@ -53,7 +53,7 @@ class IconSlider extends React.Component {

ReactDOM.render(
<IconSlider min={0} max={20} value={0} icon={['check-circle', 'cross-circle']} />
, mountNode);
, mountNode);
````

````css
Expand Down
40 changes: 21 additions & 19 deletions components/stepper/demo/basic.md
Expand Up @@ -27,30 +27,32 @@ class Demo extends React.Component {
render() {
return (
<List renderHeader={() => 'Demos'}>
<List.Item extra={
<Stepper
style={{ width: '100%', minWidth: '2rem' }}
showNumber
max={10}
min={1}
value={this.state.val}
onChange={this.onChange}
/>}
<List.Item
wrap
extra={
<Stepper
style={{ width: '100%', minWidth: '2rem' }}
showNumber
max={10}
min={1}
value={this.state.val}
onChange={this.onChange}
/>}
>
Show number value(Use TouchEvent for mobile by default)
</List.Item>
<List.Item extra={
<Stepper
style={{ width: '100%', minWidth: '2rem' }}
showNumber
max={10}
min={1}
value={this.state.val1}
onChange={this.onChange1}
useTouch={false}
/>}
<List.Item
wrap
extra={
<Stepper
style={{ width: '100%', minWidth: '2rem' }}
showNumber
max={10}
min={1}
value={this.state.val1}
onChange={this.onChange1}
useTouch={false}
/>}
>
Show number value(Use MouseEvent for PC)
</List.Item>
Expand Down
2 changes: 1 addition & 1 deletion components/steps/demo/basic.md
Expand Up @@ -61,7 +61,7 @@ ReactDOM.render(
<Step title="Step 4" icon={<Icon type={require('./pay-circle.svg')} />} />
</Steps>
</WingBlank>
, mountNode);
, mountNode);
````

````css
Expand Down
2 changes: 1 addition & 1 deletion components/steps/demo/horizontal.md
Expand Up @@ -45,7 +45,7 @@ ReactDOM.render(
<Step title="Nov. 4th" description="Profit arrival" icon={<span className="fake-icon" />} />
</Steps>
</WingBlank>
, mountNode);
, mountNode);
````

````css
Expand Down
3 changes: 0 additions & 3 deletions components/tab-bar/demo/basic.md
Expand Up @@ -10,10 +10,7 @@ title:
````jsx
import { TabBar, Icon } from 'antd-mobile';

/* eslint global-require: 0 */

class TabBarExample extends React.Component {

constructor(props) {
super(props);
this.state = {
Expand Down
3 changes: 2 additions & 1 deletion components/tag/demo/basic.md
Expand Up @@ -38,8 +38,9 @@ ReactDOM.render(
</Tag>
<Tag small>Small and Readonly</Tag>
</div>
, mountNode);
, mountNode);
````

````css
.tag-container{
display: flex;
Expand Down
24 changes: 12 additions & 12 deletions package.json
Expand Up @@ -48,7 +48,7 @@
"rc-steps": "~2.5.1",
"rc-swipeout": "~1.3.0",
"rc-table": "~5.4.0",
"rc-tabs": "~8.0.0",
"rc-tabs": "~8.1.0",
"rc-tooltip": "~3.4.3",
"rc-touchable": "~1.2.2",
"react-native-camera-roll-picker": "~1.1.6",
Expand All @@ -72,7 +72,7 @@
"antd-demo-jest": "^1.3.1",
"antd-mobile-demo-data": "^0.1.1",
"antd-tools": "^1.6.0",
"babel-eslint": "^7.1.0",
"babel-eslint": "^7.2.3",
"babel-jest": "^20.0.3",
"babel-plugin-import": "^1.2.1",
"babel-plugin-transform-runtime": "^6.23.0",
Expand All @@ -88,19 +88,19 @@
"enquire.js": "^2.1.1",
"enzyme": "^2.7.1",
"enzyme-to-json": "^1.5.0",
"eslint": "^3.0.0",
"eslint": "^4.3.0",
"eslint-config-airbnb": "latest",
"eslint-plugin-babel": "^4.0.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^5.0.1",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-markdown": "~1.0.0-beta.6",
"eslint-plugin-react": "^7.0.1",
"eslint-tinker": "^0.4.0",
"eslint-plugin-react": "^7.1.0",
"eslint-tinker": "^0.4.1",
"glob": "^7.1.1",
"jest": "^20.0.4",
"jsonml.js": "^0.1.0",
"lesshint": "^3.1.1",
"lint-staged": "^3.3.1",
"lesshint": "^4.0.2",
"lint-staged": "^4.0.2",
"lodash.debounce": "^4.0.6",
"mockdate": "^2.0.1",
"postcss-pxtorem": "^3.3.1",
Expand All @@ -118,8 +118,8 @@
"react-native-mock": "^0.3.1",
"react-navigation": "^1.0.0-beta.11",
"react-test-renderer": "^15.4.2",
"stylelint": "^7.12.0",
"stylelint-config-standard": "^16.0.0",
"stylelint": "^8.0.0",
"stylelint-config-standard": "^17.0.0",
"svg-sprite-loader": "^0.3.1",
"typescript": "~2.4.0",
"typescript-babel-jest": "^1.0.1",
Expand Down
46 changes: 23 additions & 23 deletions rn-kitchen-sink/components/Home.js
Expand Up @@ -86,33 +86,33 @@ class Home extends React.Component {
});
const appVersion = AppInfo.getInfoShortVersion();
fetch('https://raw.githubusercontent.com/ant-design/ant-design-mobile/master/rn-kitchen-sink/appInfo.json')
.then(response => response.json())
.then((responseJson) => {
const os = Platform.OS;
if (responseJson[os]) {
const newestVersion = responseJson[os].appversion;
const appUrl = responseJson[os].appurl;
if (appVersion.localeCompare(newestVersion) < 0) {
this.setState({
animating: false,
});
Alert.alert(
'',
'检测到 APP 有新版本,是否前往下载',
[
{ text: '取消', style: 'cancel' },
{ text: '下载', onPress: () => Linking.openURL(appUrl) },
],
);
.then(response => response.json())
.then((responseJson) => {
const os = Platform.OS;
if (responseJson[os]) {
const newestVersion = responseJson[os].appversion;
const appUrl = responseJson[os].appurl;
if (appVersion.localeCompare(newestVersion) < 0) {
this.setState({
animating: false,
});
Alert.alert(
'',
'检测到 APP 有新版本,是否前往下载',
[
{ text: '取消', style: 'cancel' },
{ text: '下载', onPress: () => Linking.openURL(appUrl) },
],
);
} else {
this.updateDemo();
}
} else {
this.updateDemo();
}
} else {
}).catch(() => {
this.updateDemo();
}
}).catch(() => {
this.updateDemo();
});
});
}

updateDemo() {
Expand Down
38 changes: 21 additions & 17 deletions rn-kitchen-sink/components/RnIndex.js
Expand Up @@ -53,37 +53,41 @@ export default class RnIndex extends React.Component {
searchText: text,
});
}

renderItem = el => (
<List.Item
thumb={el.icon}
onClick={() => {
this.onPressRow(el);
}}
arrow="horizontal"
key={el.title}
>
{`${el.title} ${el.description}`}
</List.Item>
);
render() {
const { uiViews, uiControls, others, uiBars } = this.state;
return (
<View style={styles.container}>
<SearchBar onChange={(text) => { this.search(text); }} />
<ScrollView>
{
[['UI Views', uiViews],
['UI Controls', uiControls],
['Others', others],
['UI Bars', uiBars]].map((item, i) => (
[
['UI Views', uiViews],
['UI Controls', uiControls],
['Others', others],
['UI Bars', uiBars],
].map((item, i) => (
<List
key={i}
renderHeader={() => item[0]}
style={{
marginTop: 0,
marginBottom: 0,
}}
>{
item[1].map(el => (
<List.Item
thumb={el.icon}
onClick={() => {
this.onPressRow(el);
}}
arrow="horizontal"
key={el.title}
>{`${el.title} ${el.description}`}</List.Item>
))
}</List>
>
{item[1].map(el => this.renderItem(el))}
</List>
))
}
</ScrollView>
Expand Down
1 change: 0 additions & 1 deletion site/desktop/src/static/footer.less
@@ -1,6 +1,5 @@
footer {
clear: both;
// border-top: 1Px solid #eee;
font-size: 12Px;
background: #fff;
position: relative;
Expand Down

0 comments on commit 21b76cc

Please sign in to comment.