mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-19 22:49:54 +08:00
26 lines
549 B
Vue
26 lines
549 B
Vue
<template>
|
||
<div class="grand-child">
|
||
<h3>孙组件</h3>
|
||
<h4>a:{{ a }}</h4>
|
||
<h4>b:{{ b }}</h4>
|
||
<h4>c:{{ c }}</h4>
|
||
<h4>d:{{ d }}</h4>
|
||
<h4>x:{{ x }}</h4>
|
||
<h4>y:{{ y }}</h4>
|
||
<button @click="updateA(6)">点我将爷爷那的a更新</button>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts" name="GrandChild">
|
||
defineProps(['a','b','c','d','x','y','updateA'])
|
||
</script>
|
||
|
||
<style scoped>
|
||
.grand-child{
|
||
margin-top: 20px;
|
||
background-color: orange;
|
||
padding: 20px;
|
||
border-radius: 10px;
|
||
box-shadow: 0 0 10px black;
|
||
}
|
||
</style> |