Initial commit
This commit is contained in:
14
store/toast.js
Normal file
14
store/toast.js
Normal file
@@ -0,0 +1,14 @@
|
||||
export const state = () => ({
|
||||
content: '',
|
||||
color: '',
|
||||
timeout: 5000
|
||||
})
|
||||
|
||||
export const mutations = {
|
||||
showMessage (state, {content, color, timeout}) {
|
||||
state.content = content
|
||||
state.color = color
|
||||
if (timeout) state.timeout = timeout
|
||||
else state.timeout = 5000
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user