Contents
see List
<template>
<section>
<testChild ref="child01" />
</section>
</template>
<script>
import {ref} from "vue";
import testChild from "@/components/main/testChild ";
export default {
components: {
testChild ,
},
setup() {
const child01= ref(null); //템플릿의 ref 명과 변수명을 일치
const child01_call = (testValue) => {
child01.value.func_call(testValue); //자식 컴포넌트에 정의된 함수명 호출
}
return {
child01 //중요 필수사항
}
},
}
</script>
<style scoped>
</style>
Comments ( 0 )