@conecli/cone-render 0.10.1-shop-beta.40 → 0.10.1-shop-beta.42

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 React, { useRef, useEffect } from 'react';
2
1
  isH5AndJdShopView,
3
2
  isAndroidDevice,
4
3
  isJdAndAndroidDevice,
5
4
  isJdAndHarmonyDevice,
6
5
  isJdAndIosDevice,
7
6
  isIosDevice,
8
7
  isJdApp,
9
8
  isWxMin,
10
9
  isH5AndJdShopViewH5Scroll,
11
10
  isH5AndJdShopH5CustomScrollView,
12
11
  isH5,
13
12
  isAppClassifyPage,
14
13
  lodashThrottle,
15
14
  START: 'start',
16
15
  MOVE: 'move',
17
16
  END: 'end',
18
17
  const {
19
18
  scrollX,
20
19
  children,
21
20
  style = {},
22
21
  iosNeedDisableVertical,
23
22
  dispatchTouchMove,
24
23
  className,
25
24
  ...otherProps
26
25
  } = props;
27
26
  const rootEleNode = isH5 && document ? document.querySelector('body') : null;
28
27
  const needShowHighVersion =
29
28
  isH5AndJdShopViewH5Scroll &&
30
29
  !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === 'true');
31
30
  const mLastClientPosRef = useRef({
32
31
  mLastClientX: 0,
33
32
  mLastClientY: 0,
34
33
  });
35
34
  const isJdAndH5ScrollState = needShowHighVersion || isH5AndJdShopH5CustomScrollView;
36
35
 
37
36
  const touchstartEventBubbleFunc = (e) => {
38
37
  const isH5SwiperCustomEle = e?.target?.closest('.J_h5SwiperCustom');
39
38
  if (!isH5SwiperCustomEle) {
40
39
  const hasCustomEle = e
41
40
  ? e?.target?.closest('.J_customScroll') || e?.target?.closest('.J_customLayout')
42
41
  : false;
43
42
  if (isJdAndAndroidDevice && !hasCustomEle) {
44
43
  window?.JdAndroid &&
45
44
  window?.JdAndroid?.requestEvent &&
46
45
  window.JdAndroid.requestEvent(false);
47
46
  }
48
47
  !hasCustomEle &&
49
48
  rootEleNode &&
50
49
  rootEleNode.classList.contains('over-hidden') &&
51
50
  rootEleNode.classList.remove('over-hidden');
52
51
  console.log(
53
52
  'customScrollView所在页面document touch start事件是否有J_customScroll元素',
54
53
  hasCustomEle,
55
54
  '根元素是否有over-hidden',
56
55
  rootEleNode.classList,
57
56
  );
58
57
  }
59
58
  };
60
59
  const touchstartEventCaptureFunc = (e) => {
61
60
  if (e && !e?.target?.closest('.J_h5SwiperCustom') && !e?.target?.closest('.J_customLayout')) {
62
61
  rootEleNode &&
63
62
  rootEleNode.classList.contains('over-hidden') &&
64
63
  rootEleNode.classList.remove('over-hidden');
65
64
  console.log(
66
65
  'customScrollView所在页面document touch start事件捕获阶段移除根元素是否有over-hidden',
67
66
  rootEleNode.classList,
68
67
  );
69
68
  }
70
69
  };
71
70
  useEffect(() => {
72
71
  isJdApp &&
73
72
  !window.JDJshopViewInfo.getAndroidTouchSlopState &&
74
73
  nativePageGetScaledTouchSlop((res) => {
75
74
  console.log('获取安卓系统滑动阈值', res);
76
75
  window.JDJshopViewInfo.androidTouchSlop = res;
77
76
  window.JDJshopViewInfo.getAndroidTouchSlopState = true;
78
77
  });
79
78
  if (isJdAndH5ScrollState && rootEleNode && !rootEleAddEventListenerState) {
80
79
  global?.removeJdAndroidRquestEventForTouchStart &&
81
80
  global.removeJdAndroidRquestEventForTouchStart();
82
81
  rootEleNode.addEventListener('touchstart', touchstartEventBubbleFunc, false);
83
82
 
84
83
  rootEleNode.addEventListener('touchstart', touchstartEventCaptureFunc, true);
85
84
  rootEleAddEventListenerState = true;
86
85
  console.log('customScrollView 初始化document监听完成');
87
86
  }
88
87
  return () => {
89
88
  if (isJdAndH5ScrollState && rootEleNode && rootEleAddEventListenerState) {
90
89
  console.log('customScrollView document监听取消完成');
91
90
  rootEleNode.removeEventListener('touchstart', touchstartEventBubbleFunc, false);
92
91
  rootEleNode.removeEventListener('touchstart', touchstartEventCaptureFunc, true);
93
92
  }
94
93
  };
95
94
  }, []);
