14 lines
284 B
JavaScript
14 lines
284 B
JavaScript
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
|
|
}
|
|
} |