changes
This commit is contained in:
@@ -20,12 +20,17 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
const { $id, $empty, $store } = nuxtApp;
|
||||
const dialog = function (content, title, type, duration, width, height, vbind) {
|
||||
content = typeof content === "string" ? content : JSON.stringify(content);
|
||||
let vtitle = type === "Success" ? `<span class="has-text-primary">${title}</span>` : title;
|
||||
if (type === "Error") vtitle = `<span class="has-text-danger">${title}</span>`;
|
||||
const vtitle =
|
||||
type === "Success"
|
||||
? `<span class="has-text-primary">${title}</span>`
|
||||
: type === "Error"
|
||||
? `<span class="has-text-danger">${title}</span>`
|
||||
: title;
|
||||
|
||||
let data = {
|
||||
id: $id(),
|
||||
component: `dialog/${type || "Info"}`,
|
||||
vbind: { content: content, duration: duration, vbind: vbind },
|
||||
vbind: { content, duration, vbind },
|
||||
title: vtitle,
|
||||
width: width || "600px",
|
||||
height: height || "100px",
|
||||
|
||||
Reference in New Issue
Block a user