96
95
 
97
96
  const androidDeviceStopNativeScrollEvent = (touchType) => {
98
97
  isJdApp &&
99
98
  isAndroidDevice &&
100
99
  window?.JdAndroid &&
101
100
  window?.JdAndroid?.requestEvent &&
102
101
  window.JdAndroid.requestEvent(touchType === TouchType.START);
103
102
  console.log('触发window?.JdAndroid.requestEvent', touchType === TouchType.START, touchType);
104
103
  };
105
104
  const iosDeviceStopNativeScrollEvent = (e, touchType, sendIosState = true) => {
106
105
  sendIosState && iosDeviceSendRouter(touchType);
107
106
  };
108
107
 
109
108
  const iosDeviceSendRouter = (state: string) => {
110
109
  window?.webkit?.messageHandlers?.MobileNavi?.postMessage?.({
111
110
  method: 'callRouterModuleWithParams',
112
111
  params: {
113
112
  routerURL: 'router://JDShopModule/processShoph5SlideState',
114
113
  routerParam: {
115
114
  slideDirection: 'horizontal',
116
115
  needDisableVertical: `${iosNeedDisableVertical}`,
117
116
  state,
118
117
  },
119
118
  callBackId: new Date().getTime(),
120
119
  },
121
120
  });
122
121
  };
123
122
  const stopNativeScrollEvent = (e: Event, touchType, sendIosState = true) => {
124
123
  if (isJdApp) {
125
124
  isIosDevice &&
126
125
  !isAppClassifyPage &&
127
126
  iosDeviceStopNativeScrollEvent(e, touchType, sendIosState);
128
127
  isAndroidDevice && androidDeviceStopNativeScrollEvent(touchType);
129
128
  }
130
129
  };
131
130
 
132
131
  const GetSlideAngle = (dx, dy) => {
133
132
  return (Math.atan2(dy, dx) * 180) / Math.PI;
134
133
  };
135
134
 
136
135
  const GetSlideDirection = (startX, startY, endX, endY) => {
137
136
  const dy = startY - endY;
138
137
  const dx = endX - startX;
139
138
  let result = 0;
140
139
  if (Math.abs(dx) < 2 && Math.abs(dy) < 2) {
141
140
  return result;
142
141
  }
143
142
  const angle = GetSlideAngle(dx, dy);
144
143
  if (angle >= -45 && angle < 45) {
145
144
  result = 4;
146
145
  } else if (angle >= 45 && angle < 135) {
147
146
  result = 1;
148
147
  } else if (angle >= -135 && angle < -45) {
149
148
  result = 2;
150
149
  } else if ((angle >= 135 && angle <= 180) || (angle >= -180 && angle < -135)) {
151
150
  result = 3;
152
151
  }
153
152
  return result;
154
153
  };
155
154
  const changeTouchStart = (e) => {
156
155
  if (isJdApp) {
157
156
  stopNativeScrollEvent(e, TouchType.START, !iosNeedDisableVertical);
158
157
  if (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView) {
159
158
  isJdAndH5ScrollState && rootEleNode && rootEleNode.classList.add('over-hidden');
160
159
  const touchEvent = e?.originalEvent?.targetTouches[0] || e?.targetTouches[0];
161
160
  mLastClientPosRef.current.mLastClientX = touchEvent.clientX;
162
161
  mLastClientPosRef.current.mLastClientY = touchEvent.clientY;
163
162
  }
164
163
  }
165
164
  };
166
165
  const changeTouchEnd = (e) => {
167
166
  stopNativeScrollEvent(e, TouchType.END);
168
167
  mLastClientPosRef.current.mLastClientX = 0;
169
168
  mLastClientPosRef.current.mLastClientY = 0;
170
169
  };
171
170
  const triggerIosTouchMove = () => {
172
171
  isJdAndIosDevice && iosDeviceStopNativeScrollEvent(null, TouchType.START, true);
173
172
  };
174
173
 
