feature: implement toast component template
This commit is contained in:
parent
38d56ff5f4
commit
c5a2f73ae3
|
@ -41,6 +41,8 @@ export default defineComponent({
|
|||
|
||||
const shouldShowTitle = computed(() => toast.value.title && toast.value.msg);
|
||||
|
||||
const shouldShowMessageOnly = computed(() => !toast.value.title && toast.value.msg);
|
||||
|
||||
const shouldShowCloseButton = computed(() => {
|
||||
return true;
|
||||
});
|
||||
|
@ -108,6 +110,15 @@ export default defineComponent({
|
|||
{shouldShowButtonsInTitle.value && renderNotifyButtons()}
|
||||
</>
|
||||
)}
|
||||
{shouldShowMessageOnly.value &&
|
||||
(toast.value.buttons ? (
|
||||
<div class="toast-title-btns-wrapper d-flex">
|
||||
<h5 class="toast-title modal-tips-title only-toast-msg" v-html={toast.value.msg}></h5>
|
||||
<div class="after-toast-title text-right ml-auto">{renderNotifyButtons()}</div>
|
||||
</div>
|
||||
) : (
|
||||
<h5 class="toast-title modal-tips-title only-toast-msg" v-html={toast.value.msg}></h5>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
|
Loading…
Reference in New Issue