Skip to content

Commit a770d4b

Browse files
committed
bump deps (updates for Vue 2.2)
1 parent 9887d71 commit a770d4b

File tree

4 files changed

+5002
-10
lines changed

4 files changed

+5002
-10
lines changed

examples/todomvc/components/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
:checked="allChecked"
1919
@change="toggleAll({ done: !allChecked })">
2020
<ul class="todo-list">
21-
<todo v-for="todo in filteredTodos" :todo="todo"></todo>
21+
<todo v-for="(todo, index) in filteredTodos" :key="index" :todo="todo"></todo>
2222
</ul>
2323
</section>
2424
<!-- footer -->

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"typescript": "^2.1.5",
6868
"uglify-js": "^2.7.5",
6969
"vue": "^2.1.10",
70-
"vue-loader": "^10.3.0",
70+
"vue-loader": "^11.0.0",
7171
"vue-template-compiler": "^2.1.10",
7272
"webpack": "^2.2.1",
7373
"webpack-dev-middleware": "^1.10.0",

src/index.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import devtoolPlugin from './plugins/devtool'
21
import applyMixin from './mixin'
3-
import { mapState, mapMutations, mapGetters, mapActions } from './helpers'
4-
import { forEachValue, isObject, isPromise, assert } from './util'
2+
import devtoolPlugin from './plugins/devtool'
53
import ModuleCollection from './module/module-collection'
4+
import { forEachValue, isObject, isPromise, assert } from './util'
5+
import { mapState, mapMutations, mapGetters, mapActions } from './helpers'
66

77
let Vue // bind on install
88

@@ -54,7 +54,7 @@ class Store {
5454
}
5555

5656
get state () {
57-
return this._vm.$data.state
57+
return this._vm._data.$$state
5858
}
5959

6060
set state (v) {
@@ -127,7 +127,7 @@ class Store {
127127

128128
replaceState (state) {
129129
this._withCommit(() => {
130-
this._vm.state = state
130+
this._vm._data.$$state = state
131131
})
132132
}
133133

@@ -198,7 +198,9 @@ function resetStoreVM (store, state, hot) {
198198
const silent = Vue.config.silent
199199
Vue.config.silent = true
200200
store._vm = new Vue({
201-
data: { state },
201+
data: {
202+
$$state: state
203+
},
202204
computed
203205
})
204206
Vue.config.silent = silent
@@ -213,7 +215,7 @@ function resetStoreVM (store, state, hot) {
213215
// dispatch changes in all subscribed watchers
214216
// to force getter re-evaluation for hot reloading.
215217
store._withCommit(() => {
216-
oldVm.state = null
218+
oldVm._data.$$state = null
217219
})
218220
}
219221
Vue.nextTick(() => oldVm.$destroy())
@@ -388,7 +390,7 @@ function registerGetter (store, type, rawGetter, local) {
388390
}
389391

390392
function enableStrictMode (store) {
391-
store._vm.$watch('state', () => {
393+
store._vm.$watch(function () { return this._data.$$state }, () => {
392394
assert(store._committing, `Do not mutate vuex store state outside mutation handlers.`)
393395
}, { deep: true, sync: true })
394396
}

0 commit comments

Comments
 (0)