Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Widgets/Toast.vue
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | export default { | ||||
data.type = 'info' | data.type = 'info' | ||||
if (title !== undefined) { | if (title !== undefined) { | ||||
data.title = title | data.title = title | ||||
} | } | ||||
return this.addToast(data) | return this.addToast(data) | ||||
}, | |||||
message(data) { | |||||
if (data.type === undefined) { | |||||
data.type = 'custom' | |||||
} | |||||
if (data.timeout === undefined) { | |||||
data.timeout = this.defaultTimeout | |||||
} | |||||
return this.addToast(data) | |||||
} | } | ||||
}, | }, | ||||
// Plugin installer method | // Plugin installer method | ||||
install(Vue, options) { | install(Vue, options) { | ||||
const defaultOptions = { | const defaultOptions = { | ||||
defaultType: 'info', | defaultType: 'info', | ||||
defaultTimeout: 5000 | defaultTimeout: 5000 | ||||
} | } | ||||
Show All 12 Lines |