|
@@ -7,6 +7,12 @@
|
|
|
<Demo2 name="aa" :age="3" :dd="xxx"></Demo2>
|
|
<Demo2 name="aa" :age="3" :dd="xxx"></Demo2>
|
|
|
<hr>
|
|
<hr>
|
|
|
<Demo3 @getXX="getThing"></Demo3>
|
|
<Demo3 @getXX="getThing"></Demo3>
|
|
|
|
|
+ <hr>
|
|
|
|
|
+ <Demo4></Demo4>
|
|
|
|
|
+ <hr>
|
|
|
|
|
+ <hr>
|
|
|
|
|
+ <Demo5 v-if="isShow"></Demo5>
|
|
|
|
|
+ <button @click="isShow = !isShow">销毁demo5</button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -15,17 +21,22 @@
|
|
|
import Demo1 from './components/Demo1.vue';
|
|
import Demo1 from './components/Demo1.vue';
|
|
|
import Demo2 from './components/Demo2.vue';
|
|
import Demo2 from './components/Demo2.vue';
|
|
|
import Demo3 from './components/Demo3.vue';
|
|
import Demo3 from './components/Demo3.vue';
|
|
|
|
|
+import Demo4 from './components/Demo4.vue';
|
|
|
|
|
+import Demo5 from './components/Demo5.vue';
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- xxx:"你好"
|
|
|
|
|
|
|
+ xxx:"你好",
|
|
|
|
|
+ isShow: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 2.组件的注册
|
|
// 2.组件的注册
|
|
|
components:{
|
|
components:{
|
|
|
Demo1,
|
|
Demo1,
|
|
|
Demo2,
|
|
Demo2,
|
|
|
- Demo3
|
|
|
|
|
|
|
+ Demo3,
|
|
|
|
|
+ Demo4,
|
|
|
|
|
+ Demo5
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
|
aa() {
|
|
aa() {
|