@conecli/cone-render 0.8.15-alpha.23 → 0.8.15-alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  urlCookie
2
+ import Taro from '@tarojs/taro'
3
3
  urlCookie
4
4
  public config: object | null
5
5
  this.config = {}
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro'
2
2
  public config: object | null
3
3
  this.config = {}
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  console.log('=================>', 'updateBusinessDomainAndApi')
2
+ import Taro from '@tarojs/taro'
3
3
  public config: object | null
4
4
  this.config = {}
5
5
  console.log('=================>', 'updateBusinessDomainAndApi')
@@ -1 +1 @@
1
- import React, { useCallback, useEffect, useRef, useState } from 'react'
2
1
  const [componentShowState, setComponentShowState] = useState(false)
3
2
  const componentLazyRef = useRef<HTMLElement | null>(null)
4
3
  const componentShowStateRef = useRef(false)
5
4
  useEffect(() => {
6
5
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
7
6
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
8
7
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
9
8
  !componentShowStateRef.current && dealPageScrollInfo(res)
10
9
  })
11
10
 
12
11
 
13
12
  <View
14
13
  ref={componentLazyRef}
15
14
  className={classNames(
16
15
  imageStyle['d-app-lazy-image'],
17
16
  {
18
17
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
19
18
  },
20
19
  {
21
20
  [imageStyle['d-hide-image-error']]: imageErrState,
22
21
  },
23
22
  {
24
23
  [imageStyle['d-load-completed']]: loadSuccess,
25
24
  },
26
25
  {
27
26
  'd-imag-rendering-crisp-edges':
28
27
  !taroJdBaseInfo.info.pageInfo.isVipShop &&
29
28
  imagRenderingSet,
30
29
  },
31
30
  'J_html5ImageBg',
32
31
  className,
33
32
  )}
34
33
  style={{
35
34
  ...style,
36
35
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
37
36
  >
38
37
  {(componentShowState || lazyLoad === false) && <img
39
38
  src={getQualityImage(
40
39
  imgSrc,
41
40
  taroJdBaseInfo.info.pageInfo.isVipShop
42
41
  ? NetWorkTypeQuality['perfect']
43
42
  : NetWorkTypeQuality[getNetWorkType],
44
43
  )}
45
44
  onLoad={imageLoad.bind(this, imgSrc)}
46
45
  onError={imageError}
47
46
  />}
48
47
  </View>
49
48
  ) : (
50
49
  <Image
51
50
  style={{
52
51
  ...style,
53
52
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
54
53
  }}
55
54
  className={classNames(
56
55
  imageStyle['d-lazy-image'],
57
56
  {
58
57
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
59
58
  },
60
59
  {
61
60
  [imageStyle['d-hide-image-error']]: imageErrState,
62
61
  },
63
62
  {
64
63
  [imageStyle['d-load-completed']]: loadSuccess,
65
64
  },
66
65
  {
67
66
  'd-imag-rendering-crisp-edges': imagRenderingSet,
68
67
  },
69
68
  className,
70
69
  )}
71
70
  src={getQualityImage(
72
71
  imgSrc,
73
72
  NetWorkTypeQuality[getNetWorkType],
74
73
  )}
75
74
  lazyLoad={lazyLoad}
76
75
  onError={imageError}
77
76
  onLoad={imageLoad.bind(this, imgSrc)}
78
77
  {...otherOption}
79
78
  />
80
79
  )
80
+ import React, { useCallback, useEffect, useRef, useState } from 'react'
81
81
  const [componentShowState, setComponentShowState] = useState(false)
82
82
  const componentLazyRef = useRef<HTMLElement | null>(null)
83
83
  const componentShowStateRef = useRef(false)
84
84
  useEffect(() => {
85
85
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
86
86
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
87
87
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
88
88
  !componentShowStateRef.current && dealPageScrollInfo(res)
89
89
  })
90
90
 
91
91
 
92
92
  <View
93
93
  ref={componentLazyRef}
94
94
  className={classNames(
95
95
  imageStyle['d-app-lazy-image'],
96
96
  {
97
97
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
98
98
  },
99
99
  {
100
100
  [imageStyle['d-hide-image-error']]: imageErrState,
101
101
  },
102
102
  {
103
103
  [imageStyle['d-load-completed']]: loadSuccess,
104
104
  },
105
105
  {
106
106
  'd-imag-rendering-crisp-edges':
107
107
  !taroJdBaseInfo.info.pageInfo.isVipShop &&
108
108
  imagRenderingSet,
109
109
  },
110
110
  'J_html5ImageBg',
111
111
  className,
112
112
  )}
113
113
  style={{
114
114
  ...style,
115
115
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
116
116
  >
117
117
  {(componentShowState || lazyLoad === false) && <img
118
118
  src={getQualityImage(
119
119
  imgSrc,
120
120
  taroJdBaseInfo.info.pageInfo.isVipShop
121
121
  ? NetWorkTypeQuality['perfect']
122
122
  : NetWorkTypeQuality[getNetWorkType],
123
123
  )}
124
124
  onLoad={imageLoad.bind(this, imgSrc)}
125
125
  onError={imageError}
126
126
  />}
127
127
  </View>
128
128
  ) : (
129
129
  <Image
130
130
  style={{
131
131
  ...style,
132
132
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
133
133
  }}
134
134
  className={classNames(
135
135
  imageStyle['d-lazy-image'],
136
136
  {
137
137
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
138
138
  },
139
139
  {
140
140
  [imageStyle['d-hide-image-error']]: imageErrState,
141
141
  },
142
142
  {
143
143
  [imageStyle['d-load-completed']]: loadSuccess,
144
144
  },
145
145
  {
146
146
  'd-imag-rendering-crisp-edges': imagRenderingSet,
147
147
  },
148
148
  className,
149
149
  )}
150
150
  src={getQualityImage(
151
151
  imgSrc,
152
152
  NetWorkTypeQuality[getNetWorkType],
153
153
  )}
154
154
  lazyLoad={lazyLoad}
155
155
  onError={imageError}
156
156
  onLoad={imageLoad.bind(this, imgSrc)}
157
157
  {...otherOption}
158
158
  />
159
159
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.8.15-alpha.23",
3
+ "version": "0.8.15-alpha.24",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"