/
githubmirror
/
taro
Обзор
Документация
Войти
/
githubmirror
/
taro
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/mini-program-example/src/pages/api/basics/performance/index.tsx
54 строки
1 KB
刘阳
同步harmony最新开发分支的代码:例子程序
02 апр 2024, 09:33
02 апр 2024, 09:33
d958330
Код
Авторство
О чём код?
import React from 'react' import Taro from '@tarojs/taro' import { View } from '@tarojs/components' import { TestConsole } from '@/util/util' import ButtonList from '@/components/buttonList' import './index.scss' /** * 基础-性能 * @returns */ export default class Index extends React.Component { state = { list: [ { id: 'reportPerformance', func: null, }, { id: 'getPerformance', func: (apiIndex) => { TestConsole.consoleTest('Taro.getPerformance') const performance = Taro.getPerformance() TestConsole.consoleSuccess.call(this, performance, apiIndex) }, }, { id: 'EntryList', func: null, }, { id: 'Performance', func: null, }, { id: 'PerformanceEntry', func: null, }, { id: 'PerformanceObserver', func: null, }, ], } render() { const { list } = this.state return ( <View className='api-page'> <ButtonList buttonList={list} /> </View> ) } }