<template> <view class="uni-padding-wrap">
<page-head title="new-page-1" />
<text>onLoad 接收到参数</text> <text>data: {{ data }}</text> </view> </template>
<script lang="ts"> import { state } from '@/store/index.uts' export default { data() { return { data: '', } }, onLoad(options: OnLoadOptions) { if (options.has('data')) { this.data = options.get('data')! } }, methods: { // 自动化测试 getLifeCycleNum(): number { return state.lifeCycleNum }, }, } </script>