|
@@ -4,7 +4,7 @@
|
|
|
<!-- 3.使用组件 -->
|
|
<!-- 3.使用组件 -->
|
|
|
<Demo1 ref="getMain"></Demo1>
|
|
<Demo1 ref="getMain"></Demo1>
|
|
|
<br>
|
|
<br>
|
|
|
- <Demo2></Demo2>
|
|
|
|
|
|
|
+ <Demo2 :age="3" :dd="xxx"></Demo2>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -13,6 +13,11 @@
|
|
|
import Demo1 from './components/Demo1.vue';
|
|
import Demo1 from './components/Demo1.vue';
|
|
|
import Demo2 from './components/Demo2.vue';
|
|
import Demo2 from './components/Demo2.vue';
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ xxx:"你好"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 2.组件的注册
|
|
// 2.组件的注册
|
|
|
components:{
|
|
components:{
|
|
|
Demo1,
|
|
Demo1,
|