Commit 7d5e32fc by zeven

修复去除分页导致修改数量闪退问题

parent 6a49528e
{ {
"name": "zm-face-counter", "name": "zm-face-counter",
"version": "1.2.9", "version": "1.3.1",
"private": true, "private": true,
"scripts": { "scripts": {
"android": "react-native run-android", "android": "react-native run-android",
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
"test": "jest", "test": "jest",
"lint": "eslint --ext .js index.js src", "lint": "eslint --ext .js index.js src",
"apk": "cd android && ./gradlew app:assembleRelease && cp ./app/build/outputs/apk/release/app-release.apk ../fcounter.apk", "apk": "cd android && ./gradlew app:assembleRelease && cp ./app/build/outputs/apk/release/app-release.apk ../fcounter.apk",
"android-staging": "code-push release-react ZmFaceCounter-android android -t '1.0.0' --des '1.2.8'", "android-staging": "code-push release-react ZmFaceCounter-android android -t '1.0.0' --des '1.3.1'",
"android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.2.8'", "android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.3.1'",
"android-history": "code-push deployment history ZmFaceCounter-android Production" "android-history": "code-push deployment history ZmFaceCounter-android Production"
}, },
"pre-commit": [ "pre-commit": [
......
...@@ -411,12 +411,7 @@ class VerticalPage extends Component { ...@@ -411,12 +411,7 @@ class VerticalPage extends Component {
<View style={styles.TdStyle}> <View style={styles.TdStyle}>
{item.numChange ? ( {item.numChange ? (
<Icon <Icon
onPress={() => onPress={() => this.props.numRemove(item.num, index)}
this.props.numRemove(
item.num,
index + (this.props.current - 1) * pageSize,
)
}
name="ios-remove-circle" name="ios-remove-circle"
color={item.num === 1 ? '#909090' : '#00c670'} color={item.num === 1 ? '#909090' : '#00c670'}
size={35} size={35}
...@@ -426,10 +421,7 @@ class VerticalPage extends Component { ...@@ -426,10 +421,7 @@ class VerticalPage extends Component {
)} )}
<Touch <Touch
viewWrap={false} viewWrap={false}
onPress={() => onPress={() => item.numChange && this.props.numChange(index)}>
item.numChange &&
this.props.numChange(index + (this.props.current - 1) * pageSize)
}>
<Text style={styles.TdText}> {item.num} </Text> <Text style={styles.TdText}> {item.num} </Text>
</Touch> </Touch>
{item.numChange ? ( {item.numChange ? (
...@@ -437,12 +429,7 @@ class VerticalPage extends Component { ...@@ -437,12 +429,7 @@ class VerticalPage extends Component {
name="ios-add-circle" name="ios-add-circle"
color="#00c670" color="#00c670"
size={35} size={35}
onPress={() => onPress={() => this.props.numAdd(item.num, index)}
this.props.numAdd(
item.num,
index + (this.props.current - 1) * pageSize,
)
}
/> />
) : ( ) : (
<View /> <View />
...@@ -464,11 +451,7 @@ class VerticalPage extends Component { ...@@ -464,11 +451,7 @@ class VerticalPage extends Component {
name="ios-close-circle" name="ios-close-circle"
size={35} size={35}
color={colors.bg} color={colors.bg}
onPress={() => onPress={() => this.props.removeIndex(index)}
this.props.removeIndex(
index + (this.props.current - 1) * pageSize,
)
}
/> />
</View> </View>
</View> </View>
...@@ -662,10 +645,7 @@ class VerticalPage extends Component { ...@@ -662,10 +645,7 @@ class VerticalPage extends Component {
{item.numChange ? ( {item.numChange ? (
<Icon <Icon
onPress={() => onPress={() =>
this.props.numRemove( this.props.numRemove(item.num, index)
item.num,
index + (this.props.current - 1) * pageSize,
)
} }
name="ios-remove-circle" name="ios-remove-circle"
color={item.num === 1 ? '#909090' : '#00c670'} color={item.num === 1 ? '#909090' : '#00c670'}
...@@ -677,10 +657,7 @@ class VerticalPage extends Component { ...@@ -677,10 +657,7 @@ class VerticalPage extends Component {
<Touch <Touch
viewWrap={false} viewWrap={false}
onPress={() => onPress={() =>
item.numChange && item.numChange && this.props.numChange(index)
this.props.numChange(
index + (this.props.current - 1) * pageSize,
)
}> }>
<Text style={styles.TdText}> {item.num} </Text> <Text style={styles.TdText}> {item.num} </Text>
</Touch> </Touch>
...@@ -689,12 +666,7 @@ class VerticalPage extends Component { ...@@ -689,12 +666,7 @@ class VerticalPage extends Component {
name="ios-add-circle" name="ios-add-circle"
color="#00c670" color="#00c670"
size={35} size={35}
onPress={() => onPress={() => this.props.numAdd(item.num, index)}
this.props.numAdd(
item.num,
index + (this.props.current - 1) * pageSize,
)
}
/> />
) : ( ) : (
<View /> <View />
...@@ -716,11 +688,7 @@ class VerticalPage extends Component { ...@@ -716,11 +688,7 @@ class VerticalPage extends Component {
name="ios-close-circle" name="ios-close-circle"
size={35} size={35}
color={colors.bg} color={colors.bg}
onPress={() => onPress={() => this.props.removeIndex(index)}
this.props.removeIndex(
index + (this.props.current - 1) * pageSize,
)
}
/> />
</View> </View>
</View> </View>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment