console
<!DOCTYPE html>
<html lang="en">
<head>
<title>propsData Option</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
<h1>propsData Option</h1>
<hr>
<header></header>
<script type="text/javascript">
var header_a = Vue.extend({
template: `<p>{{message}}-{{a}}</p>`,
data() {
return {
message: "Hello , I am header!"
}
},
props:['a']
})
new header_a({propsData:{a:1}}).$mount("header");
</script>
</body>
</html>