@tarojs/components-react 4.1.12-beta.37 → 4.1.12-beta.39
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/image/index.js +5 -3
- package/dist/components/image/index.js.map +1 -1
- package/dist/components/picker/picker-group.js +130 -70
- package/dist/components/picker/picker-group.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/original/components/image/index.js +5 -3
- package/dist/original/components/image/index.js.map +1 -1
- package/dist/original/components/image/style/index.scss +5 -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/image/index.js +5 -3
- package/dist/solid/components/image/index.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/dist/solid/index.css +1 -1
- package/package.json +6 -6
|
@@ -12,6 +12,80 @@ const getIndicatorStyle = lineColor => {
|
|
|
12
12
|
borderBottomColor: lineColor
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
+
// 大屏方案版本要求
|
|
16
|
+
const MIN_DESIGN_APP_VERSION = 16;
|
|
17
|
+
const MIN_APP_VERSION = '15.7.0';
|
|
18
|
+
// semver 版本比较
|
|
19
|
+
const isAppVersionAtLeast = (version, min) => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
if (!version || typeof version !== 'string') return false;
|
|
22
|
+
const parts = v => {
|
|
23
|
+
const m = String(v).trim().match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
|
|
24
|
+
if (!m) return [];
|
|
25
|
+
return [parseInt(m[1], 10) || 0, parseInt(m[2] || '0', 10) || 0, parseInt(m[3] || '0', 10) || 0];
|
|
26
|
+
};
|
|
27
|
+
const a = parts(version);
|
|
28
|
+
const b = parts(min);
|
|
29
|
+
if (a.length === 0) return false;
|
|
30
|
+
if (b.length === 0) return true;
|
|
31
|
+
for (let i = 0; i < Math.max(a.length, b.length); i++) {
|
|
32
|
+
const da = (_a = a[i]) !== null && _a !== void 0 ? _a : 0;
|
|
33
|
+
const db = (_b = b[i]) !== null && _b !== void 0 ? _b : 0;
|
|
34
|
+
if (da > db) return true;
|
|
35
|
+
if (da < db) return false;
|
|
36
|
+
}
|
|
37
|
+
return true;
|
|
38
|
+
};
|
|
39
|
+
// 读取 JDMobileConfig,异常时返回 undefined
|
|
40
|
+
const tryGetMobileConfigSync = opt => {
|
|
41
|
+
var _a;
|
|
42
|
+
try {
|
|
43
|
+
const fn = (_a = Taro.JDMobileConfig) === null || _a === void 0 ? void 0 : _a.getMobileConfigSync;
|
|
44
|
+
if (typeof fn !== 'function') return undefined;
|
|
45
|
+
return fn(opt);
|
|
46
|
+
} catch (_b) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
// 判断是否启用测量值缩放适配(true=启用, false=使用系统侧缩放)
|
|
51
|
+
const resolveUseMeasuredScale = res => {
|
|
52
|
+
// H5/weapp 不参与大屏系数
|
|
53
|
+
if (process.env.TARO_ENV === 'h5' || process.env.TARO_ENV === 'weapp') {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
// 条件1: designAppVersion < 16,不满足则使用系统侧缩放
|
|
57
|
+
const designAppVersionRaw = res.designAppVersion;
|
|
58
|
+
const designAppVersionMajor = designAppVersionRaw != null ? parseInt(String(designAppVersionRaw).trim(), 10) : Number.NaN;
|
|
59
|
+
if (!Number.isFinite(designAppVersionMajor) || designAppVersionMajor < MIN_DESIGN_APP_VERSION) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
// 条件2: appVersion < 15.7.0,不满足则使用系统侧缩放
|
|
63
|
+
if (!isAppVersionAtLeast(res.version, MIN_APP_VERSION)) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
// 条件3: 平台判断
|
|
67
|
+
const platform = String(res.platform || '').toLowerCase();
|
|
68
|
+
if (platform === 'harmony') {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
if (platform === 'android') {
|
|
72
|
+
const raw = tryGetMobileConfigSync({
|
|
73
|
+
space: 'taro',
|
|
74
|
+
configName: 'config',
|
|
75
|
+
key: 'disableFixBoundingScaleRatio'
|
|
76
|
+
});
|
|
77
|
+
return raw !== 1 && raw !== '1';
|
|
78
|
+
}
|
|
79
|
+
if (platform === 'ios') {
|
|
80
|
+
const raw = tryGetMobileConfigSync({
|
|
81
|
+
space: 'Taro',
|
|
82
|
+
configName: 'excutor',
|
|
83
|
+
key: 'disableBoundingScaleRatio'
|
|
84
|
+
});
|
|
85
|
+
return raw !== 1 && raw !== '1';
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
};
|
|
15
89
|
// 辅助函数:计算 lengthScaleRatio
|
|
16
90
|
const calculateLengthScaleRatio = res => {
|
|
17
91
|
let lengthScaleRatio = res === null || res === void 0 ? void 0 : res.lengthScaleRatio;
|
|
@@ -50,6 +124,29 @@ const setTargetScrollTopWithScale = function (setTargetScrollTop, baseValue, ran
|
|
|
50
124
|
setTargetScrollTop(finalValue);
|
|
51
125
|
}
|
|
52
126
|
};
|
|
127
|
+
// 根据 scrollTop 计算选中索引
|
|
128
|
+
// 系统侧缩放模式:scrollHeight 已被系统缩放,直接相除即可
|
|
129
|
+
// 自行缩放模式:需要除以 ratio 换算(harmony 特殊处理,ratio 已内嵌在 itemHeight 中)
|
|
130
|
+
const getSelectedIndex = function (scrollTop, itemHeight) {
|
|
131
|
+
let lengthScaleRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
132
|
+
let useMeasuredScale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
133
|
+
if (!useMeasuredScale || process.env.TARO_PLATFORM === 'harmony') {
|
|
134
|
+
return Math.round(scrollTop / itemHeight);
|
|
135
|
+
}
|
|
136
|
+
return Math.round(scrollTop / lengthScaleRatio / itemHeight);
|
|
137
|
+
};
|
|
138
|
+
// 计算单项高度(返回设计稿值)
|
|
139
|
+
const calculateItemHeight = function (scrollView, lengthScaleRatio) {
|
|
140
|
+
let useMeasuredScale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
141
|
+
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
142
|
+
return useMeasuredScale ? PICKER_LINE_HEIGHT * lengthScaleRatio : PICKER_LINE_HEIGHT;
|
|
143
|
+
}
|
|
144
|
+
if (scrollView && (scrollView === null || scrollView === void 0 ? void 0 : scrollView.scrollHeight)) {
|
|
145
|
+
return useMeasuredScale ? scrollView.scrollHeight / lengthScaleRatio / scrollView.childNodes.length : scrollView.scrollHeight / scrollView.childNodes.length;
|
|
146
|
+
}
|
|
147
|
+
console.warn('Height measurement anomaly');
|
|
148
|
+
return PICKER_LINE_HEIGHT;
|
|
149
|
+
};
|
|
53
150
|
function PickerGroupBasic(props) {
|
|
54
151
|
const {
|
|
55
152
|
range = [],
|
|
@@ -70,35 +167,25 @@ function PickerGroupBasic(props) {
|
|
|
70
167
|
// 触摸状态用于优化用户体验
|
|
71
168
|
const [isTouching, setIsTouching] = React.useState(false);
|
|
72
169
|
const lengthScaleRatioRef = React.useRef(1);
|
|
170
|
+
const useMeasuredScaleRef = React.useRef(false);
|
|
73
171
|
const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT);
|
|
74
|
-
// 初始化时计算 lengthScaleRatio
|
|
172
|
+
// 初始化时计算 lengthScaleRatio 并判定缩放模式
|
|
75
173
|
React.useEffect(() => {
|
|
76
174
|
Taro.getSystemInfo({
|
|
77
175
|
success: res => {
|
|
78
176
|
lengthScaleRatioRef.current = calculateLengthScaleRatio(res);
|
|
177
|
+
useMeasuredScaleRef.current = resolveUseMeasuredScale(res);
|
|
178
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
79
179
|
},
|
|
80
180
|
fail: () => {
|
|
81
|
-
// 失败时使用默认值 1
|
|
82
181
|
lengthScaleRatioRef.current = 1;
|
|
182
|
+
useMeasuredScaleRef.current = false;
|
|
83
183
|
}
|
|
84
184
|
});
|
|
85
185
|
}, []);
|
|
86
186
|
React.useEffect(() => {
|
|
87
|
-
|
|
88
|
-
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
89
|
-
itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current;
|
|
90
|
-
} else {
|
|
91
|
-
if (scrollViewRef.current && ((_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight)) {
|
|
92
|
-
itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length;
|
|
93
|
-
} else {
|
|
94
|
-
console.warn('Height measurement anomaly');
|
|
95
|
-
}
|
|
96
|
-
}
|
|
187
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
97
188
|
}, [range.length]); // 只在range长度变化时重新计算
|
|
98
|
-
// 获取选中的索引
|
|
99
|
-
const getSelectedIndex = scrollTop => {
|
|
100
|
-
return Math.round(scrollTop / itemHeightRef.current);
|
|
101
|
-
};
|
|
102
189
|
// 当selectedIndex变化时,调整滚动位置
|
|
103
190
|
React.useEffect(() => {
|
|
104
191
|
if (scrollViewRef.current && range.length > 0 && !isTouching) {
|
|
@@ -120,7 +207,7 @@ function PickerGroupBasic(props) {
|
|
|
120
207
|
isCenterTimerId.current = setTimeout(() => {
|
|
121
208
|
if (!scrollViewRef.current) return;
|
|
122
209
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
123
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
210
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
124
211
|
setIsTouching(false);
|
|
125
212
|
const baseValue = newIndex * itemHeightRef.current;
|
|
126
213
|
const randomOffset = Math.random() * 0.001; // 随机数为了在一个项内滚动时强制刷新
|
|
@@ -141,7 +228,7 @@ function PickerGroupBasic(props) {
|
|
|
141
228
|
isCenterTimerId.current = null;
|
|
142
229
|
}
|
|
143
230
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
144
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
231
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
145
232
|
if (newIndex !== currentIndex) {
|
|
146
233
|
setCurrentIndex(newIndex);
|
|
147
234
|
}
|
|
@@ -214,34 +301,25 @@ function PickerGroupTime(props) {
|
|
|
214
301
|
const [currentIndex, setCurrentIndex] = React.useState(selectedIndex);
|
|
215
302
|
const [isTouching, setIsTouching] = React.useState(false);
|
|
216
303
|
const lengthScaleRatioRef = React.useRef(1);
|
|
304
|
+
const useMeasuredScaleRef = React.useRef(false);
|
|
217
305
|
const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT);
|
|
218
|
-
// 初始化时计算 lengthScaleRatio
|
|
306
|
+
// 初始化时计算 lengthScaleRatio 并判定缩放模式
|
|
219
307
|
React.useEffect(() => {
|
|
220
308
|
Taro.getSystemInfo({
|
|
221
309
|
success: res => {
|
|
222
310
|
lengthScaleRatioRef.current = calculateLengthScaleRatio(res);
|
|
311
|
+
useMeasuredScaleRef.current = resolveUseMeasuredScale(res);
|
|
312
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
223
313
|
},
|
|
224
314
|
fail: () => {
|
|
225
|
-
// 失败时使用默认值 1
|
|
226
315
|
lengthScaleRatioRef.current = 1;
|
|
316
|
+
useMeasuredScaleRef.current = false;
|
|
227
317
|
}
|
|
228
318
|
});
|
|
229
319
|
}, []);
|
|
230
320
|
React.useEffect(() => {
|
|
231
|
-
|
|
232
|
-
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
233
|
-
itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current;
|
|
234
|
-
} else {
|
|
235
|
-
if (scrollViewRef.current && ((_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight)) {
|
|
236
|
-
itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length;
|
|
237
|
-
} else {
|
|
238
|
-
console.warn('Height measurement anomaly');
|
|
239
|
-
}
|
|
240
|
-
}
|
|
321
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
241
322
|
}, [range.length]); // 只在range长度变化时重新计算
|
|
242
|
-
const getSelectedIndex = scrollTop => {
|
|
243
|
-
return Math.round(scrollTop / itemHeightRef.current);
|
|
244
|
-
};
|
|
245
323
|
// 当selectedIndex变化时,调整滚动位置
|
|
246
324
|
React.useEffect(() => {
|
|
247
325
|
if (scrollViewRef.current && range.length > 0 && !isTouching) {
|
|
@@ -263,7 +341,7 @@ function PickerGroupTime(props) {
|
|
|
263
341
|
isCenterTimerId.current = setTimeout(() => {
|
|
264
342
|
if (!scrollViewRef.current) return;
|
|
265
343
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
266
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
344
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
267
345
|
setIsTouching(false);
|
|
268
346
|
// 调用updateIndex执行限位逻辑,获取是否触发了限位
|
|
269
347
|
const isLimited = Boolean(updateIndex(newIndex, columnId, true));
|
|
@@ -284,7 +362,7 @@ function PickerGroupTime(props) {
|
|
|
284
362
|
isCenterTimerId.current = null;
|
|
285
363
|
}
|
|
286
364
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
287
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
365
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
288
366
|
if (newIndex !== currentIndex) {
|
|
289
367
|
setCurrentIndex(newIndex);
|
|
290
368
|
}
|
|
@@ -355,34 +433,25 @@ function PickerGroupDate(props) {
|
|
|
355
433
|
const [currentIndex, setCurrentIndex] = React.useState(selectedIndex);
|
|
356
434
|
const [isTouching, setIsTouching] = React.useState(false);
|
|
357
435
|
const lengthScaleRatioRef = React.useRef(1);
|
|
436
|
+
const useMeasuredScaleRef = React.useRef(false);
|
|
358
437
|
const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT);
|
|
359
|
-
// 初始化时计算 lengthScaleRatio
|
|
438
|
+
// 初始化时计算 lengthScaleRatio 并判定缩放模式
|
|
360
439
|
React.useEffect(() => {
|
|
361
440
|
Taro.getSystemInfo({
|
|
362
441
|
success: res => {
|
|
363
442
|
lengthScaleRatioRef.current = calculateLengthScaleRatio(res);
|
|
443
|
+
useMeasuredScaleRef.current = resolveUseMeasuredScale(res);
|
|
444
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
364
445
|
},
|
|
365
446
|
fail: () => {
|
|
366
|
-
// 失败时使用默认值 1
|
|
367
447
|
lengthScaleRatioRef.current = 1;
|
|
448
|
+
useMeasuredScaleRef.current = false;
|
|
368
449
|
}
|
|
369
450
|
});
|
|
370
451
|
}, []);
|
|
371
452
|
React.useEffect(() => {
|
|
372
|
-
|
|
373
|
-
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
374
|
-
itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current;
|
|
375
|
-
} else {
|
|
376
|
-
if (scrollViewRef.current && ((_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight)) {
|
|
377
|
-
itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length;
|
|
378
|
-
} else {
|
|
379
|
-
console.warn('Height measurement anomaly');
|
|
380
|
-
}
|
|
381
|
-
}
|
|
453
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
382
454
|
}, [range.length]); // 只在range长度变化时重新计算
|
|
383
|
-
const getSelectedIndex = scrollTop => {
|
|
384
|
-
return Math.round(scrollTop / itemHeightRef.current);
|
|
385
|
-
};
|
|
386
455
|
// 当selectedIndex变化时,调整滚动位置
|
|
387
456
|
React.useEffect(() => {
|
|
388
457
|
if (scrollViewRef.current && range.length > 0 && !isTouching) {
|
|
@@ -404,7 +473,7 @@ function PickerGroupDate(props) {
|
|
|
404
473
|
isCenterTimerId.current = setTimeout(() => {
|
|
405
474
|
if (!scrollViewRef.current) return;
|
|
406
475
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
407
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
476
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
408
477
|
setIsTouching(false);
|
|
409
478
|
const baseValue = newIndex * itemHeightRef.current;
|
|
410
479
|
const randomOffset = Math.random() * 0.001; // 随机数为了在一个项内滚动时强制刷新
|
|
@@ -427,7 +496,7 @@ function PickerGroupDate(props) {
|
|
|
427
496
|
isCenterTimerId.current = null;
|
|
428
497
|
}
|
|
429
498
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
430
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
499
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
431
500
|
if (newIndex !== currentIndex) {
|
|
432
501
|
setCurrentIndex(newIndex);
|
|
433
502
|
}
|
|
@@ -498,40 +567,31 @@ function PickerGroupRegion(props) {
|
|
|
498
567
|
const [currentIndex, setCurrentIndex] = React.useState(selectedIndex);
|
|
499
568
|
const [isTouching, setIsTouching] = React.useState(false);
|
|
500
569
|
const lengthScaleRatioRef = React.useRef(1);
|
|
570
|
+
const useMeasuredScaleRef = React.useRef(false);
|
|
501
571
|
const itemHeightRef = React.useRef(PICKER_LINE_HEIGHT);
|
|
502
572
|
const isUserBeginScrollRef = React.useRef(false);
|
|
503
|
-
// 初始化时计算 lengthScaleRatio
|
|
573
|
+
// 初始化时计算 lengthScaleRatio 并判定缩放模式
|
|
504
574
|
React.useEffect(() => {
|
|
505
575
|
Taro.getSystemInfo({
|
|
506
576
|
success: res => {
|
|
507
577
|
lengthScaleRatioRef.current = calculateLengthScaleRatio(res);
|
|
578
|
+
useMeasuredScaleRef.current = resolveUseMeasuredScale(res);
|
|
579
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
508
580
|
},
|
|
509
581
|
fail: () => {
|
|
510
|
-
// 失败时使用默认值 1
|
|
511
582
|
lengthScaleRatioRef.current = 1;
|
|
583
|
+
useMeasuredScaleRef.current = false;
|
|
512
584
|
}
|
|
513
585
|
});
|
|
514
586
|
}, []);
|
|
515
587
|
React.useEffect(() => {
|
|
516
|
-
|
|
517
|
-
if (process.env.TARO_PLATFORM === 'harmony') {
|
|
518
|
-
itemHeightRef.current = PICKER_LINE_HEIGHT * lengthScaleRatioRef.current;
|
|
519
|
-
} else {
|
|
520
|
-
if (scrollViewRef.current && ((_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight)) {
|
|
521
|
-
itemHeightRef.current = scrollViewRef.current.scrollHeight / scrollViewRef.current.childNodes.length;
|
|
522
|
-
} else {
|
|
523
|
-
console.warn('Height measurement anomaly');
|
|
524
|
-
}
|
|
525
|
-
}
|
|
588
|
+
itemHeightRef.current = calculateItemHeight(scrollViewRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
526
589
|
}, [range.length]); // 只在range长度变化时重新计算
|
|
527
|
-
const getSelectedIndex = scrollTop => {
|
|
528
|
-
return Math.round(scrollTop / itemHeightRef.current);
|
|
529
|
-
};
|
|
530
590
|
// 当selectedIndex变化时,调整滚动位置
|
|
531
591
|
React.useEffect(() => {
|
|
532
592
|
if (scrollViewRef.current && range.length > 0 && !isTouching) {
|
|
533
593
|
const baseValue = selectedIndex * itemHeightRef.current;
|
|
534
|
-
setTargetScrollTopWithScale(setTargetScrollTop, baseValue);
|
|
594
|
+
setTargetScrollTopWithScale(setTargetScrollTop, baseValue, undefined, lengthScaleRatioRef.current);
|
|
535
595
|
setCurrentIndex(selectedIndex);
|
|
536
596
|
}
|
|
537
597
|
}, [selectedIndex, range]);
|
|
@@ -547,7 +607,7 @@ function PickerGroupRegion(props) {
|
|
|
547
607
|
isCenterTimerId.current = setTimeout(() => {
|
|
548
608
|
if (!scrollViewRef.current) return;
|
|
549
609
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
550
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
610
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
551
611
|
setIsTouching(false);
|
|
552
612
|
const baseValue = newIndex * itemHeightRef.current;
|
|
553
613
|
const randomOffset = Math.random() * 0.001; // 随机数为了在一个项内滚动时强制刷新
|
|
@@ -563,7 +623,7 @@ function PickerGroupRegion(props) {
|
|
|
563
623
|
isCenterTimerId.current = null;
|
|
564
624
|
}
|
|
565
625
|
const scrollTop = scrollViewRef.current.scrollTop;
|
|
566
|
-
const newIndex = getSelectedIndex(scrollTop);
|
|
626
|
+
const newIndex = getSelectedIndex(scrollTop, itemHeightRef.current, lengthScaleRatioRef.current, useMeasuredScaleRef.current);
|
|
567
627
|
if (newIndex !== currentIndex) {
|
|
568
628
|
setCurrentIndex(newIndex);
|
|
569
629
|
}
|
|
@@ -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","_jsx","View","id","ref","el","className","style","height","color","itemSelectedColor","itemDefaultColor","children","realPickerItems","Array","fill","_","idx","_jsxs","ScrollView","scrollY","showScrollbar","onScroll","onTouchStart","onScrollEnd","scrollWithAnimation","PickerGroupTime","isLimited","Boolean","PickerGroupDate","updateDay","valueText","numericValue","parseInt","replace","isNaN","PickerGroupRegion","isUserBeginScrollRef","PickerGroup","mode"],"mappings":";;;;;AA0BA,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,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ACzD,OAAO,GAAG,IAAI;OACnC;AACF4C,MAAAA,WAAW,EAAElC,eAAgB;MAC7BmC,mBAAmB,EAAA,IAAA;AAAAb,MAAAA,QAAA,EAElBC;AAAe,KACN,CACd;AAAA,GAAM,CAAC;AAEX;AAEA;AACM,SAAUyB,WAAWA,CAACnF,KAAuB,EAAA;EACjD,QAAQA,KAAK,CAACoF,IAAI;AAChB,IAAA,KAAK,MAAM;MACT,oBAAOtC,GAAA,CAACyB,eAAe,EAAA;QAAA,GAAKvE;AAAK,QAAI;AACvC,IAAA,KAAK,MAAM;MACT,oBAAO8C,GAAA,CAAC4B,eAAe,EAAA;QAAA,GAAK1E;AAAK,QAAI;AACvC,IAAA,KAAK,QAAQ;MACX,oBAAO8C,GAAA,CAACmC,iBAAiB,EAAA;QAAA,GAAKjF;AAAK,QAAI;AACzC,IAAA;MACE,oBAAO8C,GAAA,CAAC/C,gBAAgB,EAAA;QAAA,GAAKC;AAAK,QAAI;AAC1C;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","_jsx","View","id","ref","el","className","style","height","color","itemSelectedColor","itemDefaultColor","children","realPickerItems","Array","fill","_","idx","_jsxs","ScrollView","scrollY","showScrollbar","onScroll","onTouchStart","onScrollEnd","scrollWithAnimation","PickerGroupTime","isLimited","Boolean","PickerGroupDate","updateDay","valueText","numericValue","replace","isNaN","PickerGroupRegion","isUserBeginScrollRef","PickerGroup","mode"],"mappings":";;;;;AA0BA,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,CA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