component-lifecycle.uvue 475 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<template>
  <view class="page">
    <text class="uni-common-mb">component lifecycle</text>
    <component-lifecycle class="component-lifecycle" />
  </view>
</template>

<script setup>
  import ComponentLifecycle from '@/components/CompositionApiLifecycle.uvue'
  import { state } from '@/store/index.uts'

  // 自动化测试
  const getLifeCycleNum = () : number => {
    return state.lifeCycleNum
  }

  defineExpose({
    getLifeCycleNum
  })
</script>