소스 검색

feat: 修改onView上报时机

huangzhichao 1 년 전
부모
커밋
314a1c4717
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/plugin/components/custom/index.tsx

+ 1 - 1
src/plugin/components/custom/index.tsx

@@ -235,7 +235,6 @@ function Custom({
 
   useReady(() => {
     loadedMetaFiredInOnce = 0
-    onView()
   })
 
   useGetCustomClient((customClient) => {
@@ -256,6 +255,7 @@ function Custom({
   function onLoadedMetaData() {
     if (loadedMetaFiredInOnce++ < 1) {
       // 上报load
+      onView()
       onLoad()
     }
   }