From 9cf259957fcf83c5672b0005e058aa4fcd33a358 Mon Sep 17 00:00:00 2001 From: hdx Date: Thu, 31 Aug 2023 19:22:42 +0800 Subject: [PATCH] =?UTF-8?q?app.vue:=20=E6=B3=A8=E9=87=8A=20performance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.uvue | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/App.uvue b/App.uvue index 96ec3334..dface834 100644 --- a/App.uvue +++ b/App.uvue @@ -7,16 +7,17 @@ export default { // 自动化测试 setLifeCycleNum(state.lifeCycleNum + 1000) console.log('App Launch') - - const performance = uni.getPerformance() - const observer1: PerformanceObserver = performance.createObserver( - (entryList: PerformanceObserverEntryList) => { - // console.log('observer1:entryList.getEntries()' +JSON.stringify(entryList.getEntries())) - } - ) - observer1.observe({ - entryTypes: ['render', 'navigation'], - } as PerformanceObserverOptions) + + // 页面性能分析 + // const performance = uni.getPerformance() + // const observer1: PerformanceObserver = performance.createObserver( + // (entryList: PerformanceObserverEntryList) => { + // console.log('observer1:entryList.getEntries()' +JSON.stringify(entryList.getEntries())) + // } + // ) + // observer1.observe({ + // entryTypes: ['render', 'navigation'], + // } as PerformanceObserverOptions) }, onShow: function () { // 自动化测试 -- GitLab