UPDATE

上级 5c3fbee2
<script setup>
import baVal = ref(0);
import erzi from './erzi.vue';
const fuValJia = () => {
baVal++;
}
let baVal = "我是来自父组件的值";
</script>
<template>
<button @click="fuValJia">父组件的值加一</button>
<erzi :title="baVal"></erzi>
</template>
<style scoped>
</style>
\ No newline at end of file
<script setup>
const props = defineProps({
title: {
type:String,
default: "默认值"
}
title: String,
});
console.log(props.title);
</script>
<template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册