Created
March 6, 2017 07:04
-
-
Save ariera/65f9a987d96b67a386bfb670f236cd0b to your computer and use it in GitHub Desktop.
vue-devtools issue #273
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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