|
@@ -6,13 +6,13 @@
|
6
|
6
|
</template>
|
7
|
7
|
<script lang="ts" setup>
|
8
|
8
|
import TestCom from "../components/TestCom.vue"
|
9
|
|
-import {ref,onMounted} from 'vue'
|
|
9
|
+import { ref, onMounted } from 'vue'
|
10
|
10
|
const testcomRef = ref()
|
11
|
|
-const getSonHander=()=>{
|
12
|
|
- console.log('获取子组件中的性别', testcomRef.value.sex );
|
13
|
|
- console.log('获取子组件中的其他信息', testcomRef.value.info );
|
|
11
|
+const getSonHander = () => {
|
|
12
|
+ console.log('获取子组件中的性别', testcomRef.value.sex);
|
|
13
|
+ console.log('获取子组件中的其他信息', testcomRef.value.info);
|
14
|
14
|
}
|
15
|
|
-onMounted(()=>{
|
|
15
|
+onMounted(() => {
|
16
|
16
|
getSonHander()
|
17
|
17
|
})
|
18
|
18
|
</script>
|