175
174
  const lodashThrottleTriggerIosTouchMove = lodashThrottle(triggerIosTouchMove, 500);
176
175
 
177
176
  const recoverRootEleVerticalScroll = (touchEvent) => {
178
177
  const direction = GetSlideDirection(
179
178
  mLastClientPosRef.current.mLastClientX,
180
179
  mLastClientPosRef.current.mLastClientY,
181
180
  touchEvent.clientX,
182
181
  touchEvent.clientY,
183
182
  );
184
183
  if (direction === 1 || direction === 2) {
185
184
  rootEleNode &&
186
185
  rootEleNode.classList.contains('over-hidden') &&
187
186
  rootEleNode.classList.remove('over-hidden');
188
187
  }
189
188
  };
190
189
  const changeTouchMove = (e) => {
191
190
  if (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView) {
192
191
  const touchEvent = e?.originalEvent?.targetTouches[0] || e?.targetTouches[0];
193
192
  const xDiff = Math.abs(touchEvent.clientX - mLastClientPosRef.current.mLastClientX).toFixed(
194
193
  2,
195
194
  );
196
195
  const yDiff = Math.abs(touchEvent.clientY - mLastClientPosRef.current.mLastClientY).toFixed(
197
196
  2,
198
197
  );
199
198
  if (isJdApp) {
200
199
  if (xDiff >= window.JDJshopViewInfo.androidTouchSlop) {
201
200
  iosNeedDisableVertical && isJdApp && lodashThrottleTriggerIosTouchMove();
202
201
  } else if (yDiff > window.JDJshopViewInfo.androidTouchSlop) {
203
202
  console.log('纵向滚动触发', yDiff, touchEvent, window.JDJshopViewInfo.androidTouchSlop);
204
203
  stopNativeScrollEvent(e, TouchType.END);
205
204
  }
206
205
  }
207
206
  isJdAndH5ScrollState && recoverRootEleVerticalScroll(touchEvent);
208
207
  }
209
208
  if (!dispatchTouchMove) {
210
209
  return;
211
210
  }
212
211
  const parentNode = e.target?.parentNode;
213
212
  if (!parentNode) {
214
213
  return;
215
214
  }
216
215
  const event = new TouchEvent('touchmove', e);
217
216
  parentNode.dispatchEvent(event);
218
217
  };
219
218
  if (scrollX && isJdApp && !isIgnorePreventNative) {
220
219
  return (
221
220
  <ScrollView
222
221
  scrollX
223
222
  onTouchStart={changeTouchStart}
224
223
  onTouchEnd={changeTouchEnd}
225
224
  onTouchCancel={changeTouchEnd}
226
225
  onTouchMove={changeTouchMove}
227
226
  enhanced
228
227
  showScrollbar={false}
229
228
  style={style}
230
229
  className={classNames(
231
230
  className,
232
231
  {
233
232
  [customScrollViewStyle['d-custom-ios-h5-extend-border-radius']]: isIosDevice,
234
233
  },
235
234
  'J_customScroll',
236
235
  )}
237
236
  {...otherProps}
238
237
  >
239
238
  {children}
240
239
  </ScrollView>
241
240
  );
242
241
  } else {
243
242
  return (
244
243
  <ScrollView
245
244
  scrollX
246
245
  enhanced
247
246
  showScrollbar={false}
248
247
  {...otherProps}
249
248
  className={classNames(
250
249
  className,
251
250
  {
252
251
  [customScrollViewStyle['d-custom-ios-mini-extend-border-radius']]:
253
252
  isIosDevice && isWxMin && scrollX && style['borderRadius'],
254
253
  },
255
254
  {
256
255
  [customScrollViewStyle['d-custom-ios-h5-extend-border-radius']]: isIosDevice,
257
256
  },
258
257
  {
259
258
  [customScrollViewStyle['d-custom-mini-hide-scroll']]: isWxMin,
260
259
  },
261
260
  )}
262
261
  style={style}
263
262
  >
264
263
  {children}
265
264
  </ScrollView>
266
265
  );
267
266
  }
268
267
  style: {},
269
268
  scrollX: false,
270
269
  scrollY: false,
271
270
  scrollWithAnimation: true,
272
271
  iosNeedDisableVertical: false,
273
272
  className: null,
274
273
  dispatchTouchMove: true,
274
+ import React, { useRef, useEffect } from 'react';
275
275
  isH5AndJdShopView,
