vue3-h5-quark-template/src/components/secondcomponent.vue
2016-12-13 16:25:29 +08:00

37 lines
521 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="hello">
<h4>这是子组件</h4>
<p>这是<span>来自父组件</span>的数据{{myMessage}}</p>
</div>
</template>
<script>
export default {
name: 'child',
props: [
'myMessage',
],
// mounted(){
// console.log("子组件打印:",this.myMessage);
// }
}
</script>
<style scoped>
.hello{
margin-top: 30px;
}
h4,p{
color: #41b883;;
text-align: left;
font-size: 20px;
}
p{
font-size: 12px;
}
span{
color: #35495e;
}
</style>