<template> <view class="page"> <text class="mb-10">component lifecycle 选项式 API</text> <child-component /> </view> </template> <script lang='uts'> import ChildComponent from './ChildComponentOptions.uvue' import { state } from '@/store/index.uts' export default { components: { ChildComponent }, methods: { // 自动化测试 getLifeCycleNum(): number { return state.lifeCycleNum }, }, } </script>