Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target: Add vuex-router-sync and second app without router #510

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
1 change: 1 addition & 0 deletions shells/dev/target.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</head>
<body>
<div id="app"></div>
<div id="app2"></div>
<div id="shadow"></div>
<script src="build/hook.js"></script>
<script src="build/target.js"></script>
Expand Down
28 changes: 27 additions & 1 deletion shells/dev/target/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
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'
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++) {
Expand All @@ -18,6 +21,7 @@ let circular = {}
circular.self = circular

new Vue({
name: 'Root',
store,
router,
render (h) {
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion test/specs/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down