diff --git a/doric-Qt/example/doric/plugin/DoricModalPlugin.cpp b/doric-Qt/example/doric/plugin/DoricModalPlugin.cpp index 4bb64de8..f7cc1cf3 100644 --- a/doric-Qt/example/doric/plugin/DoricModalPlugin.cpp +++ b/doric-Qt/example/doric/plugin/DoricModalPlugin.cpp @@ -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();