Home > front end >  2. Use the prop will vue array data [' HTML ', 'CSS', 'JavaScript'] to
2. Use the prop will vue array data [' HTML ', 'CSS', 'JavaScript'] to

Time:11-13

 


<meta charset="utf-8" & gt;
<meta name="viewport" content="width=device - width, initial - scale=1.0" & gt;
Document
<script SRC="https://bbs.csdn.net/topics/js/vue.js" & gt; </script>
<style>

</style>

<body>


& lt; div>

1. {{HTML}} & lt;/p>

2. {{CSS}} & lt;/p>

JavaScript 3. {{}} & lt;/p>




<script>
Vue.com ponent (' my - item, {
Props: [' HTML ', 'CSS', 'JavaScript'],
The template: '# item'
})
Var=new vm Vue ({
El: '# app,
Data: {
HTML: 'HTML',
CSS: 'CSS',
JavaScript: 'JavaScript'
}
})
</script>

Effect of why I can not come?

CodePudding user response:

Values outside with a single pack again, otherwise it will seek properties or methods in the current name: HTML, CSS, JavaScript,
 

  • Related