瀏覽代碼

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()
     }
   }