Browse Source

upgrade devDeps and fix some eslint problems

pull/1447/head
afc163 9 years ago
parent
commit
8116e775ff
  1. 2
      components/breadcrumb/Breadcrumb.jsx
  2. 2
      components/card/demo/no-padding.md
  3. 2
      components/queue-anim/demo/page.md
  4. 4
      components/upload/demo/picture-card.md
  5. 37
      components/upload/index.jsx
  6. 9
      package.json
  7. 2
      site/component/Header/index.jsx
  8. 4
      site/component/ImagePreview/index.jsx

2
components/breadcrumb/Breadcrumb.jsx

@ -39,7 +39,7 @@ export default class Breadcrumb extends React.Component {
if (!route.breadcrumbName) {
return null;
}
const name = route.breadcrumbName.replace(/\:(.*)/g, (replacement, key) => {
const name = route.breadcrumbName.replace(/:(.*)/g, (replacement, key) => {
return params[key] || replacement;
});

2
components/card/demo/no-padding.md

@ -11,7 +11,7 @@ import { Card } from 'antd';
ReactDOM.render(
<Card style={{ width: 240 }} bodyStyle={{ padding: 0 }}>
<div className="custom-image">
<img width="100%" src="https://os.alipayobjects.com/rmsportal/QBnOOoLaAfKPirc.png" />
<img alt="example" width="100%" src="https://os.alipayobjects.com/rmsportal/QBnOOoLaAfKPirc.png" />
</div>
<div className="custom-card">
<h3>欧美街拍</h3>

2
components/queue-anim/demo/page.md

@ -23,7 +23,7 @@ const Test = React.createClass({
const page = this.state.show ? [
<div className="demo-header" key="header">
<div className="logo">
<img width="30" src="https://t.alipayobjects.com/images/rmsweb/T1B9hfXcdvXXXXXXXX.svg" />
<img alt="logo" width="30" src="https://t.alipayobjects.com/images/rmsweb/T1B9hfXcdvXXXXXXXX.svg" />
<span>logo</span>
</div>
<QueueAnim component="ul">

4
components/upload/demo/picture-card.md

@ -45,11 +45,11 @@ const ImageUploadList = React.createClass({
<div className="ant-upload-text">上传照片</div>
</Upload>
<a href="https://os.alipayobjects.com/rmsportal/NDbkJhpzmLxtPhB.png" target="_blank" className="upload-example">
<img src="https://os.alipayobjects.com/rmsportal/NDbkJhpzmLxtPhB.png" />
<img alt="example" src="https://os.alipayobjects.com/rmsportal/NDbkJhpzmLxtPhB.png" />
<span>示例</span>
</a>
<Modal visible={this.state.priviewVisible} footer={null} onCancel={this.handleCancel}>
<img src={this.state.priviewImage} />
<img alt="example" src={this.state.priviewImage} />
</Modal>
</div>
);

37
components/upload/index.jsx

@ -269,34 +269,33 @@ export default class Upload extends React.Component {
{uploadList}
</span>
);
} else if (type === 'select') {
const uploadButtonCls = classNames({
[prefixCls]: true,
[`${prefixCls}-select`]: true,
[`${prefixCls}-select-${this.props.listType}`]: true,
});
if (this.props.listType === 'picture-card') {
return (
<span className={this.props.className}>
{uploadList}
<div className={uploadButtonCls}>
<RcUpload {...props}>
{this.props.children}
</RcUpload>
</div>
</span>
);
}
}
const uploadButtonCls = classNames({
[prefixCls]: true,
[`${prefixCls}-select`]: true,
[`${prefixCls}-select-${this.props.listType}`]: true,
});
if (this.props.listType === 'picture-card') {
return (
<span className={this.props.className}>
{uploadList}
<div className={uploadButtonCls}>
<RcUpload {...props}>
{this.props.children}
</RcUpload>
</div>
{uploadList}
</span>
);
}
return (
<span className={this.props.className}>
<div className={uploadButtonCls}>
<RcUpload {...props}>
{this.props.children}
</RcUpload>
</div>
{uploadList}
</span>
);
}
}

9
package.json

@ -58,7 +58,7 @@
"rc-slider": "~3.5.1",
"rc-steps": "~2.0.0",
"rc-switch": "~1.4.0",
"rc-table": "~4.0.0-beta.3",
"rc-table": "~4.0.0",
"rc-tabs": "~5.8.0",
"rc-time-picker": "~1.1.0",
"rc-tooltip": "~3.3.2",
@ -92,8 +92,9 @@
"enquire.js": "^2.1.1",
"es6-shim": "^0.35.0",
"eslint": "^2.2.0",
"eslint-config-airbnb": "^6.0.1",
"eslint-config-airbnb": "^7.0.0",
"eslint-plugin-babel": "^3.0.0",
"eslint-plugin-jsx-a11y": "^0.6.2",
"eslint-plugin-markdown": "*",
"eslint-plugin-react": "^4.0.0",
"eslint-tinker": "^0.3.1",
@ -108,7 +109,7 @@
"mkdirp": "~0.5.1",
"pre-commit": "1.x",
"querystring": "^0.2.0",
"ramda": "^0.20.1",
"ramda": "^0.21.0",
"rc-scroll-anim": "0.2.x",
"rc-tween-one": "0.2.x",
"react": "^15.0.0",
@ -118,7 +119,7 @@
"react-github-button": "^0.1.1",
"react-router": "^2.0.0",
"react-stateless-wrapper": "^1.0.2",
"react-sublime-video": "^0.1.0",
"react-sublime-video": "^0.2.0-beta",
"reqwest": "^2.0.5",
"values.js": "^1.0.3",
"webpack-babel-jest": "^1.0.4"

2
site/component/Header/index.jsx

@ -86,7 +86,7 @@ export default class Header extends React.Component {
onClick={this.handleMenuIconClick}
type="menu" />
<Link to="/" id="logo">
<img src="https://t.alipayobjects.com/images/rmsweb/T1B9hfXcdvXXXXXXXX.svg" />
<img alt="logo" src="https://t.alipayobjects.com/images/rmsweb/T1B9hfXcdvXXXXXXXX.svg" />
<span>Ant Design</span>
</Link>
</Col>

4
site/component/ImagePreview/index.jsx

@ -17,7 +17,7 @@ function PreviewImageBox({ cover, coverMeta, imgs, style, previewVisible,
style={style}
onClick={onClick}>
<div className={`preview-image-wrapper ${coverMeta.isGood && 'good'} ${coverMeta.isBad && 'bad'}`}>
<img className={coverMeta.className} src={coverMeta.src} alt="Sample Picture" />
<img className={coverMeta.className} src={coverMeta.src} alt={coverMeta.alt} />
</div>
<div className="preview-image-title">{coverMeta.alt}</div>
<div className="preview-image-description"
@ -75,7 +75,7 @@ export default class ImagePreview extends React.Component {
return (
<div key={index}>
<div className="image-modal-container">
<img {...meta} />
<img {...meta} alt={meta.alt} />
</div>
</div>
);

Loading…
Cancel
Save