Skip to content

Commit e1b79c8

Browse files
committed
demo修改
1 parent d2e3e87 commit e1b79c8

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

example/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export default class App extends React.Component {
290290
<Button title='addLoginCustomConfig'
291291
onPress={() => {
292292
if(Platform.OS == 'android'){
293-
JVerification.addLoginCustomConfig(customUIWithConfigAndroid, undefined);
293+
JVerification.addLoginCustomConfig(customUIWithConfigAndroid, customViewParams);
294294
} else {
295295
JVerification.addLoginCustomConfig(customUIWithConfigiOS, []);
296296
}
@@ -301,7 +301,7 @@ export default class App extends React.Component {
301301
if(Platform.OS == 'android'){
302302
JVerification.addLoginCustomConfig(androidDialogConfig, undefined);
303303
} else {
304-
JVerification.addLoginCustomConfig(iosDialogConfig, []);
304+
JVerification.addLoginCustomConfig(iosDialogConfig, customViewParams);
305305
}
306306
}}/>
307307

example/CustomView1.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
import React from 'react';
2-
import {StyleSheet, Text, View, TouchableHighlight} from 'react-native';
2+
import {StyleSheet, Text, View,Alert, TouchableHighlight} from 'react-native';
33

44
export default class CustomView1 extends React.Component {
5+
createAlert = (title) =>
6+
Alert.alert(
7+
"提示",
8+
title,
9+
[
10+
{ text: "OK", onPress: () => console.log("OK Pressed") }
11+
]
12+
);
13+
14+
15+
516
render() {
617
return (
718
<View style={styles.container}>
819
<Button title="this is CustomView1"
920
onPress={() =>
10-
console.log("CustomView1 onClicked")
21+
this.createAlert("CustomView1 onClicked")
1122
}/>
1223
</View>
1324
);
1425
}
1526
}
1627

28+
29+
1730
const styles = StyleSheet.create({
1831
container: {
1932
width: 150,

0 commit comments

Comments
 (0)