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