diff --git a/package.json b/package.json index 3be33ec30..37f4afaf1 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "v-tooltip": "^2.0.0-rc.25", "vue": "^2.5.13", "vue-router": "^3.0.1", - "vuex": "^3.0.1" + "vuex": "^3.0.1", + "vuex-router-sync": "^5.0.0" } } diff --git a/shells/dev/target.html b/shells/dev/target.html index 85c9d4caa..b4acd0469 100644 --- a/shells/dev/target.html +++ b/shells/dev/target.html @@ -6,6 +6,7 @@
+
diff --git a/shells/dev/target/index.js b/shells/dev/target/index.js index a6f721d38..7d3cb0085 100644 --- a/shells/dev/target/index.js +++ b/shells/dev/target/index.js @@ -1,5 +1,7 @@ import Vue from 'vue' +import { sync } from 'vuex-router-sync' import store from './store' +import router from './router' import Target from './Target.vue' import Other from './Other.vue' import Counter from './Counter.vue' @@ -7,7 +9,8 @@ import NativeTypes from './NativeTypes.vue' import Events from './Events.vue' import MyClass from './MyClass.js' import Router from './Router.vue' -import router from './router' + +sync(store, router) let items = [] for (var i = 0; i < 100; i++) { @@ -18,6 +21,7 @@ let circular = {} circular.self = circular new Vue({ + name: 'Root', store, router, render (h) { @@ -38,6 +42,28 @@ new Vue({ } }).$mount('#app') +new Vue({ + name: 'App2', + render (h) { + return h('div', { id: 'app2' }, [ + h({ + data () { + return { foo: 'bar' } + }, + beforeCreate () { + this._routerRoot = null + }, + render (h) { + return h('div', [ + h('h1', 'App2'), + h('p', this.foo) + ]) + } + }) + ]) + } +}).$mount('#app2') + // custom element instance const ce = document.querySelector('#shadow') if (ce.attachShadow) { diff --git a/test/specs/test.js b/test/specs/test.js index 8f1188f13..89ec6ecd9 100644 --- a/test/specs/test.js +++ b/test/specs/test.js @@ -4,7 +4,7 @@ module.exports = { }, 'vue-devtools e2e tests': function (browser) { - var baseInstanceCount = 8 + var baseInstanceCount = 10 browser .url('http://localhost:' + (process.env.PORT || 8081)) diff --git a/yarn.lock b/yarn.lock index f4ffbbd2d..81d80ef58 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5639,6 +5639,10 @@ vue@^2.5.13: version "2.5.13" resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.13.tgz#95bd31e20efcf7a7f39239c9aa6787ce8cf578e1" +vuex-router-sync@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/vuex-router-sync/-/vuex-router-sync-5.0.0.tgz#1a225c17a1dd9e2f74af0a1b2c62072e9492b305" + vuex@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.0.1.tgz#e761352ebe0af537d4bb755a9b9dc4be3df7efd2"