Skip to content

Instantly share code, notes, and snippets.

@ariera
Created March 6, 2017 07:04
Show Gist options
  • Save ariera/65f9a987d96b67a386bfb670f236cd0b to your computer and use it in GitHub Desktop.
Save ariera/65f9a987d96b67a386bfb670f236cd0b to your computer and use it in GitHub Desktop.
vue-devtools issue #273
<!doctype html>
<html>
<head>
<title>Vue Devtools Bug</title>
</head>
<body>
<div id="app">
<my-component :model="myModel"></my-component>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.10/vue.js"></script>
<script>
class MyModel {
constructor(){
this.message = "hi there";
}
}
Vue.component("my-component", {
props:{
model: {
required: true,
type: MyModel
}
},
template: `
<div>
{{ model.message }}
</div>
`,
})
new Vue({
el: '#app',
data: {
myModel: new MyModel,
},
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment