diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-27 15:31:20 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-27 15:31:20 +0300 |
| commit | 9b026572cf8af4ecd6afaf59660f3fe1897a93c1 (patch) | |
| tree | c129572b9c002b0eff05a0ae11438ccf9eb24b13 /web/html/common | |
| parent | 6b34a3ae132b49e9ba09ef46aef4badd1ca1dfa6 (diff) | |
close modal only after success msg
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/common')
| -rw-r--r-- | web/html/common/prompt_modal.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/html/common/prompt_modal.html b/web/html/common/prompt_modal.html index edfad682..b91ede03 100644 --- a/web/html/common/prompt_modal.html +++ b/web/html/common/prompt_modal.html @@ -1,6 +1,7 @@ {{define "promptModal"}} <a-modal id="prompt-modal" v-model="promptModal.visible" :title="promptModal.title" :closable="true" @ok="promptModal.ok" :mask-closable="false" + :confirm-loading="promptModal.confirmLoading" :ok-text="promptModal.okText" cancel-text='{{ i18n "cancel" }}' :class="themeSwitcher.currentTheme"> <a-input id="prompt-modal-input" :type="promptModal.type" v-model="promptModal.value" @@ -17,6 +18,7 @@ value: '', okText: '{{ i18n "sure"}}', visible: false, + confirmLoading: false, keyEnter(e) { if (this.type !== 'textarea') { e.preventDefault(); @@ -30,7 +32,6 @@ } }, ok() { - promptModal.close(); promptModal.confirm(promptModal.value); }, confirm() {}, @@ -53,7 +54,10 @@ }, close() { this.visible = false; - } + }, + loading(loading=true) { + this.confirmLoading = loading; + }, }; const promptModalApp = new Vue({ |
