feat:add confirm of modal for Android and iOS

This commit is contained in:
pengfei.zhou
2019-11-20 20:36:01 +08:00
parent 3f5099d29a
commit 2290c8cd48
5 changed files with 114 additions and 5 deletions

View File

@@ -35,5 +35,17 @@ export function modal(context: BridgeContext) {
return context.modal.alert(arg)
}
},
confirm: (arg: string | {
title: string,
msg: string,
okLabel?: string,
cancelLabel?: string,
}) => {
if (typeof arg === 'string') {
return context.modal.confirm({ msg: arg })
} else {
return context.modal.confirm(arg)
}
},
}
}