Browse Source

update example folder structures

Evan You 9 years ago
parent
commit
19dd25d738

+ 1 - 1
examples/chat/components/MessageSection.vue

@@ -14,7 +14,7 @@
 
 <script>
 import Message from './Message.vue'
-import { sendMessage } from '../store/actions'
+import { sendMessage } from '../vuex/actions'
 
 export default {
   components: { Message },

+ 1 - 1
examples/chat/components/Thread.vue

@@ -14,7 +14,7 @@
 </template>
 
 <script>
-import { switchThread } from '../store/actions'
+import { switchThread } from '../vuex/actions'
 
 export default {
   props: ['thread'],

+ 0 - 1
examples/chat/components/ThreadSection.vue

@@ -16,7 +16,6 @@
 </template>
 
 <script>
-import store from '../store'
 import Thread from './Thread.vue'
 
 export default {

+ 2 - 2
examples/chat/main.js

@@ -1,8 +1,8 @@
 import 'babel-polyfill'
 import Vue from 'vue'
 import App from './components/App.vue'
-import store from './store'
-import { getAllMessages } from './store/actions'
+import store from './vuex/store'
+import { getAllMessages } from './vuex/actions'
 
 Vue.config.debug = true
 

+ 0 - 0
examples/chat/store/actions.js → examples/chat/vuex/actions.js


+ 0 - 0
examples/chat/store/mutation-types.js → examples/chat/vuex/mutation-types.js


+ 0 - 0
examples/chat/store/mutations.js → examples/chat/vuex/mutations.js


+ 0 - 0
examples/chat/store/index.js → examples/chat/vuex/store.js


+ 4 - 4
examples/counter-hot/Counter.vue

@@ -12,16 +12,16 @@
 </template>
 
 <script>
-import * as actions from './store/actions'
-import { recentHistory } from './store/getters'
+import * as actions from './vuex/actions'
+import { recentHistory } from './vuex/getters'
 
 export default {
   vuex: {
+    actions,
     state: {
       count: state => state.count,
       recentHistory
-    },
-    actions: actions
+    }
   }
 }
 </script>

+ 1 - 1
examples/counter-hot/main.js

@@ -1,5 +1,5 @@
 import Vue from 'vue'
-import store from './store'
+import store from './vuex/store'
 import Counter from './Counter.vue'
 
 new Vue({

+ 0 - 0
examples/counter-hot/store/actions.js → examples/counter-hot/vuex/actions.js


+ 0 - 0
examples/counter-hot/store/getters.js → examples/counter-hot/vuex/getters.js


+ 0 - 0
examples/counter-hot/store/mutation-types.js → examples/counter-hot/vuex/mutation-types.js


+ 0 - 0
examples/counter-hot/store/mutations.js → examples/counter-hot/vuex/mutations.js


+ 0 - 2
examples/counter-hot/store/index.js → examples/counter-hot/vuex/store.js

@@ -1,8 +1,6 @@
 import Vue from 'vue'
 import Vuex from '../../../src'
-import actions from './actions'
 import mutations from './mutations'
-import getters from './getters'
 
 Vue.use(Vuex)
 

+ 2 - 2
examples/shopping-cart/components/Cart.vue

@@ -14,8 +14,8 @@
 </template>
 
 <script>
-import { checkout } from '../store/actions'
-import { cartProducts } from '../store/getters'
+import { checkout } from '../vuex/actions'
+import { cartProducts } from '../vuex/getters'
 
 export default {
   vuex: {

+ 1 - 1
examples/shopping-cart/components/ProductList.vue

@@ -13,7 +13,7 @@
 </template>
 
 <script>
-import { getAllProducts, addToCart } from '../store/actions'
+import { getAllProducts, addToCart } from '../vuex/actions'
 
 export default {
   vuex: {

+ 1 - 1
examples/shopping-cart/main.js

@@ -1,7 +1,7 @@
 import 'babel-polyfill'
 import Vue from 'vue'
 import App from './components/App.vue'
-import store from './store'
+import store from './vuex/store'
 
 new Vue({
   el: 'body',

+ 0 - 0
examples/shopping-cart/store/actions.js → examples/shopping-cart/vuex/actions.js


+ 0 - 0
examples/shopping-cart/store/getters.js → examples/shopping-cart/vuex/getters.js


+ 0 - 0
examples/shopping-cart/store/modules/cart.js → examples/shopping-cart/vuex/modules/cart.js


+ 0 - 0
examples/shopping-cart/store/modules/products.js → examples/shopping-cart/vuex/modules/products.js


+ 0 - 0
examples/shopping-cart/store/mutation-types.js → examples/shopping-cart/vuex/mutation-types.js


+ 0 - 0
examples/shopping-cart/store/index.js → examples/shopping-cart/vuex/store.js


+ 4 - 4
examples/todomvc/components/App.vue

@@ -51,12 +51,12 @@ import {
   addTodo,
   toggleAll,
   clearCompleted
-} from '../store/actions'
+} from '../vuex/actions'
 
 const filters = {
-  all: (todos) => todos,
-  active: (todos) => todos.filter(todo => !todo.done),
-  completed: (todos) => todos.filter(todo => todo.done)
+  all: todos => todos,
+  active: todos => todos.filter(todo => !todo.done),
+  completed: todos => todos.filter(todo => todo.done)
 }
 
 export default {

+ 1 - 1
examples/todomvc/components/Todo.vue

@@ -23,7 +23,7 @@ import {
   toggleTodo,
   deleteTodo,
   editTodo
-} from '../store/actions'
+} from '../vuex/actions'
 
 export default {
   props: ['todo'],

+ 1 - 1
examples/todomvc/main.js

@@ -1,5 +1,5 @@
 import Vue from 'vue'
-import store from './store'
+import store from './vuex/store'
 import App from './components/App.vue'
 
 new Vue({

+ 0 - 0
examples/todomvc/store/actions.js → examples/todomvc/vuex/actions.js


+ 1 - 1
examples/todomvc/store/middlewares.js → examples/todomvc/vuex/middlewares.js

@@ -1,4 +1,4 @@
-import { STORAGE_KEY } from './index'
+import { STORAGE_KEY } from './store'
 import { createLogger } from '../../../src'
 
 const localStorageMiddleware = {

+ 0 - 0
examples/todomvc/store/mutations.js → examples/todomvc/vuex/mutations.js


+ 0 - 0
examples/todomvc/store/index.js → examples/todomvc/vuex/store.js