Browse Source

feat: 修改onView上报时机

huangzhichao 1 năm trước cách đây
mục cha
commit
314a1c4717
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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()
     }
   }