mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-12 22:51:09 +08:00
Fix lint issues
This commit is contained in:
@@ -39,23 +39,23 @@ const UIManager = {
|
||||
let nativeProp
|
||||
const value = props[prop]
|
||||
|
||||
switch(prop) {
|
||||
switch (prop) {
|
||||
case 'style':
|
||||
// convert styles to DOM-styles
|
||||
CSSPropertyOperations.setValueForStyles(node, processTransform(flattenStyle(value)))
|
||||
break;
|
||||
break
|
||||
case 'class':
|
||||
case 'className':
|
||||
nativeProp = 'class'
|
||||
// prevent class names managed by React Native from being replaced
|
||||
const className = node.getAttribute(nativeProp) + ' ' + value
|
||||
node.setAttribute(nativeProp, className)
|
||||
break;
|
||||
break
|
||||
case 'text':
|
||||
case 'value':
|
||||
// native platforms use `text` prop to replace text input value
|
||||
node.value = value
|
||||
break;
|
||||
break
|
||||
default:
|
||||
node.setAttribute(prop, value)
|
||||
}
|
||||
|
||||
@@ -61,15 +61,15 @@ class View extends Component {
|
||||
<CoreComponent
|
||||
{...other}
|
||||
onClick={this._handleClick}
|
||||
onClickCapture={this._normalizeEventForHandler('onClickCapture')}
|
||||
onTouchCancel={this._normalizeEventForHandler('onTouchCancel')}
|
||||
onTouchCancelCapture={this._normalizeEventForHandler('onTouchCancelCapture')}
|
||||
onTouchEnd={this._normalizeEventForHandler('onTouchEnd')}
|
||||
onTouchEndCapture={this._normalizeEventForHandler('onTouchEndCapture')}
|
||||
onTouchMove={this._normalizeEventForHandler('onTouchMove')}
|
||||
onTouchMoveCapture={this._normalizeEventForHandler('onTouchMoveCapture')}
|
||||
onTouchStart={this._normalizeEventForHandler('onTouchStart')}
|
||||
onTouchStartCapture={this._normalizeEventForHandler('onTouchStartCapture')}
|
||||
onClickCapture={this._normalizeEventForHandler(this.props.onClickCapture)}
|
||||
onTouchCancel={this._normalizeEventForHandler(this.props.onTouchCancel)}
|
||||
onTouchCancelCapture={this._normalizeEventForHandler(this.props.onTouchCancelCapture)}
|
||||
onTouchEnd={this._normalizeEventForHandler(this.props.onTouchEnd)}
|
||||
onTouchEndCapture={this._normalizeEventForHandler(this.props.onTouchEndCapture)}
|
||||
onTouchMove={this._normalizeEventForHandler(this.props.onTouchMove)}
|
||||
onTouchMoveCapture={this._normalizeEventForHandler(this.props.onTouchMoveCapture)}
|
||||
onTouchStart={this._normalizeEventForHandler(this.props.onTouchStart)}
|
||||
onTouchStartCapture={this._normalizeEventForHandler(this.props.onTouchStartCapture)}
|
||||
style={[
|
||||
styles.initial,
|
||||
style,
|
||||
@@ -89,7 +89,7 @@ class View extends Component {
|
||||
if (pageX === undefined) {
|
||||
e.nativeEvent = normalizeNativeEvent(e.nativeEvent)
|
||||
}
|
||||
this.props[handler] && this.props[handler](e)
|
||||
handler && handler(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user