feat: 点击发送关闭键盘
This commit is contained in:
parent
067ed73664
commit
7b725c3fcd
@ -251,7 +251,6 @@ const styles = StyleSheet.create({
|
||||
justifyContent: 'space-between',
|
||||
paddingVertical: 16,
|
||||
paddingHorizontal: 16,
|
||||
backgroundColor: 'white',
|
||||
borderBottomWidth: 1,
|
||||
borderBottomColor: 'rgba(0,0,0,0.1)',
|
||||
elevation: 1, // Android
|
||||
@ -279,7 +278,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
contentContainer: {
|
||||
flex: 1,
|
||||
position: 'relative',
|
||||
position: 'relative'
|
||||
},
|
||||
absoluteView: {
|
||||
position: 'absolute',
|
||||
|
||||
@ -85,6 +85,8 @@ export default function SendMessage(props: Props) {
|
||||
}
|
||||
// 将输入框清空
|
||||
setInputValue('');
|
||||
// 关闭键盘
|
||||
Keyboard.dismiss();
|
||||
}
|
||||
}
|
||||
useEffect(() => {
|
||||
@ -102,7 +104,7 @@ export default function SendMessage(props: Props) {
|
||||
timestamp: new Date().toISOString()
|
||||
}])
|
||||
} else {
|
||||
console.log('Keyboard will show1213');
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user