我有警报功能。我想输入警报以确认此拒绝确认。
export const showAlert = (title: string, body: string, buttons = [{
text: 'Ok', onPress: () => {} }]) => {
Alert.alert(title, body, buttons, { cancelable: true });
};
showAlert(
t("reject_confirmation"),
t("are_you_sure_to_reject_from_tasks"),
[
{
text: t("cancel"),
onPress: () => {},
},
{
text: t("global_reject"),
onPress: async () => {
await this.runActionWithLoad(async () => {
const url = "/Task/RejectByVillage";
await request().post(url, { villageId, taskType: type });
showToast(this.t("global_action_success"));
});
},
},
]
);
在警报功能中,我想从本机添加<TextInput/>