how can i using Dialog in a JS method?
-
hi friends
im want to using quasar dialog in a js mehod, but when call this method , return in OnOK or OnCancel not workingConfirmDialog() { Dialog.create({ title: 'Confirm', message: 'Would you like to turn on the wifi?', ok: { push: true }, cancel: { push: true, color: 'negative' }, persistent: true }).onOk(() => { return 'Ok'; }).onCancel(() => { return 'Cancel'; }).onDismiss(() => { return 'Dismiss'; }) return 'dssd'; }
how can i do it? please help me
-
You can’t return, because QDialog is an object with functions and not a function itself.
Is this kind of what you are looking for?
https://codepen.io/smolinari/pen/vYKKYRY?editors=1010
Scott
-