@tarojs/components-react 4.1.12-beta.37 → 4.1.12-beta.38
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.
- package/dist/components/picker/picker-group.js +130 -70
- package/dist/components/picker/picker-group.js.map +1 -1
- package/dist/original/components/picker/picker-group.js +130 -70
- package/dist/original/components/picker/picker-group.js.map +1 -1
- package/dist/solid/components/picker/picker-group.js +130 -70
- package/dist/solid/components/picker/picker-group.js.map +1 -1
- package/package.json +6 -6
|
@@ -13,6 +13,80 @@ const getIndicatorStyle = lineColor => {
|
|
|
13
13
|
borderBottomColor: lineColor
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
// 大屏方案版本要求
|
|
17
|
+
const MIN_DESIGN_APP_VERSION = 16;
|
|
18
|
+
const MIN_APP_VERSION = '15.7.0';
|
|
19
|
+
// semver 版本比较
|
|
20
|
+
const isAppVersionAtLeast = (version, min) => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
if (!version || typeof version !== 'string') return false;
|
|
23
|
+
const parts = v => {
|
|
24
|
+
const m = String(v).trim().match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
|
|
25
|
+
if (!m) return [];
|
|
26
|
+
return [parseInt(m[1], 10) || 0, parseInt(m[2] || '0', 10) || 0, parseInt(m[3] || '0', 10) || 0];
|
|
27
|
+
};
|
|
28
|
+
const a = parts(version);
|
|
29
|
+
const b = parts(min);
|
|
30
|
+
if (a.length === 0) return false;
|
|
31
|
+
if (b.length === 0) return true;
|
|
32
|
+
for (let i = 0; i < Math.max(a.length, b.length); i++) {
|
|
33
|
+
const da = (_a = a[i]) !== null && _a !== void 0 ? _a : 0;
|
|
34
|
+
const db = (_b = b[i]) !== null && _b !== void 0 ? _b : 0;
|
|
35
|
+
if (da > db) return true;
|
|
36
|
+
if (da < db) return false;
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
};
|
|
40
|
+
// 读取 JDMobileConfig,异常时返回 undefined
|
|
41
|
+
const tryGetMobileConfigSync = opt => {
|
|
42
|
+
var _a;
|
|
43
|
+
try {
|
|
44
|
+
const fn = (_a = Taro.JDMobileConfig) === null || _a === void 0 ? void 0 : _a.getMobileConfigSync;
|
|
45
|
+
if (typeof fn !== 'function') return undefined;
|
|
46
|
+
return fn(opt);
|
|
47
|
+
} catch (_b) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
// 判断是否启用测量值缩放适配(true=启用, false=使用系统侧缩放)
|
|
52
|
+
const resolveUseMeasuredScale = res => {
|
|
53
|
+
// H5/weapp 不参与大屏系数
|
|
54
|
+
if (process.env.TARO_ENV === 'h5' || process.env.TARO_ENV === 'weapp') {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
// 条件1: designAppVersion < 16,不满足则使用系统侧缩放
|
|
58
|
+
const designAppVersionRaw = res.designAppVersion;
|
|
59
|
+
const designAppVersionMajor = designAppVersionRaw != null ? parseInt(String(designAppVersionRaw).trim(), 10) : Number.NaN;
|
|
60
|
+
if (!Number.isFinite(designAppVersionMajor) || designAppVersionMajor < MIN_DESIGN_APP_VERSION) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
// 条件2: appVersion < 15.7.0,不满足则使用系统侧缩放
|
|
64
|
+
if (!isAppVersionAtLeast(res.version, MIN_APP_VERSION)) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
// 条件3: 平台判断
|
|
68
|
+
const platform = String(res.platform || '').toLowerCase();
|
|
69
|
+
if (platform === 'harmony') {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
if (platform === 'android') {
|
|
73
|
+
const raw = tryGetMobileConfigSync({
|
|
74
|
+
space: 'taro',
|
|
75
|
+
configName: 'config',
|
|
76
|
+
key: 'disableFixBoundingScaleRatio'
|
|
77
|
+
});
|
|
78
|
+
return raw !== 1 && raw !== '1';
|
|
79
|
+
}
|
|
80
|
+
if (platform === 'ios') {
|
|
81
|
+
const raw = tryGetMobileConfigSync({
|
|
82
|
+
space: 'Taro',
|
|
83
|
+
configName: 'excutor',
|
|
84
|
+
key: 'disableBoundingScaleRatio'
|
|
85
|
+
});
|
|
86
|
+
return raw !== 1 && raw !== '1';
|
|
87
|
+
}
|
|
88
|
+
return false;
|
|
89
|
+
};
|
|
16
90
|
// 辅助函数:计算 lengthScaleRatio
|
|
17
91
|
const calculateLengthScaleRatio = res => {
|
|
18
92
|
let lengthScaleRatio = res === null || res === void 0 ? void 0 : res.lengthScaleRatio;
|
|
@@ -51,6 +125,29 @@ const setTargetScrollTopWithScale = function (setTargetScrollTop, baseValue, ran
|
|
|
51
125
|
setTargetScrollTop(finalValue);
|
|
52
126
|
}
|
|
53
127
|
};
|
|
128
|
+
// 根据 scrollTop 计算选中索引
|
|
129
|
+
// 系统侧缩放模式:scrollHeight 已被系统缩放,直接相除即可
|
|
130
|
+
// 自行缩放模式:需要除以 ratio 换算(harmony 特殊处理,ratio 已内嵌在 itemHeight 中)
|
|
131
|
+
const getSelectedIndex = function (scrollTop, itemHeight) {
|
|
132
|
+
let lengthScaleRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
133
|
+
let useMeasuredScale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
134
|
+
if (!useMeasuredScale || process.env.TARO_PLATFORM === 'harmony') {
|
|
135
|
+
return Math.round(scrollTop / itemHeight);
|
|
136
|
+
}
|
|
137
|
+
return Math.round(scrollTop / lengthScaleRatio / itemHeight);
|
|
138
|
+
};
|
|
139
|
+
// 计算单项高度(返回设计稿值)
|
|
140
|
+
const calculateItemHeight = function (scrollView, lengthScaleRatio) {
|
|
141
|
+
let useMeasuredScale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
142
|
+
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
143
|
+
return useMeasuredScale ? PICKER_LINE_HEIGHT * lengthScaleRatio : PICKER_LINE_HEIGHT;
|
|
144
|
+
}
|
|
145
|
+
if (scrollView && (scrollView === null || scrollView === void 0 ? void 0 : scrollView.scrollHeight)) {
|
|
146
|
+
return useMeasuredScale ? scrollView.scrollHeight / lengthScaleRatio / scrollView.childNodes.length : scrollView.scrollHeight / scrollView.childNodes.length;
|
|
147
|
+
}
|
|
148
|
+
console.warn('Height measurement anomaly');
|
|
149
|
+
return PICKER_LINE_HEIGHT;
|
|
150
|
+
};
|
|
54
151
|
function PickerGroupBasic(props) {
|
|
55
152
|
const {
|
|
56
153
|
range = [],
|
|
@@ -71,35 +168,25 @@ function PickerGroupBasic(props) {
|
|
|
71
168
|
// 触摸状态用于优化用户体验
|
|
72
169
|
const [isTouching, setIsTouching] = React.useState(false);
|
|
73
170
|
const lengthScaleRatioRef = React.useRef(1);
|
|
171
|
+
const useMeasuredScaleRef = React.useRef(false);
|
|
74
172
|
const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT);
|
|
75
|
-
// 初始化时计算 lengthScaleRatio
|
|
173
|
+
// 初始化时计算 lengthScaleRatio 并判定缩放模式
|
|
76
174
|
React.useEffect(() => {
|
|
77
175
|
Taro.getSystemInfo({
|
|
78
176
|
success: res => {
|
|
79
177
|
lengthScaleRatioRef.current = calculateLengthScaleRatio(res);
|
|
178
|
+
useMeasuredScaleRef.current = resolveUseMeasuredScale(res);
|
|
179
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
80
180
|
},
|
|
81
181
|
fail: () => {
|
|
82
|
-
// 失败时使用默认值 1
|
|
83
182
|
lengthScaleRatioRef.current = 1;
|
|
183
|
+
useMeasuredScaleRef.current = false;
|
|
84
184
|
}
|
|
85
185
|
});
|
|
86
186
|
}, []);
|
|
87
187
|
React.useEffect(() => {
|
|
88
|
-
|
|
89
|
-
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
90
|
-
itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current;
|
|
91
|
-
} else {
|
|
92
|
-
if (scrollViewRef.current && ((_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight)) {
|
|
93
|
-
itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length;
|
|
94
|
-
} else {
|
|
95
|
-
console.warn('Height measurement anomaly');
|
|
96
|
-
}
|
|
97
|
-
}
|
|
188
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
98
189
|
}, [range.length]); // 只在range长度变化时重新计算
|
|
99
|
-
// 获取选中的索引
|
|
100
|
-
const getSelectedIndex = scrollTop => {
|
|
101
|
-
return Math.round(scrollTop / itemHeightRef.current);
|
|
102
|
-
};
|
|
103
190
|
// 当selectedIndex变化时,调整滚动位置
|
|
104
191
|
React.useEffect(() => {
|
|
105
192
|
if (scrollViewRef.current && range.length > 0 && !isTouching) {
|
|
@@ -121,7 +208,7 @@ function PickerGroupBasic(props) {
|
|
|
121
208
|
isCenterTimerId.current = setTimeout(() => {
|
|
122
209
|
if (!scrollViewRef.current) return;
|
|
123
210
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
124
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
211
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
125
212
|
setIsTouching(false);
|
|
126
213
|
const baseValue = newIndex * itemHeightRef.current;
|
|
127
214
|
const randomOffset = Math.random() * 0.001; // 随机数为了在一个项内滚动时强制刷新
|
|
@@ -142,7 +229,7 @@ function PickerGroupBasic(props) {
|
|
|
142
229
|
isCenterTimerId.current = null;
|
|
143
230
|
}
|
|
144
231
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
145
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
232
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
146
233
|
if (newIndex !== currentIndex) {
|
|
147
234
|
setCurrentIndex(newIndex);
|
|
148
235
|
}
|
|
@@ -221,34 +308,25 @@ function PickerGroupTime(props) {
|
|
|
221
308
|
const [currentIndex, setCurrentIndex] = React.useState(selectedIndex);
|
|
222
309
|
const [isTouching, setIsTouching] = React.useState(false);
|
|
223
310
|
const lengthScaleRatioRef = React.useRef(1);
|
|
311
|
+
const useMeasuredScaleRef = React.useRef(false);
|
|
224
312
|
const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT);
|
|
225
|
-
// 初始化时计算 lengthScaleRatio
|
|
313
|
+
// 初始化时计算 lengthScaleRatio 并判定缩放模式
|
|
226
314
|
React.useEffect(() => {
|
|
227
315
|
Taro.getSystemInfo({
|
|
228
316
|
success: res => {
|
|
229
317
|
lengthScaleRatioRef.current = calculateLengthScaleRatio(res);
|
|
318
|
+
useMeasuredScaleRef.current = resolveUseMeasuredScale(res);
|
|
319
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
230
320
|
},
|
|
231
321
|
fail: () => {
|
|
232
|
-
// 失败时使用默认值 1
|
|
233
322
|
lengthScaleRatioRef.current = 1;
|
|
323
|
+
useMeasuredScaleRef.current = false;
|
|
234
324
|
}
|
|
235
325
|
});
|
|
236
326
|
}, []);
|
|
237
327
|
React.useEffect(() => {
|
|
238
|
-
|
|
239
|
-
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
240
|
-
itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current;
|
|
241
|
-
} else {
|
|
242
|
-
if (scrollViewRef.current && ((_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight)) {
|
|
243
|
-
itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length;
|
|
244
|
-
} else {
|
|
245
|
-
console.warn('Height measurement anomaly');
|
|
246
|
-
}
|
|
247
|
-
}
|
|
328
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
248
329
|
}, [range.length]); // 只在range长度变化时重新计算
|
|
249
|
-
const getSelectedIndex = scrollTop => {
|
|
250
|
-
return Math.round(scrollTop / itemHeightRef.current);
|
|
251
|
-
};
|
|
252
330
|
// 当selectedIndex变化时,调整滚动位置
|
|
253
331
|
React.useEffect(() => {
|
|
254
332
|
if (scrollViewRef.current && range.length > 0 && !isTouching) {
|
|
@@ -270,7 +348,7 @@ function PickerGroupTime(props) {
|
|
|
270
348
|
isCenterTimerId.current = setTimeout(() => {
|
|
271
349
|
if (!scrollViewRef.current) return;
|
|
272
350
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
273
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
351
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
274
352
|
setIsTouching(false);
|
|
275
353
|
// 调用updateIndex执行限位逻辑,获取是否触发了限位
|
|
276
354
|
const isLimited = Boolean(updateIndex(newIndex, columnId, true));
|
|
@@ -291,7 +369,7 @@ function PickerGroupTime(props) {
|
|
|
291
369
|
isCenterTimerId.current = null;
|
|
292
370
|
}
|
|
293
371
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
294
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
372
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
295
373
|
if (newIndex !== currentIndex) {
|
|
296
374
|
setCurrentIndex(newIndex);
|
|
297
375
|
}
|
|
@@ -368,34 +446,25 @@ function PickerGroupDate(props) {
|
|
|
368
446
|
const [currentIndex, setCurrentIndex] = React.useState(selectedIndex);
|
|
369
447
|
const [isTouching, setIsTouching] = React.useState(false);
|
|
370
448
|
const lengthScaleRatioRef = React.useRef(1);
|
|
449
|
+
const useMeasuredScaleRef = React.useRef(false);
|
|
371
450
|
const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT);
|
|
372
|
-
// 初始化时计算 lengthScaleRatio
|
|
451
|
+
// 初始化时计算 lengthScaleRatio 并判定缩放模式
|
|
373
452
|
React.useEffect(() => {
|
|
374
453
|
Taro.getSystemInfo({
|
|
375
454
|
success: res => {
|
|
376
455
|
lengthScaleRatioRef.current = calculateLengthScaleRatio(res);
|
|
456
|
+
useMeasuredScaleRef.current = resolveUseMeasuredScale(res);
|
|
457
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
377
458
|
},
|
|
378
459
|
fail: () => {
|
|
379
|
-
// 失败时使用默认值 1
|
|
380
460
|
lengthScaleRatioRef.current = 1;
|
|
461
|
+
useMeasuredScaleRef.current = false;
|
|
381
462
|
}
|
|
382
463
|
});
|
|
383
464
|
}, []);
|
|
384
465
|
React.useEffect(() => {
|
|
385
|
-
|
|
386
|
-
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
387
|
-
itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current;
|
|
388
|
-
} else {
|
|
389
|
-
if (scrollViewRef.current && ((_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight)) {
|
|
390
|
-
itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length;
|
|
391
|
-
} else {
|
|
392
|
-
console.warn('Height measurement anomaly');
|
|
393
|
-
}
|
|
394
|
-
}
|
|
466
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
395
467
|
}, [range.length]); // 只在range长度变化时重新计算
|
|
396
|
-
const getSelectedIndex = scrollTop => {
|
|
397
|
-
return Math.round(scrollTop / itemHeightRef.current);
|
|
398
|
-
};
|
|
399
468
|
// 当selectedIndex变化时,调整滚动位置
|
|
400
469
|
React.useEffect(() => {
|
|
401
470
|
if (scrollViewRef.current && range.length > 0 && !isTouching) {
|
|
@@ -417,7 +486,7 @@ function PickerGroupDate(props) {
|
|
|
417
486
|
isCenterTimerId.current = setTimeout(() => {
|
|
418
487
|
if (!scrollViewRef.current) return;
|
|
419
488
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
420
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
489
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
421
490
|
setIsTouching(false);
|
|
422
491
|
const baseValue = newIndex * itemHeightRef.current;
|
|
423
492
|
const randomOffset = Math.random() * 0.001; // 随机数为了在一个项内滚动时强制刷新
|
|
@@ -440,7 +509,7 @@ function PickerGroupDate(props) {
|
|
|
440
509
|
isCenterTimerId.current = null;
|
|
441
510
|
}
|
|
442
511
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
443
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
512
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
444
513
|
if (newIndex !== currentIndex) {
|
|
445
514
|
setCurrentIndex(newIndex);
|
|
446
515
|
}
|
|
@@ -517,40 +586,31 @@ function PickerGroupRegion(props) {
|
|
|
517
586
|
const [currentIndex, setCurrentIndex] = React.useState(selectedIndex);
|
|
518
587
|
const [isTouching, setIsTouching] = React.useState(false);
|
|
519
588
|
const lengthScaleRatioRef = React.useRef(1);
|
|
589
|
+
const useMeasuredScaleRef = React.useRef(false);
|
|
520
590
|
const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT);
|
|
521
591
|
const isUserBeginScrollRef = React.useRef(false);
|
|
522
|
-
// 初始化时计算 lengthScaleRatio
|
|
592
|
+
// 初始化时计算 lengthScaleRatio 并判定缩放模式
|
|
523
593
|
React.useEffect(() => {
|
|
524
594
|
Taro.getSystemInfo({
|
|
525
595
|
success: res => {
|
|
526
596
|
lengthScaleRatioRef.current = calculateLengthScaleRatio(res);
|
|
597
|
+
useMeasuredScaleRef.current = resolveUseMeasuredScale(res);
|
|
598
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
527
599
|
},
|
|
528
600
|
fail: () => {
|
|
529
|
-
// 失败时使用默认值 1
|
|
530
601
|
lengthScaleRatioRef.current = 1;
|
|
602
|
+
useMeasuredScaleRef.current = false;
|
|
531
603
|
}
|
|
532
604
|
});
|
|
533
605
|
}, []);
|
|
534
606
|
React.useEffect(() => {
|
|
535
|
-
|
|
536
|
-
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
537
|
-
itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current;
|
|
538
|
-
} else {
|
|
539
|
-
if (scrollViewRef.current && ((_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight)) {
|
|
540
|
-
itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length;
|
|
541
|
-
} else {
|
|
542
|
-
console.warn('Height measurement anomaly');
|
|
543
|
-
}
|
|
544
|
-
}
|
|
607
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
545
608
|
}, [range.length]); // 只在range长度变化时重新计算
|
|
546
|
-
const getSelectedIndex = scrollTop => {
|
|
547
|
-
return Math.round(scrollTop / itemHeightRef.current);
|
|
548
|
-
};
|
|
549
609
|
// 当selectedIndex变化时,调整滚动位置
|
|
550
610
|
React.useEffect(() => {
|
|
551
611
|
if (scrollViewRef.current && range.length > 0 && !isTouching) {
|
|
552
612
|
const baseValue = selectedIndex * itemHeightRef.current;
|
|
553
|
-
setTargetScrollTopWithScale(setTargetScrollTop, baseValue);
|
|
613
|
+
setTargetScrollTopWithScale(setTargetScrollTop, baseValue, undefined, lengthScaleRatioRef.current);
|
|
554
614
|
setCurrentIndex(selectedIndex);
|
|
555
615
|
}
|
|
556
616
|
}, [selectedIndex, range]);
|
|
@@ -566,7 +626,7 @@ function PickerGroupRegion(props) {
|
|
|
566
626
|
isCenterTimerId.current = setTimeout(() => {
|
|
567
627
|
if (!scrollViewRef.current) return;
|
|
568
628
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
569
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
629
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
570
630
|
setIsTouching(false);
|
|
571
631
|
const baseValue = newIndex * itemHeightRef.current;
|
|
572
632
|
const randomOffset = Math.random() * 0.001; // 随机数为了在一个项内滚动时强制刷新
|
|
@@ -582,7 +642,7 @@ function PickerGroupRegion(props) {
|
|
|
582
642
|
isCenterTimerId.current = null;
|
|
583
643
|
}
|
|
584
644
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
585
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
645
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
586
646
|
if (newIndex !== currentIndex) {
|
|
587
647
|
setCurrentIndex(newIndex);
|
|
588
648
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picker-group.js","sources":["../../../../src/components/picker/picker-group.tsx"],"sourcesContent":["import { ScrollView, View } from '@tarojs/components'\nimport Taro from '@tarojs/taro'\nimport * as React from 'react'\n\n// 添加类型定义\ntype TaroScrollView = React.ElementRef<typeof ScrollView>\ntype TaroView = React.ElementRef<typeof View>\n\nexport interface PickerGroupProps {\n mode?: 'basic' | 'time' | 'date' | 'region'\n range: any[]\n rangeKey?: string\n columnId: string\n updateIndex: (index: number, columnId: string, needRevise?: boolean, isUserBeginScroll?: boolean) => void // 替换updateHeight\n onColumnChange?: (e: { columnId: string, index: number }) => void // 修改回调参数名称\n updateDay?: (value: number, fields: number) => void\n selectedIndex?: number // 添加selectedIndex参数\n _updateTrigger?: any // 仅用于强制触发更新\n colors?: {\n itemDefaultColor?: string // 选项字体默认颜色\n itemSelectedColor?: string // 选项字体选中颜色\n lineColor?: string // 选中指示线颜色\n }\n}\n\n// 定义常量\nconst PICKER_LINE_HEIGHT = 34 // px\nconst PICKER_VISIBLE_ITEMS = 7 // 可见行数\nconst PICKER_BLANK_ITEMS = 3 // 空白行数\n\nconst getIndicatorStyle = (lineColor: string): React.CSSProperties => {\n return {\n borderTopColor: lineColor,\n borderBottomColor: lineColor\n }\n}\n\n// 辅助函数:计算 lengthScaleRatio\nconst calculateLengthScaleRatio = (res: Taro.getSystemInfo.Result): number => {\n let lengthScaleRatio = (res as any)?.lengthScaleRatio\n if (lengthScaleRatio == null || lengthScaleRatio === 0) {\n console.warn('Taro.getSystemInfo: lengthScaleRatio 不存在,使用计算值')\n lengthScaleRatio = 1\n if (res.windowWidth < 320) {\n lengthScaleRatio = res.windowWidth / 320\n } else if (res.windowWidth >= 400 && res.windowWidth < 600) {\n lengthScaleRatio = res.windowWidth / 400\n }\n const shortSide = res.windowWidth < res.windowHeight ? res.windowWidth : res.windowHeight\n const isBigScreen = shortSide >= 600\n if (isBigScreen) {\n lengthScaleRatio = shortSide / 720\n }\n }\n return lengthScaleRatio\n}\n\n// 辅助函数:获取系统信息的 lengthScaleRatio 并设置 targetScrollTop\nconst setTargetScrollTopWithScale = (\n setTargetScrollTop: (value: number) => void,\n baseValue: number,\n randomOffset?: number,\n lengthScaleRatio: number = 1,\n) => {\n // H5 和 weapp 不参与放大计算,直接使用 baseValue\n if (process.env.TARO_ENV === 'h5' || process.env.TARO_ENV === 'weapp') {\n const finalValue = randomOffset !== undefined ? baseValue + randomOffset : baseValue\n setTargetScrollTop(finalValue)\n return\n }\n\n if (process.env.TARO_PLATFORM === 'harmony') {\n const scaledValue = baseValue\n const finalValue = randomOffset !== undefined ? scaledValue + randomOffset : scaledValue\n setTargetScrollTop(finalValue)\n } else {\n const scaledValue = baseValue * lengthScaleRatio\n const finalValue = randomOffset !== undefined ? scaledValue + randomOffset : scaledValue\n setTargetScrollTop(finalValue)\n }\n}\n\nexport function PickerGroupBasic(props: PickerGroupProps) {\n const {\n range = [],\n rangeKey,\n columnId,\n updateIndex,\n onColumnChange,\n selectedIndex = 0, // 使用selectedIndex参数,默认为0\n colors = {},\n } = props\n const indicatorStyle = colors.lineColor ? getIndicatorStyle(colors.lineColor) : null\n const [targetScrollTop, setTargetScrollTop] = React.useState(0)\n const scrollViewRef = React.useRef<TaroScrollView>(null)\n const itemRefs = React.useRef<Array<TaroView | null>>([])\n // 使用selectedIndex初始化当前索引\n const [currentIndex, setCurrentIndex] = React.useState(selectedIndex)\n // 触摸状态用于优化用户体验\n const [isTouching, setIsTouching] = React.useState(false)\n\n const lengthScaleRatioRef = React.useRef(1)\n const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT)\n\n // 初始化时计算 lengthScaleRatio\n React.useEffect(() => {\n Taro.getSystemInfo({\n success: (res) => {\n lengthScaleRatioRef.current = calculateLengthScaleRatio(res)\n },\n fail: () => {\n // 失败时使用默认值 1\n lengthScaleRatioRef.current = 1\n }\n })\n }, [])\n\n React.useEffect(() => {\n if (process.env.TARO_PLATFORM === 'harmony') {\n itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current\n } else {\n if (scrollViewRef.current && scrollViewRef.current?.scrollHeight) {\n itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length\n } else {\n console.warn('Height measurement anomaly')\n }\n }\n }, [range.length]) // 只在range长度变化时重新计算\n // 获取选中的索引\n const getSelectedIndex = (scrollTop: number) => {\n return Math.round(scrollTop / itemHeightRef.current)\n }\n\n // 当selectedIndex变化时,调整滚动位置\n React.useEffect(() => {\n if (scrollViewRef.current && range.length > 0 && !isTouching) {\n const baseValue = selectedIndex * itemHeightRef.current\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, undefined, lengthScaleRatioRef.current)\n setCurrentIndex(selectedIndex)\n }\n }, [selectedIndex, range])\n\n // 是否处于归中状态\n const isCenterTimerId = React.useRef<NodeJS.Timeout | null>(null)\n // 简化为直接在滚动结束时通知父组件\n const handleScrollEnd = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n // 做一个0.1s延时 0.1s之内没有新的滑动 则把选项归到中间 然后更新选中项\n isCenterTimerId.current = setTimeout(() => {\n if (!scrollViewRef.current) return\n\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop)\n\n setIsTouching(false)\n const baseValue = newIndex * itemHeightRef.current\n const randomOffset = Math.random() * 0.001 // 随机数为了在一个项内滚动时强制刷新\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, randomOffset, lengthScaleRatioRef.current)\n updateIndex(newIndex, columnId)\n onColumnChange?.({ columnId, index: newIndex })\n isCenterTimerId.current = null\n }, 100)\n }\n // 滚动处理 - 在滚动时计算索引然后更新选中项样式\n const handleScroll = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop)\n if (newIndex !== currentIndex) {\n setCurrentIndex(newIndex)\n }\n }\n\n // 渲染选项\n const pickerItem = range.map((item, index) => {\n const content = rangeKey && item && typeof item === 'object' ? item[rangeKey] : item\n\n return (\n <View\n id={`picker-item-${columnId}-${index}`}\n key={index}\n ref={(el) => (itemRefs.current[index] = el)}\n className={`taro-picker__item${index === currentIndex ? ' taro-picker__item--selected' : ''}`}\n style={{\n height: PICKER_LINE_HEIGHT,\n color: index === currentIndex\n ? (colors.itemSelectedColor || undefined)\n : (colors.itemDefaultColor || undefined)\n }}\n >\n {content}\n </View>\n )\n })\n\n const realPickerItems = [\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-top-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ...pickerItem,\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-bottom-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ]\n\n return (\n <View className=\"taro-picker__group\">\n <View className=\"taro-picker__mask\" />\n <View\n className=\"taro-picker__indicator\"\n {...(indicatorStyle ? { style: indicatorStyle } : {})}\n />\n <ScrollView\n ref={scrollViewRef}\n scrollY\n showScrollbar={false}\n className=\"taro-picker__content\"\n style={{\n height: PICKER_LINE_HEIGHT * PICKER_VISIBLE_ITEMS,\n }}\n scrollTop={targetScrollTop}\n onScroll={handleScroll}\n onTouchStart={() => setIsTouching(true)}\n onScrollEnd={handleScrollEnd}\n scrollWithAnimation\n >\n {realPickerItems}\n </ScrollView>\n </View>\n )\n}\n\n// 时间选择器实现\nexport function PickerGroupTime(props: PickerGroupProps) {\n const {\n range = [],\n rangeKey,\n columnId,\n updateIndex,\n selectedIndex = 0,\n colors = {},\n } = props\n\n const indicatorStyle = colors.lineColor ? getIndicatorStyle(colors.lineColor) : null\n const [targetScrollTop, setTargetScrollTop] = React.useState(0)\n const scrollViewRef = React.useRef<TaroScrollView>(null)\n const itemRefs = React.useRef<Array<TaroView | null>>([])\n const [currentIndex, setCurrentIndex] = React.useState(selectedIndex)\n const [isTouching, setIsTouching] = React.useState(false)\n\n const lengthScaleRatioRef = React.useRef(1)\n const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT)\n\n // 初始化时计算 lengthScaleRatio\n React.useEffect(() => {\n Taro.getSystemInfo({\n success: (res) => {\n lengthScaleRatioRef.current = calculateLengthScaleRatio(res)\n },\n fail: () => {\n // 失败时使用默认值 1\n lengthScaleRatioRef.current = 1\n }\n })\n }, [])\n\n React.useEffect(() => {\n if (process.env.TARO_PLATFORM === 'harmony') {\n itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current\n } else {\n if (scrollViewRef.current && scrollViewRef.current?.scrollHeight) {\n itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length\n } else {\n console.warn('Height measurement anomaly')\n }\n }\n }, [range.length]) // 只在range长度变化时重新计算\n\n const getSelectedIndex = (scrollTop: number) => {\n return Math.round(scrollTop / itemHeightRef.current)\n }\n\n // 当selectedIndex变化时,调整滚动位置\n React.useEffect(() => {\n if (scrollViewRef.current && range.length > 0 && !isTouching) {\n const baseValue = selectedIndex * itemHeightRef.current\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, undefined, lengthScaleRatioRef.current)\n setCurrentIndex(selectedIndex)\n }\n }, [selectedIndex, range])\n\n // 是否处于归中状态\n const isCenterTimerId = React.useRef<NodeJS.Timeout | null>(null)\n\n // 简化为直接在滚动结束时通知父组件\n const handleScrollEnd = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n // 做一个0.1s延时 0.1s之内没有新的滑动 则把选项归到中间 然后更新选中项\n isCenterTimerId.current = setTimeout(() => {\n if (!scrollViewRef.current) return\n\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop)\n setIsTouching(false)\n // 调用updateIndex执行限位逻辑,获取是否触发了限位\n const isLimited = Boolean(updateIndex(newIndex, columnId, true))\n // 如果没有触发限位,才执行归中逻辑\n if (!isLimited) {\n const baseValue = newIndex * itemHeightRef.current\n const randomOffset = Math.random() * 0.001\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, randomOffset, lengthScaleRatioRef.current)\n }\n isCenterTimerId.current = null\n }, 100)\n }\n\n // 滚动处理\n const handleScroll = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop)\n if (newIndex !== currentIndex) {\n setCurrentIndex(newIndex)\n }\n }\n\n // 渲染选项\n const pickerItem = range.map((item, index) => {\n const content = rangeKey && item && typeof item === 'object' ? item[rangeKey] : item\n\n return (\n <View\n id={`picker-item-${columnId}-${index}`}\n key={index}\n ref={(el) => (itemRefs.current[index] = el)}\n className={`taro-picker__item${index === currentIndex ? ' taro-picker__item--selected' : ''}`}\n style={{\n height: PICKER_LINE_HEIGHT,\n color: index === currentIndex\n ? (colors.itemSelectedColor || undefined)\n : (colors.itemDefaultColor || undefined)\n }}\n >\n {content}\n </View>\n )\n })\n\n const realPickerItems = [\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-top-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ...pickerItem,\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-bottom-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ]\n\n return (\n <View className=\"taro-picker__group\">\n <View className=\"taro-picker__mask\" />\n <View\n className=\"taro-picker__indicator\"\n {...(indicatorStyle ? { style: indicatorStyle } : {})}\n />\n <ScrollView\n ref={scrollViewRef}\n scrollY\n showScrollbar={false}\n className=\"taro-picker__content\"\n style={{\n height: PICKER_LINE_HEIGHT * PICKER_VISIBLE_ITEMS,\n }}\n scrollTop={targetScrollTop}\n onScroll={handleScroll}\n onTouchStart={() => setIsTouching(true)}\n onScrollEnd={handleScrollEnd}\n scrollWithAnimation\n >\n {realPickerItems}\n </ScrollView>\n </View>\n )\n}\n\n// 日期选择器实现\nexport function PickerGroupDate(props: PickerGroupProps) {\n const {\n range = [],\n columnId,\n updateDay,\n selectedIndex = 0,\n colors = {},\n } = props\n\n const indicatorStyle = colors.lineColor ? getIndicatorStyle(colors.lineColor) : null\n const [targetScrollTop, setTargetScrollTop] = React.useState(0)\n const scrollViewRef = React.useRef<TaroScrollView>(null)\n const [currentIndex, setCurrentIndex] = React.useState(selectedIndex)\n const [isTouching, setIsTouching] = React.useState(false)\n\n const lengthScaleRatioRef = React.useRef(1)\n const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT)\n\n // 初始化时计算 lengthScaleRatio\n React.useEffect(() => {\n Taro.getSystemInfo({\n success: (res) => {\n lengthScaleRatioRef.current = calculateLengthScaleRatio(res)\n },\n fail: () => {\n // 失败时使用默认值 1\n lengthScaleRatioRef.current = 1\n }\n })\n }, [])\n\n React.useEffect(() => {\n if (process.env.TARO_PLATFORM === 'harmony') {\n itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current\n } else {\n if (scrollViewRef.current && scrollViewRef.current?.scrollHeight) {\n itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length\n } else {\n console.warn('Height measurement anomaly')\n }\n }\n }, [range.length]) // 只在range长度变化时重新计算\n\n const getSelectedIndex = (scrollTop: number) => {\n return Math.round(scrollTop / itemHeightRef.current)\n }\n\n // 当selectedIndex变化时,调整滚动位置\n React.useEffect(() => {\n if (scrollViewRef.current && range.length > 0 && !isTouching) {\n const baseValue = selectedIndex * itemHeightRef.current\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, undefined, lengthScaleRatioRef.current)\n setCurrentIndex(selectedIndex)\n }\n }, [selectedIndex, range])\n\n // 是否处于归中状态\n const isCenterTimerId = React.useRef<NodeJS.Timeout | null>(null)\n\n // 简化为直接在滚动结束时通知父组件\n const handleScrollEnd = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n\n // 做一个0.1s延时 0.1s之内没有新的滑动 则把选项归到中间 然后更新选中项\n isCenterTimerId.current = setTimeout(() => {\n if (!scrollViewRef.current) return\n\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop)\n\n setIsTouching(false)\n const baseValue = newIndex * itemHeightRef.current\n const randomOffset = Math.random() * 0.001 // 随机数为了在一个项内滚动时强制刷新\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, randomOffset, lengthScaleRatioRef.current)\n\n // 更新日期值\n if (updateDay) {\n // 解析文本中的数字(移除年、月、日等后缀)\n const valueText = range[newIndex] || ''\n const numericValue = parseInt(valueText.replace(/[^0-9]/g, ''))\n updateDay(isNaN(numericValue) ? 0 : numericValue, parseInt(columnId))\n }\n isCenterTimerId.current = null\n }, 100)\n }\n\n // 滚动处理\n const handleScroll = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop)\n if (newIndex !== currentIndex) {\n setCurrentIndex(newIndex)\n }\n }\n\n // 渲染选项\n const pickerItem = range.map((item, index) => {\n return (\n <View\n id={`picker-item-${columnId}-${index}`}\n key={index}\n className={`taro-picker__item${index === currentIndex ? ' taro-picker__item--selected' : ''}`}\n style={{\n height: PICKER_LINE_HEIGHT,\n color: index === currentIndex\n ? (colors.itemSelectedColor || undefined)\n : (colors.itemDefaultColor || undefined)\n }}\n >\n {item}\n </View>\n )\n })\n\n const realPickerItems = [\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-top-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ...pickerItem,\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-bottom-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ]\n\n return (\n <View className=\"taro-picker__group\">\n <View className=\"taro-picker__mask\" />\n <View\n className=\"taro-picker__indicator\"\n {...(indicatorStyle ? { style: indicatorStyle } : {})}\n />\n <ScrollView\n ref={scrollViewRef}\n scrollY\n showScrollbar={false}\n className=\"taro-picker__content\"\n style={{ height: PICKER_LINE_HEIGHT * PICKER_VISIBLE_ITEMS }}\n scrollTop={targetScrollTop}\n onScroll={handleScroll}\n onTouchStart={() => setIsTouching(true)}\n onScrollEnd={handleScrollEnd}\n scrollWithAnimation\n >\n {realPickerItems}\n </ScrollView>\n </View>\n )\n}\n\n// 地区选择器实现\nexport function PickerGroupRegion(props: PickerGroupProps) {\n const {\n range = [],\n rangeKey,\n columnId,\n updateIndex,\n selectedIndex = 0, // 使用selectedIndex参数,默认为0\n colors = {},\n } = props\n\n const indicatorStyle = colors.lineColor ? getIndicatorStyle(colors.lineColor) : null\n const scrollViewRef = React.useRef<any>(null)\n const [targetScrollTop, setTargetScrollTop] = React.useState(0)\n const [currentIndex, setCurrentIndex] = React.useState(selectedIndex)\n const [isTouching, setIsTouching] = React.useState(false)\n\n const lengthScaleRatioRef = React.useRef(1)\n const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT)\n const isUserBeginScrollRef = React.useRef(false)\n\n // 初始化时计算 lengthScaleRatio\n React.useEffect(() => {\n Taro.getSystemInfo({\n success: (res) => {\n lengthScaleRatioRef.current = calculateLengthScaleRatio(res)\n },\n fail: () => {\n // 失败时使用默认值 1\n lengthScaleRatioRef.current = 1\n }\n })\n }, [])\n\n React.useEffect(() => {\n if (process.env.TARO_PLATFORM === 'harmony') {\n itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current\n } else {\n if (scrollViewRef.current && scrollViewRef.current?.scrollHeight) {\n itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length\n } else {\n console.warn('Height measurement anomaly')\n }\n }\n }, [range.length]) // 只在range长度变化时重新计算\n\n const getSelectedIndex = (scrollTop: number) => {\n return Math.round(scrollTop / itemHeightRef.current)\n }\n\n // 当selectedIndex变化时,调整滚动位置\n React.useEffect(() => {\n if (scrollViewRef.current && range.length > 0 && !isTouching) {\n const baseValue = selectedIndex * itemHeightRef.current\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue)\n setCurrentIndex(selectedIndex)\n }\n }, [selectedIndex, range])\n\n // 滚动结束处理\n const isCenterTimerId = React.useRef<NodeJS.Timeout | null>(null)\n const handleScrollEnd = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n // 做一个0.1s延时 0.1s之内没有新的滑动 则把选项归到中间 然后更新选中项\n isCenterTimerId.current = setTimeout(() => {\n if (!scrollViewRef.current) return\n\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop)\n\n setIsTouching(false)\n const baseValue = newIndex * itemHeightRef.current\n const randomOffset = Math.random() * 0.001 // 随机数为了在一个项内滚动时强制刷新\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, randomOffset, lengthScaleRatioRef.current)\n updateIndex(newIndex, columnId, false, isUserBeginScrollRef.current)\n }, 100)\n }\n\n // 滚动处理 - 在滚动时计算索引\n const handleScroll = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop)\n if (newIndex !== currentIndex) {\n setCurrentIndex(newIndex)\n }\n }\n\n // 渲染选项\n const pickerItem = range.map((item, index) => {\n const content = rangeKey && item && typeof item === 'object' ? item[rangeKey] : item\n\n return (\n <View\n id={`picker-item-${columnId}-${index}`}\n key={index}\n className={`taro-picker__item${index === currentIndex ? ' taro-picker__item--selected' : ''}`}\n style={{\n height: PICKER_LINE_HEIGHT,\n color: index === currentIndex\n ? (colors.itemSelectedColor || undefined)\n : (colors.itemDefaultColor || undefined)\n }}\n >\n {content}\n </View>\n )\n })\n\n const realPickerItems = [\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-top-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ...pickerItem,\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-bottom-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ]\n return (\n <View className=\"taro-picker__group\">\n <View className=\"taro-picker__mask\" />\n <View\n className=\"taro-picker__indicator\"\n {...(indicatorStyle ? { style: indicatorStyle } : {})}\n />\n <ScrollView\n ref={scrollViewRef}\n scrollY\n showScrollbar={false}\n className=\"taro-picker__content\"\n style={{ height: PICKER_LINE_HEIGHT * PICKER_VISIBLE_ITEMS }}\n scrollTop={targetScrollTop}\n onScroll={handleScroll}\n onTouchStart={() => {\n setIsTouching(true)\n isUserBeginScrollRef.current = true\n }}\n onScrollEnd={handleScrollEnd}\n scrollWithAnimation\n >\n {realPickerItems}\n </ScrollView>\n </View>\n )\n}\n\n// 默认导出,根据 mode 自动分发\nexport function PickerGroup(props: PickerGroupProps) {\n switch (props.mode) {\n case 'time':\n return <PickerGroupTime {...props} />\n case 'date':\n return <PickerGroupDate {...props} />\n case 'region':\n return <PickerGroupRegion {...props} />\n default:\n return <PickerGroupBasic {...props} />\n }\n}\n"],"names":["PICKER_LINE_HEIGHT","PICKER_VISIBLE_ITEMS","PICKER_BLANK_ITEMS","getIndicatorStyle","lineColor","borderTopColor","borderBottomColor","calculateLengthScaleRatio","res","lengthScaleRatio","console","warn","windowWidth","shortSide","windowHeight","isBigScreen","setTargetScrollTopWithScale","setTargetScrollTop","baseValue","randomOffset","arguments","length","undefined","process","env","TARO_ENV","finalValue","TARO_PLATFORM","scaledValue","PickerGroupBasic","props","range","rangeKey","columnId","updateIndex","onColumnChange","selectedIndex","colors","indicatorStyle","targetScrollTop","React","useState","scrollViewRef","useRef","itemRefs","currentIndex","setCurrentIndex","isTouching","setIsTouching","lengthScaleRatioRef","itemHeightRef","useEffect","Taro","getSystemInfo","success","current","fail","_a","scrollHeight","childNodes","getSelectedIndex","scrollTop","Math","round","isCenterTimerId","handleScrollEnd","clearTimeout","setTimeout","newIndex","random","index","handleScroll","pickerItem","map","item","content","_$createComponent","View","id","key","ref","el","className","style","height","color","itemSelectedColor","itemDefaultColor","children","realPickerItems","Array","fill","_","idx","_$mergeProps","ScrollView","scrollY","showScrollbar","onScroll","onTouchStart","onScrollEnd","scrollWithAnimation","PickerGroupTime","isLimited","Boolean","PickerGroupDate","updateDay","valueText","numericValue","parseInt","replace","isNaN","PickerGroupRegion","isUserBeginScrollRef","PickerGroup","mode"],"mappings":";;;;;AAyBA;AACA,MAAMA,kBAAkB,GAAG,EAAE,CAAA;AAC7B,MAAMC,oBAAoB,GAAG,CAAC,CAAA;AAC9B,MAAMC,kBAAkB,GAAG,CAAC,CAAA;AAE5B,MAAMC,iBAAiB,GAAIC,SAAiB,IAAyB;EACnE,OAAO;AACLC,IAAAA,cAAc,EAAED,SAAS;AACzBE,IAAAA,iBAAiB,EAAEF;GACpB;AACH,CAAC;AAED;AACA,MAAMG,yBAAyB,GAAIC,GAA8B,IAAY;AAC3E,EAAA,IAAIC,gBAAgB,GAAID,GAAW,KAAA,IAAA,IAAXA,GAAG,KAAH,KAAA,CAAA,GAAA,KAAA,CAAA,GAAAA,GAAG,CAAUC,gBAAgB;AACrD,EAAA,IAAIA,gBAAgB,IAAI,IAAI,IAAIA,gBAAgB,KAAK,CAAC,EAAE;AACtDC,IAAAA,OAAO,CAACC,IAAI,CAAC,gDAAgD,CAAC;AAC9DF,IAAAA,gBAAgB,GAAG,CAAC;AACpB,IAAA,IAAID,GAAG,CAACI,WAAW,GAAG,GAAG,EAAE;AACzBH,MAAAA,gBAAgB,GAAGD,GAAG,CAACI,WAAW,GAAG,GAAG;AAC1C,KAAC,MAAM,IAAIJ,GA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O,GAAG,IAAI;SACpC;AACD6C,QAAAA,WAAW,EAAEnC,eAAe;QAC5BoC,mBAAmB,EAAA,IAAA;AAAAb,QAAAA,QAAA,EAElBC;AAAe,OAAA,CAAA,CAAA;AAAA;AAAA,GAAA,CAAA;AAIxB;AAEA;AACM,SAAUyB,WAAWA,CAACpF,KAAuB,EAAA;EACjD,QAAQA,KAAK,CAACqF,IAAI;AAChB,IAAA,KAAK,MAAM;AACT,MAAA,OAAAvC,eAAA,CAAQ0B,eAAe,EAAKxE,KAAK,CAAA;AACnC,IAAA,KAAK,MAAM;AACT,MAAA,OAAA8C,eAAA,CAAQ6B,eAAe,EAAK3E,KAAK,CAAA;AACnC,IAAA,KAAK,QAAQ;AACX,MAAA,OAAA8C,eAAA,CAAQoC,iBAAiB,EAAKlF,KAAK,CAAA;AACrC,IAAA;AACE,MAAA,OAAA8C,eAAA,CAAQ/C,gBAAgB,EAAKC,KAAK,CAAA;AACtC;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"picker-group.js","sources":["../../../../src/components/picker/picker-group.tsx"],"sourcesContent":["import { ScrollView, View } from '@tarojs/components'\nimport Taro from '@tarojs/taro'\nimport * as React from 'react'\n\n// 添加类型定义\ntype TaroScrollView = React.ElementRef<typeof ScrollView>\ntype TaroView = React.ElementRef<typeof View>\n\nexport interface PickerGroupProps {\n mode?: 'basic' | 'time' | 'date' | 'region'\n range: any[]\n rangeKey?: string\n columnId: string\n updateIndex: (index: number, columnId: string, needRevise?: boolean, isUserBeginScroll?: boolean) => void // 替换updateHeight\n onColumnChange?: (e: { columnId: string, index: number }) => void // 修改回调参数名称\n updateDay?: (value: number, fields: number) => void\n selectedIndex?: number // 添加selectedIndex参数\n _updateTrigger?: any // 仅用于强制触发更新\n colors?: {\n itemDefaultColor?: string // 选项字体默认颜色\n itemSelectedColor?: string // 选项字体选中颜色\n lineColor?: string // 选中指示线颜色\n }\n}\n\n// 定义常量\nconst PICKER_LINE_HEIGHT = 34 // px\nconst PICKER_VISIBLE_ITEMS = 7 // 可见行数\nconst PICKER_BLANK_ITEMS = 3 // 空白行数\n\nconst getIndicatorStyle = (lineColor: string): React.CSSProperties => {\n return {\n borderTopColor: lineColor,\n borderBottomColor: lineColor\n }\n}\n\n// 大屏方案版本要求\nconst MIN_DESIGN_APP_VERSION = 16\nconst MIN_APP_VERSION = '15.7.0'\n\n// semver 版本比较\nconst isAppVersionAtLeast = (version: string | undefined, min: string): boolean => {\n if (!version || typeof version !== 'string') return false\n const parts = (v: string) => {\n const m = String(v).trim().match(/^(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?/)\n if (!m) return []\n return [parseInt(m[1], 10) || 0, parseInt(m[2] || '0', 10) || 0, parseInt(m[3] || '0', 10) || 0]\n }\n const a = parts(version)\n const b = parts(min)\n if (a.length === 0) return false\n if (b.length === 0) return true\n for (let i = 0; i < Math.max(a.length, b.length); i++) {\n const da = a[i] ?? 0\n const db = b[i] ?? 0\n if (da > db) return true\n if (da < db) return false\n }\n return true\n}\n\n// 读取 JDMobileConfig,异常时返回 undefined\nconst tryGetMobileConfigSync = (opt: { space: string, configName: string, key: string }): unknown => {\n try {\n const fn = (Taro as any).JDMobileConfig?.getMobileConfigSync\n if (typeof fn !== 'function') return undefined\n return fn(opt)\n } catch {\n return undefined\n }\n}\n\n// 判断是否启用测量值缩放适配(true=启用, false=使用系统侧缩放)\nconst resolveUseMeasuredScale = (res: Taro.getSystemInfo.Result): boolean => {\n // H5/weapp 不参与大屏系数\n if (process.env.TARO_ENV === 'h5' || process.env.TARO_ENV === 'weapp') {\n return false\n }\n\n // 条件1: designAppVersion < 16,不满足则使用系统侧缩放\n const designAppVersionRaw = (res as any).designAppVersion\n const designAppVersionMajor = designAppVersionRaw != null ? parseInt(String(designAppVersionRaw).trim(), 10) : Number.NaN\n if (!Number.isFinite(designAppVersionMajor) || designAppVersionMajor < MIN_DESIGN_APP_VERSION) {\n return false\n }\n\n // 条件2: appVersion < 15.7.0,不满足则使用系统侧缩放\n if (!isAppVersionAtLeast(res.version, MIN_APP_VERSION)) {\n return false\n }\n\n // 条件3: 平台判断\n const platform = String((res as any).platform || '').toLowerCase()\n if (platform === 'harmony') {\n return true\n }\n if (platform === 'android') {\n const raw = tryGetMobileConfigSync({ space: 'taro', configName: 'config', key: 'disableFixBoundingScaleRatio' })\n return raw !== 1 && raw !== '1'\n }\n if (platform === 'ios') {\n const raw = tryGetMobileConfigSync({ space: 'Taro', configName: 'excutor', key: 'disableBoundingScaleRatio' })\n return raw !== 1 && raw !== '1'\n }\n\n return false\n}\n\n// 辅助函数:计算 lengthScaleRatio\nconst calculateLengthScaleRatio = (res: Taro.getSystemInfo.Result): number => {\n let lengthScaleRatio = (res as any)?.lengthScaleRatio\n if (lengthScaleRatio == null || lengthScaleRatio === 0) {\n console.warn('Taro.getSystemInfo: lengthScaleRatio 不存在,使用计算值')\n lengthScaleRatio = 1\n if (res.windowWidth < 320) {\n lengthScaleRatio = res.windowWidth / 320\n } else if (res.windowWidth >= 400 && res.windowWidth < 600) {\n lengthScaleRatio = res.windowWidth / 400\n }\n const shortSide = res.windowWidth < res.windowHeight ? res.windowWidth : res.windowHeight\n const isBigScreen = shortSide >= 600\n if (isBigScreen) {\n lengthScaleRatio = shortSide / 720\n }\n }\n return lengthScaleRatio\n}\n\n// 辅助函数:获取系统信息的 lengthScaleRatio 并设置 targetScrollTop\nconst setTargetScrollTopWithScale = (\n setTargetScrollTop: (value: number) => void,\n baseValue: number,\n randomOffset?: number,\n lengthScaleRatio: number = 1,\n) => {\n // H5 和 weapp 不参与放大计算,直接使用 baseValue\n if (process.env.TARO_ENV === 'h5' || process.env.TARO_ENV === 'weapp') {\n const finalValue = randomOffset !== undefined ? baseValue + randomOffset : baseValue\n setTargetScrollTop(finalValue)\n return\n }\n\n if (process.env.TARO_PLATFORM === 'harmony') {\n const scaledValue = baseValue\n const finalValue = randomOffset !== undefined ? scaledValue + randomOffset : scaledValue\n setTargetScrollTop(finalValue)\n } else {\n const scaledValue = baseValue * lengthScaleRatio\n const finalValue = randomOffset !== undefined ? scaledValue + randomOffset : scaledValue\n setTargetScrollTop(finalValue)\n }\n}\n\n// 根据 scrollTop 计算选中索引\n// 系统侧缩放模式:scrollHeight 已被系统缩放,直接相除即可\n// 自行缩放模式:需要除以 ratio 换算(harmony 特殊处理,ratio 已内嵌在 itemHeight 中)\nconst getSelectedIndex = (scrollTop: number, itemHeight: number, lengthScaleRatio: number = 1, useMeasuredScale: boolean = false): number => {\n if (!useMeasuredScale || process.env.TARO_PLATFORM === 'harmony') {\n return Math.round(scrollTop / itemHeight)\n }\n return Math.round(scrollTop / lengthScaleRatio / itemHeight)\n}\n\n// 计算单项高度(返回设计稿值)\nconst calculateItemHeight = (\n scrollView: TaroScrollView | null,\n lengthScaleRatio: number,\n useMeasuredScale: boolean = false,\n): number => {\n if (process.env.TARO_PLATFORM === 'harmony') {\n return useMeasuredScale ? PICKER_LINE_HEIGHT * lengthScaleRatio : PICKER_LINE_HEIGHT\n }\n if (scrollView && scrollView?.scrollHeight) {\n return useMeasuredScale\n ? scrollView.scrollHeight / lengthScaleRatio / scrollView.childNodes.length\n : scrollView.scrollHeight / scrollView.childNodes.length\n }\n console.warn('Height measurement anomaly')\n return PICKER_LINE_HEIGHT\n}\n\nexport function PickerGroupBasic(props: PickerGroupProps) {\n const {\n range = [],\n rangeKey,\n columnId,\n updateIndex,\n onColumnChange,\n selectedIndex = 0, // 使用selectedIndex参数,默认为0\n colors = {},\n } = props\n const indicatorStyle = colors.lineColor ? getIndicatorStyle(colors.lineColor) : null\n const [targetScrollTop, setTargetScrollTop] = React.useState(0)\n const scrollViewRef = React.useRef<TaroScrollView>(null)\n const itemRefs = React.useRef<Array<TaroView | null>>([])\n // 使用selectedIndex初始化当前索引\n const [currentIndex, setCurrentIndex] = React.useState(selectedIndex)\n // 触摸状态用于优化用户体验\n const [isTouching, setIsTouching] = React.useState(false)\n\n const lengthScaleRatioRef = React.useRef(1)\n const useMeasuredScaleRef = React.useRef(false)\n const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT)\n\n // 初始化时计算 lengthScaleRatio 并判定缩放模式\n React.useEffect(() => {\n Taro.getSystemInfo({\n success: (res) => {\n lengthScaleRatioRef.current = calculateLengthScaleRatio(res)\n useMeasuredScaleRef.current = resolveUseMeasuredScale(res)\n itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n },\n fail: () => {\n lengthScaleRatioRef.current = 1\n useMeasuredScaleRef.current = false\n }\n })\n }, [])\n\n React.useEffect(() => {\n itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n }, [range.length]) // 只在range长度变化时重新计算\n\n // 当selectedIndex变化时,调整滚动位置\n React.useEffect(() => {\n if (scrollViewRef.current && range.length > 0 && !isTouching) {\n const baseValue = selectedIndex * itemHeightRef.current\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, undefined, lengthScaleRatioRef.current)\n setCurrentIndex(selectedIndex)\n }\n }, [selectedIndex, range])\n\n // 是否处于归中状态\n const isCenterTimerId = React.useRef<NodeJS.Timeout | null>(null)\n // 简化为直接在滚动结束时通知父组件\n const handleScrollEnd = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n // 做一个0.1s延时 0.1s之内没有新的滑动 则把选项归到中间 然后更新选中项\n isCenterTimerId.current = setTimeout(() => {\n if (!scrollViewRef.current) return\n\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n\n setIsTouching(false)\n const baseValue = newIndex * itemHeightRef.current\n const randomOffset = Math.random() * 0.001 // 随机数为了在一个项内滚动时强制刷新\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, randomOffset, lengthScaleRatioRef.current)\n updateIndex(newIndex, columnId)\n onColumnChange?.({ columnId, index: newIndex })\n isCenterTimerId.current = null\n }, 100)\n }\n // 滚动处理 - 在滚动时计算索引然后更新选中项样式\n const handleScroll = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n if (newIndex !== currentIndex) {\n setCurrentIndex(newIndex)\n }\n }\n\n // 渲染选项\n const pickerItem = range.map((item, index) => {\n const content = rangeKey && item && typeof item === 'object' ? item[rangeKey] : item\n\n return (\n <View\n id={`picker-item-${columnId}-${index}`}\n key={index}\n ref={(el) => (itemRefs.current[index] = el)}\n className={`taro-picker__item${index === currentIndex ? ' taro-picker__item--selected' : ''}`}\n style={{\n height: PICKER_LINE_HEIGHT,\n color: index === currentIndex\n ? (colors.itemSelectedColor || undefined)\n : (colors.itemDefaultColor || undefined)\n }}\n >\n {content}\n </View>\n )\n })\n\n const realPickerItems = [\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-top-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ...pickerItem,\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-bottom-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ]\n\n return (\n <View className=\"taro-picker__group\">\n <View className=\"taro-picker__mask\" />\n <View\n className=\"taro-picker__indicator\"\n {...(indicatorStyle ? { style: indicatorStyle } : {})}\n />\n <ScrollView\n ref={scrollViewRef}\n scrollY\n showScrollbar={false}\n className=\"taro-picker__content\"\n style={{\n height: PICKER_LINE_HEIGHT * PICKER_VISIBLE_ITEMS,\n }}\n scrollTop={targetScrollTop}\n onScroll={handleScroll}\n onTouchStart={() => setIsTouching(true)}\n onScrollEnd={handleScrollEnd}\n scrollWithAnimation\n >\n {realPickerItems}\n </ScrollView>\n </View>\n )\n}\n\n// 时间选择器实现\nexport function PickerGroupTime(props: PickerGroupProps) {\n const {\n range = [],\n rangeKey,\n columnId,\n updateIndex,\n selectedIndex = 0,\n colors = {},\n } = props\n\n const indicatorStyle = colors.lineColor ? getIndicatorStyle(colors.lineColor) : null\n const [targetScrollTop, setTargetScrollTop] = React.useState(0)\n const scrollViewRef = React.useRef<TaroScrollView>(null)\n const itemRefs = React.useRef<Array<TaroView | null>>([])\n const [currentIndex, setCurrentIndex] = React.useState(selectedIndex)\n const [isTouching, setIsTouching] = React.useState(false)\n\n const lengthScaleRatioRef = React.useRef(1)\n const useMeasuredScaleRef = React.useRef(false)\n const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT)\n\n // 初始化时计算 lengthScaleRatio 并判定缩放模式\n React.useEffect(() => {\n Taro.getSystemInfo({\n success: (res) => {\n lengthScaleRatioRef.current = calculateLengthScaleRatio(res)\n useMeasuredScaleRef.current = resolveUseMeasuredScale(res)\n itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n },\n fail: () => {\n lengthScaleRatioRef.current = 1\n useMeasuredScaleRef.current = false\n }\n })\n }, [])\n\n React.useEffect(() => {\n itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n }, [range.length]) // 只在range长度变化时重新计算\n\n // 当selectedIndex变化时,调整滚动位置\n React.useEffect(() => {\n if (scrollViewRef.current && range.length > 0 && !isTouching) {\n const baseValue = selectedIndex * itemHeightRef.current\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, undefined, lengthScaleRatioRef.current)\n setCurrentIndex(selectedIndex)\n }\n }, [selectedIndex, range])\n\n // 是否处于归中状态\n const isCenterTimerId = React.useRef<NodeJS.Timeout | null>(null)\n\n // 简化为直接在滚动结束时通知父组件\n const handleScrollEnd = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n // 做一个0.1s延时 0.1s之内没有新的滑动 则把选项归到中间 然后更新选中项\n isCenterTimerId.current = setTimeout(() => {\n if (!scrollViewRef.current) return\n\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n setIsTouching(false)\n // 调用updateIndex执行限位逻辑,获取是否触发了限位\n const isLimited = Boolean(updateIndex(newIndex, columnId, true))\n // 如果没有触发限位,才执行归中逻辑\n if (!isLimited) {\n const baseValue = newIndex * itemHeightRef.current\n const randomOffset = Math.random() * 0.001\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, randomOffset, lengthScaleRatioRef.current)\n }\n isCenterTimerId.current = null\n }, 100)\n }\n\n // 滚动处理\n const handleScroll = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n if (newIndex !== currentIndex) {\n setCurrentIndex(newIndex)\n }\n }\n\n // 渲染选项\n const pickerItem = range.map((item, index) => {\n const content = rangeKey && item && typeof item === 'object' ? item[rangeKey] : item\n\n return (\n <View\n id={`picker-item-${columnId}-${index}`}\n key={index}\n ref={(el) => (itemRefs.current[index] = el)}\n className={`taro-picker__item${index === currentIndex ? ' taro-picker__item--selected' : ''}`}\n style={{\n height: PICKER_LINE_HEIGHT,\n color: index === currentIndex\n ? (colors.itemSelectedColor || undefined)\n : (colors.itemDefaultColor || undefined)\n }}\n >\n {content}\n </View>\n )\n })\n\n const realPickerItems = [\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-top-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ...pickerItem,\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-bottom-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ]\n\n return (\n <View className=\"taro-picker__group\">\n <View className=\"taro-picker__mask\" />\n <View\n className=\"taro-picker__indicator\"\n {...(indicatorStyle ? { style: indicatorStyle } : {})}\n />\n <ScrollView\n ref={scrollViewRef}\n scrollY\n showScrollbar={false}\n className=\"taro-picker__content\"\n style={{\n height: PICKER_LINE_HEIGHT * PICKER_VISIBLE_ITEMS,\n }}\n scrollTop={targetScrollTop}\n onScroll={handleScroll}\n onTouchStart={() => setIsTouching(true)}\n onScrollEnd={handleScrollEnd}\n scrollWithAnimation\n >\n {realPickerItems}\n </ScrollView>\n </View>\n )\n}\n\n// 日期选择器实现\nexport function PickerGroupDate(props: PickerGroupProps) {\n const {\n range = [],\n columnId,\n updateDay,\n selectedIndex = 0,\n colors = {},\n } = props\n\n const indicatorStyle = colors.lineColor ? getIndicatorStyle(colors.lineColor) : null\n const [targetScrollTop, setTargetScrollTop] = React.useState(0)\n const scrollViewRef = React.useRef<TaroScrollView>(null)\n const [currentIndex, setCurrentIndex] = React.useState(selectedIndex)\n const [isTouching, setIsTouching] = React.useState(false)\n\n const lengthScaleRatioRef = React.useRef(1)\n const useMeasuredScaleRef = React.useRef(false)\n const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT)\n\n // 初始化时计算 lengthScaleRatio 并判定缩放模式\n React.useEffect(() => {\n Taro.getSystemInfo({\n success: (res) => {\n lengthScaleRatioRef.current = calculateLengthScaleRatio(res)\n useMeasuredScaleRef.current = resolveUseMeasuredScale(res)\n itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n },\n fail: () => {\n lengthScaleRatioRef.current = 1\n useMeasuredScaleRef.current = false\n }\n })\n }, [])\n\n React.useEffect(() => {\n itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n }, [range.length]) // 只在range长度变化时重新计算\n\n // 当selectedIndex变化时,调整滚动位置\n React.useEffect(() => {\n if (scrollViewRef.current && range.length > 0 && !isTouching) {\n const baseValue = selectedIndex * itemHeightRef.current\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, undefined, lengthScaleRatioRef.current)\n setCurrentIndex(selectedIndex)\n }\n }, [selectedIndex, range])\n\n // 是否处于归中状态\n const isCenterTimerId = React.useRef<NodeJS.Timeout | null>(null)\n\n // 简化为直接在滚动结束时通知父组件\n const handleScrollEnd = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n\n // 做一个0.1s延时 0.1s之内没有新的滑动 则把选项归到中间 然后更新选中项\n isCenterTimerId.current = setTimeout(() => {\n if (!scrollViewRef.current) return\n\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n\n setIsTouching(false)\n const baseValue = newIndex * itemHeightRef.current\n const randomOffset = Math.random() * 0.001 // 随机数为了在一个项内滚动时强制刷新\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, randomOffset, lengthScaleRatioRef.current)\n\n // 更新日期值\n if (updateDay) {\n // 解析文本中的数字(移除年、月、日等后缀)\n const valueText = range[newIndex] || ''\n const numericValue = parseInt(valueText.replace(/[^0-9]/g, ''))\n updateDay(isNaN(numericValue) ? 0 : numericValue, parseInt(columnId))\n }\n isCenterTimerId.current = null\n }, 100)\n }\n\n // 滚动处理\n const handleScroll = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n if (newIndex !== currentIndex) {\n setCurrentIndex(newIndex)\n }\n }\n\n // 渲染选项\n const pickerItem = range.map((item, index) => {\n return (\n <View\n id={`picker-item-${columnId}-${index}`}\n key={index}\n className={`taro-picker__item${index === currentIndex ? ' taro-picker__item--selected' : ''}`}\n style={{\n height: PICKER_LINE_HEIGHT,\n color: index === currentIndex\n ? (colors.itemSelectedColor || undefined)\n : (colors.itemDefaultColor || undefined)\n }}\n >\n {item}\n </View>\n )\n })\n\n const realPickerItems = [\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-top-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ...pickerItem,\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-bottom-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ]\n\n return (\n <View className=\"taro-picker__group\">\n <View className=\"taro-picker__mask\" />\n <View\n className=\"taro-picker__indicator\"\n {...(indicatorStyle ? { style: indicatorStyle } : {})}\n />\n <ScrollView\n ref={scrollViewRef}\n scrollY\n showScrollbar={false}\n className=\"taro-picker__content\"\n style={{ height: PICKER_LINE_HEIGHT * PICKER_VISIBLE_ITEMS }}\n scrollTop={targetScrollTop}\n onScroll={handleScroll}\n onTouchStart={() => setIsTouching(true)}\n onScrollEnd={handleScrollEnd}\n scrollWithAnimation\n >\n {realPickerItems}\n </ScrollView>\n </View>\n )\n}\n\n// 地区选择器实现\nexport function PickerGroupRegion(props: PickerGroupProps) {\n const {\n range = [],\n rangeKey,\n columnId,\n updateIndex,\n selectedIndex = 0, // 使用selectedIndex参数,默认为0\n colors = {},\n } = props\n\n const indicatorStyle = colors.lineColor ? getIndicatorStyle(colors.lineColor) : null\n const scrollViewRef = React.useRef<any>(null)\n const [targetScrollTop, setTargetScrollTop] = React.useState(0)\n const [currentIndex, setCurrentIndex] = React.useState(selectedIndex)\n const [isTouching, setIsTouching] = React.useState(false)\n\n const lengthScaleRatioRef = React.useRef(1)\n const useMeasuredScaleRef = React.useRef(false)\n const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT)\n const isUserBeginScrollRef = React.useRef(false)\n\n // 初始化时计算 lengthScaleRatio 并判定缩放模式\n React.useEffect(() => {\n Taro.getSystemInfo({\n success: (res) => {\n lengthScaleRatioRef.current = calculateLengthScaleRatio(res)\n useMeasuredScaleRef.current = resolveUseMeasuredScale(res)\n itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n },\n fail: () => {\n lengthScaleRatioRef.current = 1\n useMeasuredScaleRef.current = false\n }\n })\n }, [])\n\n React.useEffect(() => {\n itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n }, [range.length]) // 只在range长度变化时重新计算\n\n // 当selectedIndex变化时,调整滚动位置\n React.useEffect(() => {\n if (scrollViewRef.current && range.length > 0 && !isTouching) {\n const baseValue = selectedIndex * itemHeightRef.current\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, undefined, lengthScaleRatioRef.current)\n setCurrentIndex(selectedIndex)\n }\n }, [selectedIndex, range])\n\n // 滚动结束处理\n const isCenterTimerId = React.useRef<NodeJS.Timeout | null>(null)\n const handleScrollEnd = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n // 做一个0.1s延时 0.1s之内没有新的滑动 则把选项归到中间 然后更新选中项\n isCenterTimerId.current = setTimeout(() => {\n if (!scrollViewRef.current) return\n\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n\n setIsTouching(false)\n const baseValue = newIndex * itemHeightRef.current\n const randomOffset = Math.random() * 0.001 // 随机数为了在一个项内滚动时强制刷新\n setTargetScrollTopWithScale(setTargetScrollTop, baseValue, randomOffset, lengthScaleRatioRef.current)\n updateIndex(newIndex, columnId, false, isUserBeginScrollRef.current)\n }, 100)\n }\n\n // 滚动处理 - 在滚动时计算索引\n const handleScroll = () => {\n if (!scrollViewRef.current) return\n if (isCenterTimerId.current) {\n clearTimeout(isCenterTimerId.current)\n isCenterTimerId.current = null\n }\n const scrollTop = scrollViewRef.current.scrollTop\n const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current)\n if (newIndex !== currentIndex) {\n setCurrentIndex(newIndex)\n }\n }\n\n // 渲染选项\n const pickerItem = range.map((item, index) => {\n const content = rangeKey && item && typeof item === 'object' ? item[rangeKey] : item\n\n return (\n <View\n id={`picker-item-${columnId}-${index}`}\n key={index}\n className={`taro-picker__item${index === currentIndex ? ' taro-picker__item--selected' : ''}`}\n style={{\n height: PICKER_LINE_HEIGHT,\n color: index === currentIndex\n ? (colors.itemSelectedColor || undefined)\n : (colors.itemDefaultColor || undefined)\n }}\n >\n {content}\n </View>\n )\n })\n\n const realPickerItems = [\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-top-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ...pickerItem,\n ...new Array(PICKER_BLANK_ITEMS)\n .fill(null)\n .map((_, idx) => (\n <View\n key={`blank-bottom-${idx}`}\n className=\"taro-picker__item taro-picker__item--blank\"\n style={{ height: PICKER_LINE_HEIGHT }}\n />\n )),\n ]\n return (\n <View className=\"taro-picker__group\">\n <View className=\"taro-picker__mask\" />\n <View\n className=\"taro-picker__indicator\"\n {...(indicatorStyle ? { style: indicatorStyle } : {})}\n />\n <ScrollView\n ref={scrollViewRef}\n scrollY\n showScrollbar={false}\n className=\"taro-picker__content\"\n style={{ height: PICKER_LINE_HEIGHT * PICKER_VISIBLE_ITEMS }}\n scrollTop={targetScrollTop}\n onScroll={handleScroll}\n onTouchStart={() => {\n setIsTouching(true)\n isUserBeginScrollRef.current = true\n }}\n onScrollEnd={handleScrollEnd}\n scrollWithAnimation\n >\n {realPickerItems}\n </ScrollView>\n </View>\n )\n}\n\n// 默认导出,根据 mode 自动分发\nexport function PickerGroup(props: PickerGroupProps) {\n switch (props.mode) {\n case 'time':\n return <PickerGroupTime {...props} />\n case 'date':\n return <PickerGroupDate {...props} />\n case 'region':\n return <PickerGroupRegion {...props} />\n default:\n return <PickerGroupBasic {...props} />\n }\n}\n"],"names":["PICKER_LINE_HEIGHT","PICKER_VISIBLE_ITEMS","PICKER_BLANK_ITEMS","getIndicatorStyle","lineColor","borderTopColor","borderBottomColor","MIN_DESIGN_APP_VERSION","MIN_APP_VERSION","isAppVersionAtLeast","version","min","parts","v","m","String","trim","match","parseInt","a","b","length","i","Math","max","da","_a","db","_b","tryGetMobileConfigSync","opt","fn","Taro","JDMobileConfig","getMobileConfigSync","undefined","resolveUseMeasuredScale","res","process","env","TARO_ENV","designAppVersionRaw","designAppVersion","designAppVersionMajor","Number","NaN","isFinite","platform","toLowerCase","raw","space","configName","key","calculateLengthScaleRatio","lengthScaleRatio","console","warn","windowWidth","shortSide","windowHeight","isBigScreen","setTargetScrollTopWithScale","setTargetScrollTop","baseValue","randomOffset","arguments","finalValue","TARO_PLATFORM","scaledValue","getSelectedIndex","scrollTop","itemHeight","useMeasuredScale","round","calculateItemHeight","scrollView","scrollHeight","childNodes","PickerGroupBasic","props","range","rangeKey","columnId","updateIndex","onColumnChange","selectedIndex","colors","indicatorStyle","targetScrollTop","React","useState","scrollViewRef","useRef","itemRefs","currentIndex","setCurrentIndex","isTouching","setIsTouching","lengthScaleRatioRef","useMeasuredScaleRef","itemHeightRef","useEffect","getSystemInfo","success","current","fail","isCenterTimerId","handleScrollEnd","clearTimeout","setTimeout","newIndex","random","index","handleScroll","pickerItem","map","item","content","_$createComponent","View","id","ref","el","className","style","height","color","itemSelectedColor","itemDefaultColor","children","realPickerItems","Array","fill","_","idx","_$mergeProps","ScrollView","scrollY","showScrollbar","onScroll","onTouchStart","onScrollEnd","scrollWithAnimation","PickerGroupTime","isLimited","Boolean","PickerGroupDate","updateDay","valueText","numericValue","replace","isNaN","PickerGroupRegion","isUserBeginScrollRef","PickerGroup","mode"],"mappings":";;;;;AAyBA;AACA,MAAMA,kBAAkB,GAAG,EAAE,CAAA;AAC7B,MAAMC,oBAAoB,GAAG,CAAC,CAAA;AAC9B,MAAMC,kBAAkB,GAAG,CAAC,CAAA;AAE5B,MAAMC,iBAAiB,GAAIC,SAAiB,IAAyB;EACnE,OAAO;AACLC,IAAAA,cAAc,EAAED,SAAS;AACzBE,IAAAA,iBAAiB,EAAEF;GACpB;AACH,CAAC;AAED;AACA,MAAMG,sBAAsB,GAAG,EAAE;AACjC,MAAMC,eAAe,GAAG,QAAQ;AAEhC;AACA,MAAMC,mBAAmB,GAAGA,CAACC,OAA2B,EAAEC,GAAW,KAAa;;EAChF,IAAI,CAACD,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE,OAAO,KAAK;EACzD,MAAME,KAAK,GAAIC,CAAS,IAAI;AAC1B,IAAA,MAAMC,CAAC,GAAGC,MAAM,CAACF,CAAC,CAAC,CAACG,IAAI,EAAE,CAACC,KAAK,CAAC,gCAAgC,CAAC;AAClE,IAAA,IAAI,CAACH,CAAC,EAAE,OAAO,EAAE;AACjB,IAAA,OAAO,CAACI,QAAQ,CAACJ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAEI,QAAQ,CAACJ,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,EAA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