Why is it not successful for vue to pass values to components with prop?

the gods help me see what"s wrong

html Code

<body>
<div id="app">
    <mycomponent v-bind:a="a" v-bind:b="b">
    </mycomponent>
</div>
</body>

js Code

 var Parent = Vue.extend({
        prop:["a","b"],
        template :`

{{a}},{{b}}

`, }) Vue.component("mycomponent", Parent) new Vue({ el: "-sharpapp", data:{ "a":"1", "b":"2" } })
May.16,2021

is props, not prop


isn't the official website written?


props keywords


, prepare for the interview questions and check your proficiency


take a good look at the official website

.
Menu