UPDATE

上级 425fdfe1
<script setup>
import parent from './page/ziChuanFuVal/parent.vue';
import watchEffect from './page/watchEffect/watchEffect.vue';
import erzi from './page/fuChuanZiVal/erzi.vue';
</script>
<template>
<!-- <parent></parent> -->
<watchEffect></watchEffect>
<!-- <watchEffect></watchEffect> -->
<erzi></erzi>
</template>
<style scoped>
......
<script setup>
import {ref} from 'vue';
import erzi from './erzi.vue';
const babaMsg = ref("我来自父组件");
</script>
<template>
<erzi :chuanBaba="babaMsg"></erzi>
</template>
<style scoped>
</style>
\ No newline at end of file
<script setup>
import {ref, toRefs, defineProps } from "vue";
const getVal = defineProps({
chuanBaba: String,
});
const sss = toRefs(getVal);
</script>
<template>
<div>
获取来自父组件的值:{{ sss }}
</div>
</template>
<style scoped>
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册