276
276
  isAndroidDevice,
277
277
  isJdAndAndroidDevice,
278
278
  isJdAndHarmonyDevice,
279
279
  isJdAndIosDevice,
280
280
  isIosDevice,
281
281
  isJdApp,
282
282
  isWxMin,
283
283
  isH5AndJdShopViewH5Scroll,
284
284
  isH5AndJdShopH5CustomScrollView,
285
285
  isH5,
286
286
  isAppClassifyPage,
287
287
  lodashThrottle,
288
288
  START: 'start',
289
289
  MOVE: 'move',
290
290
  END: 'end',
291
291
  const {
292
292
  scrollX,
293
293
  children,
294
294
  style = {},
295
295
  iosNeedDisableVertical,
296
296
  dispatchTouchMove,
297
297
  className,
298
298
  ...otherProps
299
299
  } = props;
300
300
  const rootEleNode = isH5 && document ? document.querySelector('body') : null;
301
301
  const needShowHighVersion =
302
302
  isH5AndJdShopViewH5Scroll &&
303
303
  !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === 'true');
304
304
  const mLastClientPosRef = useRef({
305
305
  mLastClientX: 0,
306
306
  mLastClientY: 0,
307
307
  });
308
308
  const isJdAndH5ScrollState = needShowHighVersion || isH5AndJdShopH5CustomScrollView;
309
309
 
310
310
  const touchstartEventBubbleFunc = (e) => {
311
311
  const isH5SwiperCustomEle = e?.target?.closest('.J_h5SwiperCustom');
312
312
  if (!isH5SwiperCustomEle) {
313
313
  const hasCustomEle = e
314
314
  ? e?.target?.closest('.J_customScroll') || e?.target?.closest('.J_customLayout')
315
315
  : false;
316
316
  if (isJdAndAndroidDevice && !hasCustomEle) {
317
317
  window?.JdAndroid &&
318
318
  window?.JdAndroid?.requestEvent &&
319
319
  window.JdAndroid.requestEvent(false);
320
320
  }
321
321
  !hasCustomEle &&
322
322
  rootEleNode &&
323
323
  rootEleNode.classList.contains('over-hidden') &&
324
324
  rootEleNode.classList.remove('over-hidden');
325
325
  console.log('检测remove-over-hidden1');
326
326
  console.log(
327
327
  'customScrollView所在页面document touch start事件是否有J_customScroll元素',
328
328
  hasCustomEle,
329
329
  '根元素是否有over-hidden',
330
330
  rootEleNode.classList,
331
331
  );
332
332
  }
333
333
  };
334
334
  const touchstartEventCaptureFunc = (e) => {
335
335
  if (e && !e?.target?.closest('.J_h5SwiperCustom') && !e?.target?.closest('.J_customLayout')) {
336
336
  rootEleNode &&
337
337
  rootEleNode.classList.contains('over-hidden') &&
338
338
  rootEleNode.classList.remove('over-hidden');
339
339
  console.log('检测remove-over-hidden2');
340
340
  console.log(
341
341
  'customScrollView所在页面document touch start事件捕获阶段移除根元素是否有over-hidden',
342
342
  rootEleNode.classList,
343
343
  );
344
344
  }
345
345
  };
346
346
  useEffect(() => {
347
347
  isJdApp &&
348
348
  !window.JDJshopViewInfo.getAndroidTouchSlopState &&
349
349
  nativePageGetScaledTouchSlop((res) => {
350
350
  console.log('获取安卓系统滑动阈值', res);
351
351
  window.JDJshopViewInfo.androidTouchSlop = res;
352
352
  window.JDJshopViewInfo.getAndroidTouchSlopState = true;
353
353
  });
354
354
  if (isJdAndH5ScrollState && rootEleNode && !rootEleAddEventListenerState) {
355
355
  global?.removeJdAndroidRquestEventForTouchStart &&
356
356
  global.removeJdAndroidRquestEventForTouchStart();
357
357
  rootEleNode.addEventListener('touchstart', touchstartEventBubbleFunc, false);
358
358
 
359
359
  rootEleNode.addEventListener('touchstart', touchstartEventCaptureFunc, true);
360
360
  rootEleAddEventListenerState = true;
361
361
  console.log('customScrollView 初始化document监听完成');
362
362
  }
363
363
  return () => {
364
364
  if (isJdAndH5ScrollState && rootEleNode && rootEleAddEventListenerState) {
365
365
  console.log('customScrollView document监听取消完成');
366
366
  rootEleNode.removeEventListener('touchstart', touchstartEventBubbleFunc, false);
367
367
  rootEleNode.removeEventListener('touchstart', touchstartEventCaptureFunc, true);
368
368
  }
369
369
  };
370
370
  }, []);
