add msg text
This commit is contained in:
parent
d47fa2bb7d
commit
abccec1321
@ -95,6 +95,7 @@ void DoricModalPlugin::alert(QString jsValueString, QString callbackId) {
|
||||
window->setProperty("callbackId", callbackId);
|
||||
|
||||
window->setProperty("title", titleVal.toString());
|
||||
window->setProperty("msg", msgVal.toString());
|
||||
window->setProperty("okLabel", okBtn.toString());
|
||||
|
||||
QQuickWindow *parentWindow =
|
||||
@ -148,6 +149,7 @@ void DoricModalPlugin::confirm(QString jsValueString, QString callbackId) {
|
||||
window->setProperty("callbackId", callbackId);
|
||||
|
||||
window->setProperty("title", titleVal.toString());
|
||||
window->setProperty("msg", msgVal.toString());
|
||||
window->setProperty("okLabel", okBtn.toString());
|
||||
window->setProperty("cancelLabel", cancelBtn.toString());
|
||||
|
||||
|
@ -13,12 +13,17 @@ Window {
|
||||
property var callbackId
|
||||
|
||||
property var title
|
||||
property var msg
|
||||
property var okLabel
|
||||
|
||||
onTitleChanged: {
|
||||
dialog.title = title
|
||||
}
|
||||
|
||||
onMsgChanged: {
|
||||
content.text = msg
|
||||
}
|
||||
|
||||
onOkLabelChanged: {
|
||||
dialog.standardButton(Dialog.Ok).text = qsTrId(okLabel)
|
||||
}
|
||||
@ -27,6 +32,9 @@ Window {
|
||||
id: dialog
|
||||
standardButtons: Dialog.Ok
|
||||
modal: true
|
||||
contentItem: Text {
|
||||
id: content
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
dialogBridge.onAccepted(pointer, plugin, callbackId)
|
||||
|
@ -13,6 +13,7 @@ Window {
|
||||
property var callbackId
|
||||
|
||||
property var title
|
||||
property var msg
|
||||
property var okLabel
|
||||
property var cancelLabel
|
||||
|
||||
@ -20,6 +21,10 @@ Window {
|
||||
dialog.title = title
|
||||
}
|
||||
|
||||
onMsgChanged: {
|
||||
content.text = msg
|
||||
}
|
||||
|
||||
onOkLabelChanged: {
|
||||
dialog.standardButton(Dialog.Ok).text = qsTrId(okLabel)
|
||||
}
|
||||
@ -32,6 +37,9 @@ Window {
|
||||
id: dialog
|
||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||
modal: true
|
||||
contentItem: Text {
|
||||
id: content
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
dialogBridge.onAccepted(pointer, plugin, callbackId)
|
||||
|
Reference in New Issue
Block a user