Authored by 王海元

更改成能正常运行代码,0.44的很多不支持的语法进行了修改

Showing 100 changed files with 762 additions and 683 deletions

Too many changes to show.

To preserve performance only 100 of 100+ files are displayed.

... ... @@ -2,6 +2,7 @@
import React from 'react';
import {AppRegistry} from 'react-native';
import createReactClass from 'create-react-class';
import {Provider} from 'react-redux';
... ... @@ -30,7 +31,7 @@ function getInitialState() {
export default function native(platform) {
let YH_MineAlliance = React.createClass({
let YH_MineAlliance = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -38,7 +39,7 @@ function getInitialState() {
export default function native(platform) {
let YH_AssociatorGift = React.createClass({
let YH_AssociatorGift = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -46,7 +47,7 @@ function getInitialState() {
export default function native(platform) {
let YH_BLK = React.createClass({
let YH_BLK = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -43,7 +44,7 @@ function getInitialState() {
export default function native(platform) {
let YH_BrandStore = React.createClass({
let YH_BrandStore = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -62,7 +63,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Classify = React.createClass({
let YH_Classify = createReactClass({
_renderContainer() {
if (this.props.type == 0) {
... ...
var React = require('react')
var ReactNative = require('react-native')
var {
PropTypes,
} = React;
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
var {
StyleSheet,
... ... @@ -30,7 +29,7 @@ const LISTVIEW_REF = 'listview'
* {isRefreshing: false}
*/
var ControlledRefreshableListView = React.createClass({
var ControlledRefreshableListView = createReactClass({
propTypes: {
colors: PropTypes.array,
progressBackgroundColor: PropTypes.string,
... ...
var React = require('react')
var ReactNative = require('react-native')
var {
PropTypes,
} = React;
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
var {
StyleSheet,
... ... @@ -17,7 +16,7 @@ var ControlledRefreshableListView = require('./ControlledRefreshableListView')
const LISTVIEW_REF = 'listview'
var RefreshableListView = React.createClass({
var RefreshableListView = createReactClass({
propTypes: {
loadData: PropTypes.func.isRequired,
minDisplayTime: PropTypes.number,
... ...
var React = require('react')
var ReactNative = require('react-native')
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
var {
PropTypes,
isValidElement,
createElement,
} = React;
... ... @@ -13,7 +15,7 @@ var {
StyleSheet,
} = ReactNative
var RefreshingIndicator = React.createClass({
var RefreshingIndicator = createReactClass({
propTypes: {
activityIndicatorComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
stylesheet: PropTypes.object,
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import YH_Swiper from './YH_Swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
... ... @@ -19,14 +20,14 @@ export default class Banner extends React.Component {
static propTypes = {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
duration: React.PropTypes.number,
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
onPress: React.PropTypes.func,
duration: PropTypes.number,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
onPress: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -2,10 +2,8 @@
var React = require('react');
var ReactNative = require('react-native');
var {
PropTypes,
} = React;
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
var {
Image,
... ... @@ -13,7 +11,7 @@ var {
var TimerMixin = require('react-timer-mixin');
module.exports = React.createClass({
module.exports = createReactClass({
propTypes: {
images: PropTypes.array.isRequired,
... ...
'use strict';
import React, {Component} from 'react'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
StyleSheet,
View,
... ... @@ -13,9 +14,9 @@ import {
export default class LoadMoreIndicator extends Component {
static propTypes = {
isVisible: React.PropTypes.bool.isRequired,
animating: React.PropTypes.bool,
text: React.PropTypes.string,
isVisible: PropTypes.bool.isRequired,
animating: PropTypes.bool,
text: PropTypes.string,
};
static defaultProps = {
... ...
'use strict';
import React, {Component} from 'react'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
StyleSheet,
View,
... ... @@ -13,15 +14,15 @@ import {
export default class LoadingIndicator extends Component {
static propTypes = {
isVisible: React.PropTypes.bool.isRequired,
size: React.PropTypes.string,
color: React.PropTypes.string,
overlayWidth: React.PropTypes.number,
overlayHeight: React.PropTypes.number,
overlayColor: React.PropTypes.string,
text: React.PropTypes.string,
textColor: React.PropTypes.string,
textFontSize: React.PropTypes.number,
isVisible: PropTypes.bool.isRequired,
size: PropTypes.string,
color: PropTypes.string,
overlayWidth: PropTypes.number,
overlayHeight: PropTypes.number,
overlayColor: PropTypes.string,
text: PropTypes.string,
textColor: PropTypes.string,
textFontSize: PropTypes.number,
};
static defaultProps = {
... ...
'use strict';
import React, {Component} from 'react'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
StyleSheet,
View,
... ... @@ -20,15 +21,15 @@ export default class Prompt extends Component {
static propTypes = {
icon: Image.propTypes.source,
overlayColor: React.PropTypes.string,
title: React.PropTypes.string,
titleColor: React.PropTypes.string,
titleFontSize: React.PropTypes.number,
text: React.PropTypes.string,
textColor: React.PropTypes.string,
textFontSize: React.PropTypes.number,
duration: React.PropTypes.number,
onPromptHidden: React.PropTypes.func,
overlayColor: PropTypes.string,
title: PropTypes.string,
titleColor: PropTypes.string,
titleFontSize: PropTypes.number,
text: PropTypes.string,
textColor: PropTypes.string,
textFontSize: PropTypes.number,
duration: PropTypes.number,
onPromptHidden: PropTypes.func,
};
static defaultProps = {
... ...
'use strict';
import React, {Component} from 'react'
import PropTypes from 'prop-types';
import {
StyleSheet,
View,
... ... @@ -15,15 +16,15 @@ import TimerMixin from 'react-timer-mixin';
export default class Toast extends Component {
static propTypes = {
isVisible: React.PropTypes.bool.isRequired,
size: React.PropTypes.string,
color: React.PropTypes.string,
overlayWidth: React.PropTypes.number,
overlayHeight: React.PropTypes.number,
overlayColor: React.PropTypes.string,
text: React.PropTypes.string,
textColor: React.PropTypes.string,
textFontSize: React.PropTypes.number,
isVisible: PropTypes.bool.isRequired,
size: PropTypes.string,
color: PropTypes.string,
overlayWidth: PropTypes.number,
overlayHeight: PropTypes.number,
overlayColor: PropTypes.string,
text: PropTypes.string,
textColor: PropTypes.string,
textFontSize: PropTypes.number,
};
static defaultProps = {
... ...
... ... @@ -3,9 +3,9 @@ import ReactNative from 'react-native';
import {Platform} from 'react-native';
const {
PropTypes,
Component,
} = React;
import PropTypes from 'prop-types';
const {
NativeModules,
... ...
... ... @@ -7,7 +7,7 @@
*/
import React from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
let {
requireNativeComponent,
View,
... ... @@ -42,14 +42,14 @@ export default class YH_ViewPager extends React.Component {
static propTypes = {
...View.propTypes,
initialPage: React.PropTypes.number,
onPageSelected: React.PropTypes.func,
pageMargin: React.PropTypes.number,
keyboardDismissMode: React.PropTypes.oneOf([
initialPage: PropTypes.number,
onPageSelected: PropTypes.func,
pageMargin: PropTypes.number,
keyboardDismissMode: PropTypes.oneOf([
'none', // default
'on-drag',
]),
scrollEnabled: React.PropTypes.bool,
scrollEnabled: PropTypes.bool,
};
constructor(props) {
... ...
... ... @@ -26,6 +26,7 @@ var View = require('View');
var cloneReferencedElement = require('react-clone-referenced-element');
var isEmpty = require('isEmpty');
var merge = require('merge');
var createReactClass = require('create-react-class');
var DEFAULT_PAGE_SIZE = 1;
var DEFAULT_INITIAL_ROWS = 10;
... ... @@ -85,7 +86,7 @@ var DEFAULT_SCROLL_CALLBACK_THROTTLE = 50;
* rendering rows.
*/
var ListView = React.createClass({
var ListView = createReactClass({
_childFrames: ([]: Array<Object>),
_sentEndForContentLength: (null: ?number),
_scrollComponent: (null: any),
... ...
... ... @@ -26,6 +26,7 @@ const StyleSheetPropType = require('StyleSheetPropType');
const View = require('View');
const ViewPropTypes = require('ViewPropTypes');
const ViewStylePropTypes = require('ViewStylePropTypes');
var createReactClass = require('create-react-class');
const dismissKeyboard = require('dismissKeyboard');
const flattenStyle = require('flattenStyle');
... ... @@ -72,7 +73,7 @@ const RCTScrollViewManager = require('NativeModules').ScrollViewManager;
* supports out of the box.
*/
// $FlowFixMe(>=0.41.0)
const ScrollView = React.createClass({
const ScrollView = createReactClass({
propTypes: {
...ViewPropTypes,
/**
... ... @@ -393,7 +394,7 @@ const ScrollView = React.createClass({
/**
埋点
??????
*/
yh_exposureData: PropTypes.any,
yh_viewVisible: PropTypes.bool,
... ...
... ... @@ -24,6 +24,7 @@ var Touchable = require('Touchable');
var TouchableWithoutFeedback = require('TouchableWithoutFeedback');
var View = require('View');
const ViewPropTypes = require('ViewPropTypes');
var createReactClass = require('create-react-class');
var ensureComponentIsNative = require('ensureComponentIsNative');
var ensurePositiveDelayProps = require('ensurePositiveDelayProps');
... ... @@ -68,7 +69,7 @@ var PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
* ```
*/
var TouchableHighlight = React.createClass({
var TouchableHighlight = createReactClass({
propTypes: {
...TouchableWithoutFeedback.propTypes,
/**
... ... @@ -109,7 +110,7 @@ var TouchableHighlight = React.createClass({
*/
tvParallaxProperties: PropTypes.object,
yh_exposureData: React.PropTypes.object,
yh_exposureData: PropTypes.object,
},
... ...
... ... @@ -24,6 +24,7 @@ var TouchableWithoutFeedback = require('TouchableWithoutFeedback');
var ensurePositiveDelayProps = require('ensurePositiveDelayProps');
var flattenStyle = require('flattenStyle');
var createReactClass = require('create-react-class');
type Event = Object;
... ... @@ -51,7 +52,7 @@ var PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
* },
* ```
*/
var TouchableOpacity = React.createClass({
var TouchableOpacity = createReactClass({
mixins: [TimerMixin, Touchable.Mixin, NativeMethodsMixin],
propTypes: {
... ... @@ -67,7 +68,7 @@ var TouchableOpacity = React.createClass({
*/
tvParallaxProperties: PropTypes.object,
yh_exposureData: React.PropTypes.object,
yh_exposureData: PropTypes.object,
},
getDefaultProps: function() {
... ...
... ... @@ -20,6 +20,7 @@ const ReactNativeFeatureFlags = require('ReactNativeFeatureFlags');
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewAttributes = require('ReactNativeViewAttributes');
const ViewPropTypes = require('ViewPropTypes');
var createReactClass = require('create-react-class');
const invariant = require('fbjs/lib/invariant');
const warning = require('fbjs/lib/warning');
... ... @@ -81,7 +82,7 @@ const forceTouchAvailable = (NativeModules.PlatformConstants &&
* - `touches` - Array of all current touches on the screen.
*/
// $FlowFixMe(>=0.41.0)
const View = React.createClass({
const View = createReactClass({
// TODO: We should probably expose the mixins, viewConfig, and statics publicly. For example,
// one of the props is of type AccessibilityComponentType. That is defined as a const[] above,
// but it is not rendered by the docs, since `statics` below is not rendered. So its Possible
... ...
... ... @@ -23,6 +23,7 @@ const StyleSheet = require('StyleSheet');
const StyleSheetPropType = require('StyleSheetPropType');
const View = require('View');
const ViewStylePropTypes = require('ViewStylePropTypes');
var createReactClass = require('create-react-class');
const dismissKeyboard = require('dismissKeyboard');
const flattenStyle = require('flattenStyle');
... ... @@ -46,7 +47,7 @@ const requireNativeComponent = require('requireNativeComponent');
* Doesn't yet support other contained responders from blocking this scroll
* view from becoming the responder.
*/
const ScrollView = React.createClass({
const ScrollView = createReactClass({
propTypes: {
...View.propTypes,
/**
... ... @@ -339,7 +340,7 @@ const ScrollView = React.createClass({
/**
埋点
??????
*/
yh_exposureData: PropTypes.any,
yh_viewVisible: PropTypes.bool,
... ...
... ... @@ -2,7 +2,9 @@
* react-native-swiper
* @author leecade<leecade@163.com>
*/
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
import {
Text,
View,
... ... @@ -91,7 +93,7 @@ const styles = {
}
// missing `module.exports = exports['default'];` with babel6
// export default React.createClass({
// export default createReactClass({
export default class extends Component {
/**
* Props Validation
... ... @@ -504,7 +506,7 @@ export default class extends Component {
if (this.props.loop ||
this.state.index !== this.state.total - 1) {
button = this.props.nextButton || <Text style={styles.buttonText}></Text>
button = this.props.nextButton || <Text style={styles.buttonText}>???</Text>
}
return (
... ... @@ -520,7 +522,7 @@ export default class extends Component {
let button = null
if (this.props.loop || this.state.index !== 0) {
button = this.props.prevButton || <Text style={styles.buttonText}></Text>
button = this.props.prevButton || <Text style={styles.buttonText}>???</Text>
}
return (
... ...
const React = require('react');
const ReactNative = require('react-native');
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
const {
StyleSheet,
Text,
... ... @@ -8,19 +10,19 @@ const {
} = ReactNative;
const Button = require('./Button');
const DefaultTabBar = React.createClass({
const DefaultTabBar = createReactClass({
propTypes: {
goToPage: React.PropTypes.func,
activeTab: React.PropTypes.number,
tabs: React.PropTypes.array,
underlineColor: React.PropTypes.string,
underlineHeight: React.PropTypes.number,
backgroundColor: React.PropTypes.string,
activeTextColor: React.PropTypes.string,
inactiveTextColor: React.PropTypes.string,
goToPage: PropTypes.func,
activeTab: PropTypes.number,
tabs: PropTypes.array,
underlineColor: PropTypes.string,
underlineHeight: PropTypes.number,
backgroundColor: PropTypes.string,
activeTextColor: PropTypes.string,
inactiveTextColor: PropTypes.string,
textStyle: Text.propTypes.style,
tabStyle: View.propTypes.style,
renderTabName: React.PropTypes.func,
renderTabName: PropTypes.func,
},
getDefaultProps() {
... ...
... ... @@ -25,7 +25,7 @@ the animations behind this work, check out the Rebound section of the
```javascript
var ScrollableTabView = require('react-native-scrollable-tab-view');
var App = React.createClass({
var App = createReactClass({
render() {
return (
<ScrollableTabView>
... ... @@ -47,7 +47,7 @@ it into our `ScrollableTabView` like this:
var ScrollableTabView = require('react-native-scrollable-tab-view');
var CustomTabBar = require('./CustomTabBar');
var App = React.createClass({
var App = createReactClass({
render() {
return (
<ScrollableTabView renderTabBar={() => <CustomTabBar someProp={'here'} />}>
... ...
const React = require('react');
const ReactNative = require('react-native');
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
const {
View,
Animated,
... ... @@ -13,22 +15,22 @@ const Button = require('./Button');
const WINDOW_WIDTH = Dimensions.get('window').width;
const ScrollableTabBar = React.createClass({
const ScrollableTabBar = createReactClass({
propTypes: {
goToPage: React.PropTypes.func,
activeTab: React.PropTypes.number,
tabs: React.PropTypes.array,
underlineColor: React.PropTypes.string,
underlineHeight: React.PropTypes.number,
backgroundColor: React.PropTypes.string,
activeTextColor: React.PropTypes.string,
inactiveTextColor: React.PropTypes.string,
scrollOffset: React.PropTypes.number,
goToPage: PropTypes.func,
activeTab: PropTypes.number,
tabs: PropTypes.array,
underlineColor: PropTypes.string,
underlineHeight: PropTypes.number,
backgroundColor: PropTypes.string,
activeTextColor: PropTypes.string,
inactiveTextColor: PropTypes.string,
scrollOffset: PropTypes.number,
style: View.propTypes.style,
tabStyle: View.propTypes.style,
tabsContainerStyle: View.propTypes.style,
textStyle: Text.propTypes.style,
renderTabName: React.PropTypes.func,
renderTabName: PropTypes.func,
},
getDefaultProps() {
... ...
const React = require('react');
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
const {
PropTypes,
Component,
} = React;
const ReactNative = require('react-native');
... ... @@ -21,7 +23,7 @@ const DefaultTabBar = require('./DefaultTabBar');
const ScrollableTabBar = require('./ScrollableTabBar');
const ScrollableTabView = React.createClass({
const ScrollableTabView = createReactClass({
mixins: [TimerMixin, ],
statics: {
DefaultTabBar,
... ...
... ... @@ -2,7 +2,8 @@
* react-native-swiper
* @author leecade<leecade@163.com>
*/
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
Text,
View,
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -104,7 +105,7 @@ function getInitialState() {
export default function community(platform) {
let YH_Community = React.createClass({
let YH_Community = createReactClass({
contanerIsYohoBuy() {
return parseInt(this.props.container) === 1;
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import YH_Swiper from '../../../common/components/YH_Swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
... ... @@ -19,14 +20,14 @@ export default class Banner extends React.Component {
static propTypes = {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
duration: React.PropTypes.number,
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
onPress: React.PropTypes.func,
duration: PropTypes.number,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
onPress: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Banner from './Banner';
... ... @@ -36,26 +37,26 @@ export default class Home extends React.Component {
progressing: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
uploadState:React.PropTypes.number.isRequired,
progress:React.PropTypes.number,
image:React.PropTypes.string,
onPressRetry:React.PropTypes.func,
onPressDelete:React.PropTypes.func,
uploadState:PropTypes.number.isRequired,
progress:PropTypes.number,
image:PropTypes.string,
onPressRetry:PropTypes.func,
onPressDelete:PropTypes.func,
}),
),
banner: ImmutablePropTypes.listOf(
ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string,
src: PropTypes.string.isRequired,
url: PropTypes.string,
}),
),
),
notice: ImmutablePropTypes.listOf(
ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
title: React.PropTypes.string.isRequired,
url: React.PropTypes.string,
title: PropTypes.string.isRequired,
url: PropTypes.string,
}),
),
),
... ... @@ -63,27 +64,27 @@ export default class Home extends React.Component {
ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
header: ImmutablePropTypes.contains({
id: React.PropTypes.number.isRequired,
logo: React.PropTypes.string.isRequired,
title: React.PropTypes.string.isRequired,
post: React.PropTypes.string.isRequired,
comment: React.PropTypes.string.isRequired,
like: React.PropTypes.string.isRequired,
id: PropTypes.number.isRequired,
logo: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
post: PropTypes.string.isRequired,
comment: PropTypes.string.isRequired,
like: PropTypes.string.isRequired,
}),
hot: ImmutablePropTypes.contains({
postId: React.PropTypes.number,
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
postId: PropTypes.number,
avatar: PropTypes.string,
title: PropTypes.string,
content: PropTypes.string.isRequired,
}),
new: ImmutablePropTypes.contains({
postId: React.PropTypes.number,
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
postId: PropTypes.number,
avatar: PropTypes.string,
title: PropTypes.string,
content: PropTypes.string.isRequired,
}),
num: ImmutablePropTypes.contains({
onedayAddNum: React.PropTypes.number.isRequired,
onedayAddNum: PropTypes.number.isRequired,
}),
})
),
... ... @@ -91,50 +92,50 @@ export default class Home extends React.Component {
recommendation: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
),
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
msgCount: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
msgCount: PropTypes.string,
}),
bannerDuration: React.PropTypes.number,
noticeOpen: React.PropTypes.oneOf(['Y', 'N']),
noticeDuration: React.PropTypes.number,
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSectionTag: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onUploadRetry: React.PropTypes.func,
onUploadSuccess: React.PropTypes.func,
onUploadDelete: React.PropTypes.func,
onSaveingTheWorld: React.PropTypes.func,
bannerDuration: PropTypes.number,
noticeOpen: PropTypes.oneOf(['Y', 'N']),
noticeDuration: PropTypes.number,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSectionTag: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
onRefresh: PropTypes.func,
onEndReached: PropTypes.func,
onUploadRetry: PropTypes.func,
onUploadSuccess: PropTypes.func,
onUploadDelete: PropTypes.func,
onSaveingTheWorld: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import UserBrief from './UserBrief';
... ... @@ -23,35 +24,35 @@ export default class ListCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
hideSection: React.PropTypes.bool,
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSectionTag: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
hideSection: PropTypes.bool,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSectionTag: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import YH_Swiper from '../../../common/components/YH_Swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
... ... @@ -18,14 +19,14 @@ export default class Notice extends React.Component {
static propTypes = {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
title: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
duration: React.PropTypes.number,
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
onPress: React.PropTypes.func,
duration: PropTypes.number,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
onPress: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -2,7 +2,7 @@
import React from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
const {
View,
Text,
... ... @@ -16,8 +16,8 @@ export default class NumberButton extends React.Component {
static propTypes = {
source: Image.propTypes.source.isRequired,
number: React.PropTypes.number.isRequired,
onPressButton: React.PropTypes.func,
number: PropTypes.number.isRequired,
onPressButton: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -2,7 +2,7 @@
import React from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
const {
View,
Text,
... ... @@ -15,8 +15,8 @@ const {
export default class SectionItem extends React.Component {
static propTypes = {
name: React.PropTypes.string.isRequired,
onPressSection: React.PropTypes.func,
name: PropTypes.string.isRequired,
onPressSection: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
... ... @@ -17,10 +18,10 @@ const {
export default class SuperMan extends React.Component {
static propTypes = {
uid: React.PropTypes.number,
avatar: React.PropTypes.string,
msgCount: React.PropTypes.string,
onSaveingTheWorld: React.PropTypes.func,
uid: PropTypes.number,
avatar: PropTypes.string,
msgCount: PropTypes.string,
onSaveingTheWorld: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import SlicedImage from '../../../common/components/SlicedImage';
... ... @@ -20,9 +21,9 @@ let marginLeft = Math.ceil(width - 34 - thumbHeight * 3) / 2;
export default class Thumbs extends React.Component {
static propTypes = {
data: React.PropTypes.arrayOf(
React.PropTypes.shape({
src: React.PropTypes.string,
data: PropTypes.arrayOf(
PropTypes.shape({
src: PropTypes.string,
})
),
... ...
'use strict'
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import * as Progress from 'react-native-progress';
import ImmutablePropTypes from 'react-immutable-proptypes';
... ... @@ -19,12 +20,12 @@ const {
export default class UploadProgress extends React.Component {
static propTypes = {
uploadState:React.PropTypes.number,
progress:React.PropTypes.number,
image:React.PropTypes.string,
onPressRetry:React.PropTypes.func,
onPressDelete:React.PropTypes.func,
uploadSuccess:React.PropTypes.func,
uploadState:PropTypes.number,
progress:PropTypes.number,
image:PropTypes.string,
onPressRetry:PropTypes.func,
onPressDelete:PropTypes.func,
uploadSuccess:PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,7 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
Text,
... ... @@ -18,11 +18,11 @@ export default class UserBrief extends React.Component {
static propTypes = {
containerStyle: View.propTypes.style,
avatar: React.PropTypes.string,
name: React.PropTypes.string,
timeago: React.PropTypes.string,
isOwner: React.PropTypes.bool,
onPressAvatar: React.PropTypes.func,
avatar: PropTypes.string,
name: PropTypes.string,
timeago: PropTypes.string,
isOwner: PropTypes.bool,
onPressAvatar: PropTypes.func,
};
constructor(props) {
... ...
import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
let {
requireNativeComponent
} = ReactNative;
... ... @@ -31,32 +31,32 @@ class SectionView extends React.Component {
}
SectionView.propTypes = {
items: React.PropTypes.arrayOf(
React.PropTypes.shape({
header: React.PropTypes.shape({
id: React.PropTypes.number.isRequired,
logo: React.PropTypes.string.isRequired,
title: React.PropTypes.string.isRequired,
post: React.PropTypes.string.isRequired,
comment: React.PropTypes.string.isRequired,
like: React.PropTypes.string.isRequired,
items: PropTypes.arrayOf(
PropTypes.shape({
header: PropTypes.shape({
id: PropTypes.number.isRequired,
logo: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
post: PropTypes.string.isRequired,
comment: PropTypes.string.isRequired,
like: PropTypes.string.isRequired,
}),
hot: React.PropTypes.shape({
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
hot: PropTypes.shape({
avatar: PropTypes.string,
title: PropTypes.string,
content: PropTypes.string.isRequired,
}),
new: React.PropTypes.shape({
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
new: PropTypes.shape({
avatar: PropTypes.string,
title: PropTypes.string,
content: PropTypes.string.isRequired,
}),
num: React.PropTypes.shape({
onedayAddNum: React.PropTypes.number.isRequired,
num: PropTypes.shape({
onedayAddNum: PropTypes.number.isRequired,
}),
})
),
onClick: React.PropTypes.func,
onClick: PropTypes.func,
};
let YH_SectionView = requireNativeComponent('YH_SectionView', SectionView);
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import UserBrief from '../home/UserBrief';
... ... @@ -20,20 +21,20 @@ export default class LikeCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
nickName: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
nickName: PropTypes.string,
}),
timeago: React.PropTypes.string,
title: React.PropTypes.string,
timeago: PropTypes.string,
title: PropTypes.string,
post: ImmutablePropTypes.contains({
id: React.PropTypes.number,
thumb: React.PropTypes.string,
sectionId: React.PropTypes.number,
id: PropTypes.number,
thumb: PropTypes.string,
sectionId: PropTypes.number,
}),
}),
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
... ... @@ -17,10 +18,10 @@ const {
export default class MessageIcon extends React.Component {
static propTypes = {
isRedDot: React.PropTypes.bool,
isRedDot: PropTypes.bool,
defaultSource: Image.propTypes.source,
image: React.PropTypes.string,
iconTap: React.PropTypes.func,
image: PropTypes.string,
iconTap: PropTypes.func,
}
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
... ... @@ -24,41 +25,41 @@ export default class MessageCenter extends React.Component {
static propTypes = {
sysMsg: ImmutablePropTypes.contains({
timeagoStr:React.PropTypes.string,
tips:React.PropTypes.string,
isRead: React.PropTypes.bool,
timeagoStr:PropTypes.string,
tips:PropTypes.string,
isRead: PropTypes.bool,
}),
likeMsg: ImmutablePropTypes.contains({
timeagoStr:React.PropTypes.string,
tips:React.PropTypes.string,
isRead: React.PropTypes.bool,
timeagoStr:PropTypes.string,
tips:PropTypes.string,
isRead: PropTypes.bool,
}),
list: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago:React.PropTypes.string,
title:React.PropTypes.string,
reply:React.PropTypes.string,
timeago:PropTypes.string,
title:PropTypes.string,
reply:PropTypes.string,
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
}),
),
onPressSystemMsg: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSection: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onPressSystemCell: React.PropTypes.func,
onPressLikeCell: React.PropTypes.func,
onPressPost: React.PropTypes.func,
onPressSystemMsg: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSection: PropTypes.func,
onRefresh: PropTypes.func,
onPressSystemCell: PropTypes.func,
onPressLikeCell: PropTypes.func,
onPressPost: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LittleRedDotImage from './LittleRedDotImage';
... ... @@ -18,12 +19,12 @@ export default class MsgCenterCatgoryCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
timeagoStr:React.PropTypes.string,
tips:React.PropTypes.string,
isRead: React.PropTypes.bool,
timeagoStr:PropTypes.string,
tips:PropTypes.string,
isRead: PropTypes.bool,
}),
onPressCell: React.PropTypes.func,
onPressCell: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LittleRedDotImage from './LittleRedDotImage';
... ... @@ -19,23 +20,23 @@ export default class MsgCenterNormalCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
nickName: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
nickName: PropTypes.string,
}),
title:React.PropTypes.string,
subTitle:React.PropTypes.string,
timeago:React.PropTypes.string,
isRead: React.PropTypes.bool,
title:PropTypes.string,
subTitle:PropTypes.string,
timeago:PropTypes.string,
isRead: PropTypes.bool,
post:ImmutablePropTypes.contains({
sectionId: React.PropTypes.number,
sectionName: React.PropTypes.string,
sectionId: PropTypes.number,
sectionName: PropTypes.string,
}),
}),
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSection: React.PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSection: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SectionItem from '../home/SectionItem';
... ... @@ -19,23 +20,23 @@ export default class SysMsgCell extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
nickName: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
nickName: PropTypes.string,
}),
title:React.PropTypes.string,
subTitle:React.PropTypes.string,
timeago:React.PropTypes.string,
isRead: React.PropTypes.bool,
title:PropTypes.string,
subTitle:PropTypes.string,
timeago:PropTypes.string,
isRead: PropTypes.bool,
post:ImmutablePropTypes.contains({
sectionId: React.PropTypes.number,
sectionName: React.PropTypes.string,
sectionId: PropTypes.number,
sectionName: PropTypes.string,
}),
}),
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSection: React.PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSection: PropTypes.func,
};
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SysMsgCell from './SysMsgCell';
... ... @@ -27,23 +28,23 @@ export default class SystemMessage extends React.Component {
list: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago:React.PropTypes.string,
title:React.PropTypes.string,
reply:React.PropTypes.string,
timeago:PropTypes.string,
title:PropTypes.string,
reply:PropTypes.string,
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
}),
),
onPressSection: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onPressSection: PropTypes.func,
onRefresh: PropTypes.func,
onEndReached: PropTypes.func,
}
constructor(props) {
... ...
... ... @@ -4,6 +4,7 @@
* 照片选择页面
*/
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
View,
Image,
... ... @@ -22,9 +23,9 @@ let YH_CommunityAssetsPicker = NativeModules.YH_CommunityAssetsPicker;
export default class AssertsPicker extends Component {
static propTypes = {
assets: React.PropTypes.array,
hidden: React.PropTypes.bool,
onSelectedAsset: React.PropTypes.func,
assets: PropTypes.array,
hidden: PropTypes.bool,
onSelectedAsset: PropTypes.func,
};
constructor(props) {
... ...
'use strict'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
... ... @@ -14,11 +15,11 @@ import {
export default class PostingToolBar extends Component {
static propTypes = {
imageCount: React.PropTypes.number,
selectedSectionName: React.PropTypes.string,
onPressImage: React.PropTypes.func,
onPressTrigger: React.PropTypes.func,
onPressSection: React.PropTypes.func,
imageCount: PropTypes.number,
selectedSectionName: PropTypes.string,
onPressImage: PropTypes.func,
onPressTrigger: PropTypes.func,
onPressSection: PropTypes.func,
};
constructor(props) {
... ...
'use strict'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
... ... @@ -13,15 +14,15 @@ import {
export default class SectionSelector extends Component {
static propTypes = {
sections: React.PropTypes.arrayOf(
React.PropTypes.shape({
forumCode: React.PropTypes.number.isRequired,
forumName: React.PropTypes.string.isRequired,
sections: PropTypes.arrayOf(
PropTypes.shape({
forumCode: PropTypes.number.isRequired,
forumName: PropTypes.string.isRequired,
}),
),
selectedSectionName: React.PropTypes.string.isRequired,
hidden: React.PropTypes.bool,
onPressSection: React.PropTypes.func,
selectedSectionName: PropTypes.string.isRequired,
hidden: PropTypes.bool,
onPressSection: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -2,6 +2,7 @@
import React from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SectionHeader from './SectionHeader';
import Notice from '../home/Notice';
... ... @@ -36,27 +37,27 @@ export default class Section extends React.Component {
static propTypes = {
progressing: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
uploadState:React.PropTypes.number.isRequired,
progress:React.PropTypes.number,
image:React.PropTypes.string,
onPressRetry:React.PropTypes.func,
onPressDelete:React.PropTypes.func,
uploadState:PropTypes.number.isRequired,
progress:PropTypes.number,
image:PropTypes.string,
onPressRetry:PropTypes.func,
onPressDelete:PropTypes.func,
}),
),
header: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
uri: React.PropTypes.string.isRequired,
title: React.PropTypes.string.isRequired,
post: React.PropTypes.string.isRequired,
comment: React.PropTypes.string.isRequired,
like: React.PropTypes.string.isRequired,
uri: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
post: PropTypes.string.isRequired,
comment: PropTypes.string.isRequired,
like: PropTypes.string.isRequired,
}),
),
notice: ImmutablePropTypes.listOf(
ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
title: React.PropTypes.string.isRequired,
url: React.PropTypes.string,
title: PropTypes.string.isRequired,
url: PropTypes.string,
}),
),
),
... ... @@ -65,68 +66,68 @@ export default class Section extends React.Component {
new: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
})
),
hot: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
})
),
})
),
onPressNotice: React.PropTypes.func,
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSectionTag: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onSaveingTheWorld: React.PropTypes.func,
onPressNotice: PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSectionTag: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
onRefresh: PropTypes.func,
onEndReached: PropTypes.func,
onSaveingTheWorld: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -3,7 +3,7 @@
import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
const {
View,
Text,
... ... @@ -20,12 +20,12 @@ export default class SectionHeader extends React.Component {
static propTypes = {
data: ImmutablePropTypes.contains({
uri: React.PropTypes.string.isRequired,
title: React.PropTypes.string,
desc: React.PropTypes.string.isRequired,
post: React.PropTypes.string.isRequired,
comment: React.PropTypes.string.isRequired,
like: React.PropTypes.string.isRequired,
uri: PropTypes.string.isRequired,
title: PropTypes.string,
desc: PropTypes.string.isRequired,
post: PropTypes.string.isRequired,
comment: PropTypes.string.isRequired,
like: PropTypes.string.isRequired,
}),
};
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ListCell from '../home/ListCell';
... ... @@ -27,28 +28,28 @@ export default class SectionList extends React.Component {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
),
};
... ...
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
const {
... ... @@ -12,15 +13,15 @@ const {
export default class SectionTabBar extends React.Component {
static propTypes = {
containerWidth: React.PropTypes.number,
goToPage: React.PropTypes.func,
activeTab: React.PropTypes.number,
tabs: React.PropTypes.array,
underlineColor: React.PropTypes.string,
underlineHeight: React.PropTypes.number,
backgroundColor: React.PropTypes.string,
activeTextColor: React.PropTypes.string,
inactiveTextColor: React.PropTypes.string,
containerWidth: PropTypes.number,
goToPage: PropTypes.func,
activeTab: PropTypes.number,
tabs: PropTypes.array,
underlineColor: PropTypes.string,
underlineHeight: PropTypes.number,
backgroundColor: PropTypes.string,
activeTextColor: PropTypes.string,
inactiveTextColor: PropTypes.string,
textStyle: Text.propTypes.style,
tabStyle: View.propTypes.style,
};
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
... ... @@ -17,15 +18,15 @@ const {
export default class SPLikeCell extends React.Component {
static propTypes = {
users: React.PropTypes.arrayOf(
React.PropTypes.shape({
nickName: React.PropTypes.string,
headIcon: React.PropTypes.string,
uid: React.PropTypes.number,
users: PropTypes.arrayOf(
PropTypes.shape({
nickName: PropTypes.string,
headIcon: PropTypes.string,
uid: PropTypes.number,
})),
like: React.PropTypes.string,
browse: React.PropTypes.string,
onPressLikeCell: React.PropTypes.func,
like: PropTypes.string,
browse: PropTypes.string,
onPressLikeCell: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ListCell from '../home/ListCell';
import ImmutablePropTypes from 'react-immutable-proptypes';
... ... @@ -23,30 +24,30 @@ export default class CommunityList extends React.Component {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
),
onPressPost: React.PropTypes.func,
onPressPost: PropTypes.func,
};
constructor(props) {
... ...
'use strict';
import React, {Component} from 'react'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
StyleSheet,
View,
... ... @@ -10,7 +11,7 @@ import {
export default class EmptyListTip extends Component {
static propTypes = {
text: React.PropTypes.string,
text: PropTypes.string,
};
static defaultProps = {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
// import SlicedImage from '../../../common/components/SlicedImage';
... ... @@ -17,8 +18,8 @@ const {
export default class MessageIcon extends React.Component {
static propTypes = {
msgCount: React.PropTypes.string,
iconTap: React.PropTypes.func,
msgCount: PropTypes.string,
iconTap: PropTypes.func,
}
constructor(props) {
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import UserBrief from '../home/UserBrief';
... ... @@ -20,42 +21,42 @@ export default class ReplyCell extends React.Component {
data: ImmutablePropTypes.contains({
self: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
backgroundImage: PropTypes.string,
}),
createTime: React.PropTypes.number,
timeago: React.PropTypes.string,
createTime: PropTypes.number,
timeago: PropTypes.string,
replyToUser: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
backgroundImage: PropTypes.string,
}),
replyContent: ImmutablePropTypes.contains({
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
desc: React.PropTypes.string,
desc: PropTypes.string,
}),
postInfo: ImmutablePropTypes.contains({
type: React.PropTypes.string,
title: React.PropTypes.string,
postId: React.PropTypes.number,
type: PropTypes.string,
title: PropTypes.string,
postId: PropTypes.number,
}),
}),
onPressAvatar: React.PropTypes.func,
onPressReply: React.PropTypes.func,
onPressPost: React.PropTypes.func,
onPressAvatar: PropTypes.func,
onPressReply: PropTypes.func,
onPressPost: PropTypes.func,
};
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import ScrollableTabView, {DefaultTabBar} from 'react-native-scrollable-tab-view';
import ImmutablePropTypes from 'react-immutable-proptypes';
... ... @@ -38,11 +39,11 @@ export default class User extends React.Component {
userInfo: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
nickName: React.PropTypes.string.isRequired,
sign: React.PropTypes.string,
msgCount: React.PropTypes.string,
avatar: PropTypes.string,
backgroundImage: PropTypes.string,
nickName: PropTypes.string.isRequired,
sign: PropTypes.string,
msgCount: PropTypes.string,
}),
),
... ... @@ -51,90 +52,90 @@ export default class User extends React.Component {
posts: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
})
),
like: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
})
),
reply: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
self: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
backgroundImage: PropTypes.string,
}),
createTime: React.PropTypes.number,
timeago: React.PropTypes.string,
createTime: PropTypes.number,
timeago: PropTypes.string,
replyToUser: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
backgroundImage: PropTypes.string,
}),
replyContent: ImmutablePropTypes.contains({
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
desc: React.PropTypes.string,
desc: PropTypes.string,
}),
postInfo: ImmutablePropTypes.contains({
type: React.PropTypes.string,
title: React.PropTypes.string,
postId: React.PropTypes.number,
type: PropTypes.string,
title: PropTypes.string,
postId: PropTypes.number,
}),
}),
... ... @@ -144,13 +145,13 @@ export default class User extends React.Component {
})
),
onPressUserAvatar: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
onPressPost: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onRefresh: React.PropTypes.func,
onPressUserAvatar: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
onPressPost: PropTypes.func,
onEndReached: PropTypes.func,
onRefresh: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,7 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import SlicedImage from '../../../common/components/SlicedImage';
import PropTypes from 'prop-types';
const {
View,
Image,
... ... @@ -21,13 +21,13 @@ export default class UserCenterTop extends React.Component {
static propTypes = {
userInfo: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
nickName: React.PropTypes.string.isRequired,
sign: React.PropTypes.string,
avatar: PropTypes.string,
backgroundImage: PropTypes.string,
nickName: PropTypes.string.isRequired,
sign: PropTypes.string,
}),
onPressUserAvatar: React.PropTypes.func,
onPressBackgroundImg: React.PropTypes.func,
onPressUserAvatar: PropTypes.func,
onPressBackgroundImg: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -4,7 +4,7 @@ import React from 'react';
import ReactNative from 'react-native';
import ScrollableTabView from 'react-native-scrollable-tab-view';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import UserCenterTop from '../user/UserCenterTop';
import ListCell from '../home/ListCell';
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
... ... @@ -31,44 +31,44 @@ export default class UserThatNotMe extends React.Component {
static propTypes = {
user: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
backgroundImage: React.PropTypes.string,
nickName: React.PropTypes.string.isRequired,
sign: React.PropTypes.string,
avatar: PropTypes.string,
backgroundImage: PropTypes.string,
nickName: PropTypes.string.isRequired,
sign: PropTypes.string,
}),
posts: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
author: ImmutablePropTypes.contains({
avatar: React.PropTypes.string,
uid: React.PropTypes.number,
name: React.PropTypes.string,
avatar: PropTypes.string,
uid: PropTypes.number,
name: PropTypes.string,
}),
timeago: React.PropTypes.string.isRequired,
isOwner: React.PropTypes.bool,
isTop: React.PropTypes.bool,
isLike: React.PropTypes.bool,
id: React.PropTypes.number,
title: React.PropTypes.string,
desc: React.PropTypes.string,
timeago: PropTypes.string.isRequired,
isOwner: PropTypes.bool,
isTop: PropTypes.bool,
isLike: PropTypes.bool,
id: PropTypes.number,
title: PropTypes.string,
desc: PropTypes.string,
thumbs: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string,
src: PropTypes.string,
})
),
section: ImmutablePropTypes.contains({
id: React.PropTypes.number,
name: React.PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
}),
commentCount: React.PropTypes.number,
likeCount: React.PropTypes.number,
commentCount: PropTypes.number,
likeCount: PropTypes.number,
}),
),
onPressPost: React.PropTypes.func,
onPressAvatar: React.PropTypes.func,
onPressSectionTag: React.PropTypes.func,
onPressComment: React.PropTypes.func,
onPressLike: React.PropTypes.func,
onEndReached: React.PropTypes.func,
onPressPost: PropTypes.func,
onPressAvatar: PropTypes.func,
onPressSectionTag: PropTypes.func,
onPressComment: PropTypes.func,
onPressLike: PropTypes.func,
onEndReached: PropTypes.func,
};
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -42,7 +43,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Coupon = React.createClass({
let YH_Coupon = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
import React, {Component} from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
let { requireNativeComponent } = ReactNative;
// requireNativeComponent automatically resolves this to "YH_BannerViewManager"
... ... @@ -30,14 +30,14 @@ class BannerView extends React.Component {
}
BannerView.propTypes = {
autoLooping: React.PropTypes.bool,
items: React.PropTypes.arrayOf(
React.PropTypes.shape({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
autoLooping: PropTypes.bool,
items: PropTypes.arrayOf(
PropTypes.shape({
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
onSelectBanner: React.PropTypes.func,
onSelectBanner: PropTypes.func,
};
let YH_BannerView = requireNativeComponent('YH_BannerView', BannerView);
... ...
'use strict'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
... ... @@ -91,13 +91,13 @@ export default class Button extends Component {
};
Button.propTypes = {
title: React.PropTypes.string,
selected: React.PropTypes.bool,
onPress: React.PropTypes.func,
selectedTitleStyle: React.PropTypes.any,
normalTitleStyle: React.PropTypes.any,
helightedTitleStyle: React.PropTypes.any,
containerStyle: React.PropTypes.any,
title: PropTypes.string,
selected: PropTypes.bool,
onPress: PropTypes.func,
selectedTitleStyle: PropTypes.any,
normalTitleStyle: PropTypes.any,
helightedTitleStyle: PropTypes.any,
containerStyle: PropTypes.any,
};
let styles = StyleSheet.create({
... ...
'use strict';
import React, {Component} from 'react'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
StyleSheet,
View,
... ... @@ -20,15 +21,15 @@ export default class Prompt extends Component {
static propTypes = {
icon: Image.propTypes.source,
overlayColor: React.PropTypes.string,
title: React.PropTypes.string,
titleColor: React.PropTypes.string,
titleFontSize: React.PropTypes.number,
text: React.PropTypes.string,
textColor: React.PropTypes.string,
textFontSize: React.PropTypes.number,
duration: React.PropTypes.number,
onPromptHidden: React.PropTypes.func,
overlayColor: PropTypes.string,
title: PropTypes.string,
titleColor: PropTypes.string,
titleFontSize: PropTypes.number,
text: PropTypes.string,
textColor: PropTypes.string,
textFontSize: PropTypes.number,
duration: PropTypes.number,
onPromptHidden: PropTypes.func,
};
static defaultProps = {
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -36,7 +37,7 @@ function getInitialState() {
export default function native(platform) {
let YH_GlobalHome = React.createClass({
let YH_GlobalHome = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -45,7 +46,7 @@ function getInitialState() {
export default function native(platform) {
let YH_GoodGoodsRecommend = React.createClass({
let YH_GoodGoodsRecommend = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
let {
requireNativeComponent,
View
} = ReactNative;
module.exports = requireNativeComponent('YH_GoodGoodsImagesView', null);
// module.exports = requireNativeComponent('YH_GoodGoodsImagesView', null);
class GoodGoodsImagesView extends React.Component {
... ... @@ -30,8 +30,8 @@ class GoodGoodsImagesView extends React.Component {
}
GoodGoodsImagesView.propTypes = {
items: React.PropTypes.arrayOf(
React.PropTypes.string
items: PropTypes.arrayOf(
PropTypes.string
),
...View.propTypes // 包含默认的View的属性
};
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -49,7 +50,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Guang = React.createClass({
let YH_Guang = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -41,7 +42,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Home = React.createClass({
let YH_Home = createReactClass({
render() {
let channel = this.props.channelId;
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -85,7 +86,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Installment = React.createClass({
let YH_Installment = createReactClass({
render() {
let type = this.props.type;
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -44,7 +45,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Message = React.createClass({
let YH_Message = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -45,7 +46,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Mine = React.createClass({
let YH_Mine = createReactClass({
render() {
const store = configureStore(getInitialState());
store.dispatch(setPlatform(platform));
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -39,7 +40,7 @@ function getInitialState() {
export default function native(platform) {
let YH_MineGuang = React.createClass({
let YH_MineGuang = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -47,7 +48,7 @@ function getInitialState() {
export default function native(platform) {
let YH_MyAssets = React.createClass({
let YH_MyAssets = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -38,7 +39,7 @@ function getInitialState() {
export default function native(platform) {
let YH_NewArrival = React.createClass({
let YH_NewArrival = createReactClass({
render() {
let type = this.props.type;
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import YH_Swiper from '../../../common/components/YH_Swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
... ... @@ -19,10 +20,10 @@ const {
export default class Banner extends React.Component {
static propTypes = {
duration: React.PropTypes.number,
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
onPress: React.PropTypes.func,
duration: PropTypes.number,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
onPress: PropTypes.func,
};
constructor(props) {
... ...
import React from 'react';
import ReactNative from 'react-native';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
let {
requireNativeComponent,
View
... ... @@ -30,10 +30,10 @@ class FeaturedView extends React.Component {
}
FeaturedView.propTypes = {
items: React.PropTypes.arrayOf(
React.PropTypes.any
items: PropTypes.arrayOf(
PropTypes.any
),
onClick: React.PropTypes.func,
onClick: PropTypes.func,
...View.propTypes // 包含默认的View的属性
};
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {AppRegistry, Platform} from 'react-native';
import {Provider, connect} from 'react-redux';
... ... @@ -32,7 +33,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Order = React.createClass({
let YH_Order = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -44,7 +45,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Outlet = React.createClass({
let YH_Outlet = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
const React = require('react');
const ReactNative = require('react-native');
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
const {
View,
Animated,
... ... @@ -14,22 +16,22 @@ import Button from '../../../common/react-native-scrollable-tab-view/Button';
const WINDOW_WIDTH = Dimensions.get('window').width;
const OutletSrollableBar = React.createClass({
const OutletSrollableBar = createReactClass({
propTypes: {
goToPage: React.PropTypes.func,
activeTab: React.PropTypes.number,
tabs: React.PropTypes.array,
underlineColor: React.PropTypes.string,
underlineHeight: React.PropTypes.number,
backgroundColor: React.PropTypes.string,
activeTextColor: React.PropTypes.string,
inactiveTextColor: React.PropTypes.string,
scrollOffset: React.PropTypes.number,
goToPage: PropTypes.func,
activeTab: PropTypes.number,
tabs: PropTypes.array,
underlineColor: PropTypes.string,
underlineHeight: PropTypes.number,
backgroundColor: PropTypes.string,
activeTextColor: PropTypes.string,
inactiveTextColor: PropTypes.string,
scrollOffset: PropTypes.number,
style: View.propTypes.style,
tabStyle: View.propTypes.style,
tabsContainerStyle: View.propTypes.style,
textStyle: Text.propTypes.style,
renderTabName: React.PropTypes.func,
renderTabName: PropTypes.func,
},
getDefaultProps() {
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -45,7 +46,7 @@ function getInitialState() {
export default function native(platform) {
let YH_PersonalInfo = React.createClass({
let YH_PersonalInfo = createReactClass({
render() {
const store = configureStore(getInitialState());
if (this.props.type == 'VIPLevel') {
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -81,7 +82,7 @@ function getInitSegment(type) {
export default function native(platform) {
let YH_Plustar = React.createClass({
let YH_Plustar = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
import React, {Component} from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
let { requireNativeComponent } = ReactNative;
// requireNativeComponent automatically resolves this to "YH_BannerViewManager"
... ... @@ -30,14 +30,14 @@ class BannerView extends React.Component {
}
BannerView.propTypes = {
autoLooping: React.PropTypes.bool,
items: React.PropTypes.arrayOf(
React.PropTypes.shape({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
autoLooping: PropTypes.bool,
items: PropTypes.arrayOf(
PropTypes.shape({
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
onSelectBanner: React.PropTypes.func,
onSelectBanner: PropTypes.func,
};
let YH_BannerView = requireNativeComponent('YH_BannerView', BannerView);
... ...
'use strict'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
... ... @@ -91,13 +91,13 @@ export default class Button extends Component {
};
Button.propTypes = {
title: React.PropTypes.string,
selected: React.PropTypes.bool,
onPress: React.PropTypes.func,
selectedTitleStyle: React.PropTypes.any,
normalTitleStyle: React.PropTypes.any,
helightedTitleStyle: React.PropTypes.any,
containerStyle: React.PropTypes.any,
title: PropTypes.string,
selected: PropTypes.bool,
onPress: PropTypes.func,
selectedTitleStyle: PropTypes.any,
normalTitleStyle: PropTypes.any,
helightedTitleStyle: PropTypes.any,
containerStyle: PropTypes.any,
};
let styles = StyleSheet.create({
... ...
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ReactNative from 'react-native';
import YH_Swiper from '../../../common/components/YH_Swiper';
import ImmutablePropTypes from 'react-immutable-proptypes';
... ... @@ -19,14 +20,14 @@ export default class Banner extends React.Component {
static propTypes = {
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
duration: React.PropTypes.number,
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
onPress: React.PropTypes.func,
duration: PropTypes.number,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
onPress: PropTypes.func,
};
constructor(props) {
... ...
... ... @@ -6,6 +6,7 @@
'use strict';
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import ReactNative, {
View,
Image,
... ... @@ -119,29 +120,29 @@ export default class PlustarList extends Component {
PlustarList.propTypes = {
list: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
id: React.PropTypes.string.isRequired,
brand_title: React.PropTypes.string.isRequired,
id: PropTypes.string.isRequired,
brand_title: PropTypes.string.isRequired,
data: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
)
})
),
head: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
foot: ImmutablePropTypes.listOf(
ImmutablePropTypes.contains({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
onPressRow: React.PropTypes.func,
onPressRow: PropTypes.func,
};
... ...
... ... @@ -5,6 +5,7 @@
'use strict'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
View,
... ... @@ -79,16 +80,16 @@ export default class PlustarSegment extends Component {
PlustarSegment.propTypes = {
content: ImmutablePropTypes.contains({
0: ImmutablePropTypes.contains({
title: React.PropTypes.string.isRequired,
type: React.PropTypes.number,
title: PropTypes.string.isRequired,
type: PropTypes.number,
}),
1: ImmutablePropTypes.contains({
title: React.PropTypes.string.isRequired,
type: React.PropTypes.number,
title: PropTypes.string.isRequired,
type: PropTypes.number,
})
}),
selectedIndex: React.PropTypes.oneOf([0, 1]),
onPressSegment: React.PropTypes.func,
selectedIndex: PropTypes.oneOf([0, 1]),
onPressSegment: PropTypes.func,
};
let containerHeight = 44;
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -77,7 +78,7 @@ function getInitialState() {
export default function native(platform) {
let YH_ProductListRNView = React.createClass({
let YH_ProductListRNView = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -40,7 +41,7 @@ function getInitialState() {
export default function native(platform) {
let YH_QRCode = React.createClass({
let YH_QRCode = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
import React, {Component} from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
let { requireNativeComponent } = ReactNative;
// requireNativeComponent automatically resolves this to "YH_BannerViewManager"
... ... @@ -30,14 +30,14 @@ class BannerView extends React.Component {
}
BannerView.propTypes = {
autoLooping: React.PropTypes.bool,
items: React.PropTypes.arrayOf(
React.PropTypes.shape({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
autoLooping: PropTypes.bool,
items: PropTypes.arrayOf(
PropTypes.shape({
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
onSelectBanner: React.PropTypes.func,
onSelectBanner: PropTypes.func,
};
let YH_BannerView = requireNativeComponent('YH_BannerView', BannerView);
... ...
'use strict'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
... ... @@ -91,13 +91,13 @@ export default class Button extends Component {
};
Button.propTypes = {
title: React.PropTypes.string,
selected: React.PropTypes.bool,
onPress: React.PropTypes.func,
selectedTitleStyle: React.PropTypes.any,
normalTitleStyle: React.PropTypes.any,
helightedTitleStyle: React.PropTypes.any,
containerStyle: React.PropTypes.any,
title: PropTypes.string,
selected: PropTypes.bool,
onPress: PropTypes.func,
selectedTitleStyle: PropTypes.any,
normalTitleStyle: PropTypes.any,
helightedTitleStyle: PropTypes.any,
containerStyle: PropTypes.any,
};
let styles = StyleSheet.create({
... ...
... ... @@ -5,6 +5,7 @@
// 仿佛兮若轻云之蔽月,飘摇兮若流风之回雪。
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -52,7 +53,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Recorder = React.createClass({
let YH_Recorder = createReactClass({
_renderContainer() {
if (this.props.type == 'brand') {
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -44,7 +45,7 @@ function getInitialState() {
export default function native(platform) {
let YH_RedPersonBrandView = React.createClass({
let YH_RedPersonBrandView = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -36,7 +37,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Sale = React.createClass({
let YH_Sale = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -37,7 +38,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Search = React.createClass({
let YH_Search = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...
import React, {Component} from 'react';
import ReactNative from 'react-native';
import PropTypes from 'prop-types';
let { requireNativeComponent } = ReactNative;
// requireNativeComponent automatically resolves this to "YH_BannerViewManager"
... ... @@ -30,14 +30,14 @@ class BannerView extends React.Component {
}
BannerView.propTypes = {
autoLooping: React.PropTypes.bool,
items: React.PropTypes.arrayOf(
React.PropTypes.shape({
src: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
autoLooping: PropTypes.bool,
items: PropTypes.arrayOf(
PropTypes.shape({
src: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
})
),
onSelectBanner: React.PropTypes.func,
onSelectBanner: PropTypes.func,
};
let YH_BannerView = requireNativeComponent('YH_BannerView', BannerView);
... ...
'use strict'
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
... ... @@ -91,13 +91,13 @@ export default class Button extends Component {
};
Button.propTypes = {
title: React.PropTypes.string,
selected: React.PropTypes.bool,
onPress: React.PropTypes.func,
selectedTitleStyle: React.PropTypes.any,
normalTitleStyle: React.PropTypes.any,
helightedTitleStyle: React.PropTypes.any,
containerStyle: React.PropTypes.any,
title: PropTypes.string,
selected: PropTypes.bool,
onPress: PropTypes.func,
selectedTitleStyle: PropTypes.any,
normalTitleStyle: PropTypes.any,
helightedTitleStyle: PropTypes.any,
containerStyle: PropTypes.any,
};
let styles = StyleSheet.create({
... ...
'use strict';
import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
AppRegistry,
Platform,
... ... @@ -47,7 +48,7 @@ function getInitialState() {
export default function native(platform) {
let YH_Seckill = React.createClass({
let YH_Seckill = createReactClass({
render() {
const store = configureStore(getInitialState());
... ...