371
371
 
372
372
  const androidDeviceStopNativeScrollEvent = (touchType) => {
373
373
  isJdApp &&
374
374
  isAndroidDevice &&
375
375
  window?.JdAndroid &&
376
376
  window?.JdAndroid?.requestEvent &&
377
377
  window.JdAndroid.requestEvent(touchType === TouchType.START);
378
378
  console.log('触发window?.JdAndroid.requestEvent', touchType === TouchType.START, touchType);
379
379
  };
380
380
  const iosDeviceStopNativeScrollEvent = (e, touchType, sendIosState = true) => {
381
381
  sendIosState && iosDeviceSendRouter(touchType);
382
382
  };
383
383
 
384
384
  const iosDeviceSendRouter = (state: string) => {
385
385
  window?.webkit?.messageHandlers?.MobileNavi?.postMessage?.({
386
386
  method: 'callRouterModuleWithParams',
387
387
  params: {
388
388
  routerURL: 'router://JDShopModule/processShoph5SlideState',
389
389
  routerParam: {
390
390
  slideDirection: 'horizontal',
391
391
  needDisableVertical: `${iosNeedDisableVertical}`,
392
392
  state,
393
393
  },
394
394
  callBackId: new Date().getTime(),
395
395
  },
396
396
  });
397
397
  };
398
398
  const stopNativeScrollEvent = (e: Event, touchType, sendIosState = true) => {
399
399
  if (isJdApp) {
400
400
  isIosDevice &&
401
401
  !isAppClassifyPage &&
402
402
  iosDeviceStopNativeScrollEvent(e, touchType, sendIosState);
403
403
  isAndroidDevice && androidDeviceStopNativeScrollEvent(touchType);
404
404
  }
405
405
  };
406
406
 
407
407
  const GetSlideAngle = (dx, dy) => {
408
408
  return (Math.atan2(dy, dx) * 180) / Math.PI;
409
409
  };
410
410
 
411
411
  const GetSlideDirection = (startX, startY, endX, endY) => {
412
412
  const dy = startY - endY;
413
413
  const dx = endX - startX;
414
414
  let result = 0;
415
415
  if (Math.abs(dx) < 2 && Math.abs(dy) < 2) {
416
416
  return result;
417
417
  }
418
418
  const angle = GetSlideAngle(dx, dy);
419
419
  if (angle >= -45 && angle < 45) {
420
420
  result = 4;
421
421
  } else if (angle >= 45 && angle < 135) {
422
422
  result = 1;
423
423
  } else if (angle >= -135 && angle < -45) {
424
424
  result = 2;
425
425
  } else if ((angle >= 135 && angle <= 180) || (angle >= -180 && angle < -135)) {
426
426
  result = 3;
427
427
  }
428
428
  return result;
429
429
  };
430
430
  const changeTouchStart = (e) => {
431
431
  if (isJdApp) {
432
432
  stopNativeScrollEvent(e, TouchType.START, !iosNeedDisableVertical);
433
433
  if (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView) {
434
434
  isJdAndH5ScrollState && rootEleNode && rootEleNode.classList.add('over-hidden');
435
435
  console.log('检测add-over-hidden2');
436
436
  const touchEvent = e?.originalEvent?.targetTouches[0] || e?.targetTouches[0];
437
437
  mLastClientPosRef.current.mLastClientX = touchEvent.clientX;
438
438
  mLastClientPosRef.current.mLastClientY = touchEvent.clientY;
439
439
  }
440
440
  }
441
441
  };
442
442
  const changeTouchEnd = (e) => {
443
443
  stopNativeScrollEvent(e, TouchType.END);
444
444
  mLastClientPosRef.current.mLastClientX = 0;
445
445
  mLastClientPosRef.current.mLastClientY = 0;
446
446
  };
447
447
  const triggerIosTouchMove = () => {
448
448
  isJdAndIosDevice && iosDeviceStopNativeScrollEvent(null, TouchType.START, true);
449
449
  };
