set ok label default value

This commit is contained in:
王劲鹏 2021-06-08 09:44:22 +08:00 committed by osborn
parent c8ab358fd7
commit fa60fd2bc6

View File

@ -98,7 +98,11 @@ void DoricModalPlugin::alert(QString jsValueString, QString callbackId) {
window->setProperty("title", titleVal.toString());
window->setProperty("msg", msgVal.toString());
window->setProperty("okLabel", okBtn.toString());
if (okBtn.isString()) {
window->setProperty("okLabel", okBtn.toString());
} else {
window->setProperty("okLabel", "ok");
}
QQuickWindow *parentWindow =
getContext()->getRootNode()->getRootView()->window();