From fa60fd2bc672ecde50420c2be8ad430954340504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Tue, 8 Jun 2021 09:44:22 +0800 Subject: [PATCH] set ok label default value --- doric-Qt/example/doric/plugin/DoricModalPlugin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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();