450
450
 
451
451
  const lodashThrottleTriggerIosTouchMove = lodashThrottle(triggerIosTouchMove, 500);
452
452
 
453
453
  const recoverRootEleVerticalScroll = (touchEvent) => {
454
454
  const direction = GetSlideDirection(
455
455
  mLastClientPosRef.current.mLastClientX,
456
456
  mLastClientPosRef.current.mLastClientY,
457
457
  touchEvent.clientX,
458
458
  touchEvent.clientY,
459
459
  );
460
460
  if (direction === 1 || direction === 2) {
461
461
  rootEleNode &&
462
462
  rootEleNode.classList.contains('over-hidden') &&
463
463
  rootEleNode.classList.remove('over-hidden');
464
464
  console.log('检测remove-over-hidden3');
465
465
  }
466
466
  };
467
467
  const changeTouchMove = (e) => {
468
468
  if (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView) {
469
469
  const touchEvent = e?.originalEvent?.targetTouches[0] || e?.targetTouches[0];
470
470
  const xDiff = Math.abs(touchEvent.clientX - mLastClientPosRef.current.mLastClientX).toFixed(
471
471
  2,
472
472
  );
473
473
  const yDiff = Math.abs(touchEvent.clientY - mLastClientPosRef.current.mLastClientY).toFixed(
474
474
  2,
475
475
  );
476
476
  if (isJdApp) {
477
477
  if (xDiff >= window.JDJshopViewInfo.androidTouchSlop) {
478
478
  iosNeedDisableVertical && isJdApp && lodashThrottleTriggerIosTouchMove();
479
479
  } else if (yDiff > window.JDJshopViewInfo.androidTouchSlop) {
480
480
  console.log('纵向滚动触发', yDiff, touchEvent, window.JDJshopViewInfo.androidTouchSlop);
481
481
  stopNativeScrollEvent(e, TouchType.END);
482
482
  }
483
483
  }
484
484
  isJdAndH5ScrollState && recoverRootEleVerticalScroll(touchEvent);
485
485
  }
486
486
  if (!dispatchTouchMove) {
487
487
  return;
488
488
  }
489
489
  const parentNode = e.target?.parentNode;
490
490
  if (!parentNode) {
491
491
  return;
492
492
  }
493
493
  const event = new TouchEvent('touchmove', e);
494
494
  parentNode.dispatchEvent(event);
495
495
  };
496
496
  if (scrollX && isJdApp && !isIgnorePreventNative) {
497
497
  return (
498
498
  <ScrollView
499
499
  scrollX
500
500
  onTouchStart={changeTouchStart}
501
501
  onTouchEnd={changeTouchEnd}
502
502
  onTouchCancel={changeTouchEnd}
503
503
  onTouchMove={changeTouchMove}
504
504
  enhanced
505
505
  showScrollbar={false}
506
506
  style={style}
507
507
  className={classNames(
508
508
  className,
509
509
  {
510
510
  [customScrollViewStyle['d-custom-ios-h5-extend-border-radius']]: isIosDevice,
511
511
  },
512
512
  'J_customScroll',
513
513
  )}
514
514
  {...otherProps}
515
515
  >
516
516
  {children}
517
517
  </ScrollView>
518
518
  );
519
519
  } else {
520
520
  return (
521
521
  <ScrollView
522
522
  scrollX
523
523
  enhanced
524
524
  showScrollbar={false}
525
525
  {...otherProps}
526
526
  className={classNames(
527
527
  className,
528
528
  {
529
529
  [customScrollViewStyle['d-custom-ios-mini-extend-border-radius']]:
530
530
  isIosDevice && isWxMin && scrollX && style['borderRadius'],
531
531
  },
532
532
  {
533
533
  [customScrollViewStyle['d-custom-ios-h5-extend-border-radius']]: isIosDevice,
534
534
  },
535
535
  {
536
536
  [customScrollViewStyle['d-custom-mini-hide-scroll']]: isWxMin,
537
537
  },
538
538
  )}
539
539
  style={style}
540
540
  >
541
541
  {children}
542
542
  </ScrollView>
543
543
  );
544
544
  }
545
545
  style: {},
546
546
  scrollX: false,
547
547
  scrollY: false,
548
548
  scrollWithAnimation: true,
549
549
  iosNeedDisableVertical: false,
550
550
  className: null,
551
551
  dispatchTouchMove: true,