fixed the compatible code of click-through problem in ios
// fix touch to scroll background page on iOS
// https://github.com/ant-design/ant-design-mobile/issues/307
// https://github.com/ant-design/ant-design-mobile/issues/163
const isIPhone = new RegExp("\\biPhone\\b|\\biPod\\b", "i").test(window.navigator.userAgent);
let wrapProps;
if (isIPhone) {
wrapProps = {
onTouchStart: e => e.preventDefault(),
};
}
acitonSheet component click event
showActionSheet = () => {
const BUTTONS = ["Operation1", "Operation2", "Operation2", "Delete", "Cancel"];
ActionSheet.showActionSheetWithOptions({
options: BUTTONS,
cancelButtonIndex: BUTTONS.length - 1,
destructiveButtonIndex: BUTTONS.length - 2,
message: "I am description, description, description",
maskClosable: true,
wrapProps,
},
(buttonIndex) => {
this.setState({ clicked: BUTTONS[buttonIndex] });
});
}
Click to pop up the actions panel component, but clicking on the button inside does not take effect. Everything else is normal