From 1cda186b1a8424229011bb2cb3ab70e40d6e756a Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 10 Jul 2022 19:52:29 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B4=D0=B8=D0=B0=D0=BB=D0=BE=D0=B3=20askYesNo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/share/StdDialog.vue | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/client/components/share/StdDialog.vue b/client/components/share/StdDialog.vue index 384585df..057299fc 100644 --- a/client/components/share/StdDialog.vue +++ b/client/components/share/StdDialog.vue @@ -55,6 +55,34 @@ + +
+
+
+ +
+
+
+ + + +
+
+ +
+
+
+ +
+ + Нет + + + Да + +
+
+
@@ -262,6 +290,23 @@ class StdDialog { }); } + askYesNo(message, caption, opts) { + return new Promise((resolve) => { + this.init(message, caption, opts); + + this.hideTrigger = () => { + if (this.ok) { + resolve(true); + } else { + resolve(false); + } + }; + + this.type = 'askYesNo'; + this.active = true; + }); + } + prompt(message, caption, opts) { return new Promise((resolve) => { this.enableValidator = false;