Skip to content

Commit

Permalink
Merge pull request #2 from Mr-Prune/master
Browse files Browse the repository at this point in the history
fix (components):  解决图片标签事件无效
  • Loading branch information
Simbachen authored May 23, 2018
2 parents 8590825 + 7358689 commit 3f7ea65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/taro-components/src/components/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ class Image extends Nerv.Component {
}

render () {
const { className, src, style, mode, onLoad, onError } = this.props
const { className, src, style, mode, onLoad, onError, ...reset } = this.props
const cls = classNames('taro-img', {}, className)
const imgCls =
'taro-img__mode-' +
(mode || 'scaleToFill').toLowerCase().replace(/\s/g, '')

return (
<div className={cls} style={style}>
<div className={cls} style={style} {...reset}>
<img className={imgCls} src={src} onLoad={onLoad} onError={onError} />
</div>
)
Expand Down

0 comments on commit 3f7ea65

Please sign in to comment.