-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated examples with latest vue, solve problem with login example no…
…t starting up. and added vuex into call-log example
- Loading branch information
Showing
12 changed files
with
779 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
dist/build.js | ||
.DS_Store | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import BlessedVue from 'blessed-vue' | ||
import Vuex from 'vuex' | ||
|
||
BlessedVue.use(Vuex) | ||
|
||
// root state object. | ||
// each Vuex instance is just a single state tree. | ||
const state = { | ||
logs: '' | ||
} | ||
|
||
// mutations are operations that actually mutates the state. | ||
// each mutation handler gets the entire state tree as the | ||
// first argument, followed by additional payload arguments. | ||
// mutations must be synchronous and can be recorded by plugins | ||
// for debugging purposes. | ||
const mutations = { | ||
appendLog (state, message) { | ||
state.logs += `\n\n${message}` | ||
} | ||
} | ||
|
||
// actions are functions that cause side effects and can involve | ||
// asynchronous operations. | ||
const actions = { | ||
appendLog: ({ commit }, message) => commit('appendLog', message) | ||
} | ||
|
||
// getters are functions | ||
const getters = {} | ||
|
||
// A Vuex instance is created by combining the state, mutations, actions, | ||
// and getters. | ||
export default new Vuex.Store({ | ||
state, | ||
getters, | ||
actions, | ||
mutations | ||
}) |
Oops, something went wrong.