Skip to content

Commit

Permalink
get it running
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 21, 2016
1 parent 62cc1ca commit 2ac4afc
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 23 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"selenium-server": "2.52.0",
"stylus-loader": "^1.4.0",
"url-loader": "^0.5.6",
"vue": "^2.0.0-alpha.5",
"vue-hot-reload-api": "^1.2.1",
"vue-html-loader": "^1.0.0",
"vue-loader": "^8.0.0",
"vue-loader": "^9.0.1",
"vue-style-loader": "^1.0.0",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.1"
Expand Down
4 changes: 3 additions & 1 deletion shells/chrome/devtools.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
</style>
</head>
<body>
<div id="container"></div>
<div id="container">
<div id="app"></div>
</div>
<script src="./build/devtools.js"></script>
</body>
</html>
4 changes: 3 additions & 1 deletion shells/dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
</head>
<body>
<iframe id="target" name="target" src="target.html"></iframe>
<div id="container"></div>
<div id="container">
<div id="app"></div>
</div>
<script src="build/devtools.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions shells/dev/target.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<title></title>
</head>
<body>
<div id="app"></div>
<script src="build/hook.js"></script>
<script src="build/target.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion shells/dev/target/Other.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
},
components: {
mine: {
template: 'This is a fragment instance',
render: h => h('div', null, 'mine'),
data () {
return {
// testing all data types
Expand Down
5 changes: 3 additions & 2 deletions shells/dev/target/Target.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div id="target">
<h1>{{msg}}</h1>
<h1>{{localMsg}}</h1>
<button class="add" @click="add">Add</button>
<button class="remove" @click="rm">Remove</button>
<input v-model="msg">
<input v-model="localMsg">
<other v-for="item in items" track-by="$index"></other>
</div>
</template>
Expand All @@ -18,6 +18,7 @@ export default {
},
data() {
return {
localMsg: this.msg,
items: [1, 2]
}
},
Expand Down
17 changes: 8 additions & 9 deletions shells/dev/target/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ circular.self = circular

new Vue({
store,
template: `
<div>
<counter></counter>
<target></target>
<other></other>
</div>
`,
components: { Target, Other, Counter },
render (h) {
return h('div', null, [
h(Counter),
h(Target, {props:{msg:'hi'}}),
h(Other)
])
},
data: {
obj: {
items: items,
circular
}
}
}).$mount().$appendTo('body')
}).$mount('#app')
2 changes: 1 addition & 1 deletion src/devtools/components/ComponentInspector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div v-show="!hasTarget" class="non-selected">
Select a component instance to inspect.
</div>
<div v-else class="main">
<div v-show="hasTarget" class="main">
<section class="top">
<span class="component-name">
<span style="color:#ccc">&lt;</span>
Expand Down
6 changes: 2 additions & 4 deletions src/devtools/components/DataField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</span>
<span class="key">{{ field.key }}</span><span class="colon">:</span>
<span class="value" :class="valueType">{{ formattedValue }}</span>
<div v-if="field.type" class="type {{ field.type | hyphen }}">
<div v-if="field.type" :class="['type', hyphen(field.type)]">
{{ field.type }}
<div class="meta" v-if="field.meta">
<div class="meta-field" v-for="(key, val) in field.meta">
Expand Down Expand Up @@ -121,9 +121,7 @@ export default {
if (this.isExpandableType) {
this.expanded = !this.expanded
}
}
},
filters: {
},
hyphen: v => v.replace(/\s/g, '-')
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/devtools/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ function initApp (shell) {

app = new Vue({
store,
template: '<app></app>',
components: { App }
}).$mount().$appendTo('#container')
render (h) {
return h(App)
}
}).$mount('#app')
})
}

0 comments on commit 2ac4afc

Please sign in to comment.