Commit 1be4c61 1 parent b70bfd4 commit 1be4c61 Copy full SHA for 1be4c61
File tree 2 files changed +17
-16
lines changed
2 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"pages" : [
3
- " pages/test /main" ,
4
- " pages/demo /main"
3
+ " pages/demo /main" ,
4
+ " pages/test /main"
5
5
],
6
6
"window" : {
7
7
"backgroundTextStyle" : " light" ,
Original file line number Diff line number Diff line change @@ -268,23 +268,24 @@ export default {
268
268
if (this .deepLength === 2 ) {
269
269
let pickerValueArray = this .pickerValueArray ;
270
270
let changeValue = e .mp .detail .value ;
271
- let pickerValueMulTwoTwo = [];
272
- // 第一列滚动第二列数据更新
273
- for (
274
- let i = 0 , length = pickerValueArray[changeValue[0 ]].children .length ;
275
- i < length;
276
- i++
277
- ) {
278
- pickerValueMulTwoTwo .push (
279
- pickerValueArray[changeValue[0 ]].children [i]
280
- );
281
- }
282
- // 第一级不等于第二级
271
+ // 处理第一列滚动
283
272
if (changeValue[0 ] !== this .pickerValue [0 ]) {
284
- // 第二列初始化为 1
273
+ let pickerValueMulTwoTwo = [];
274
+ // 第一列滚动第二列数据更新
275
+ for (
276
+ let i = 0 ,
277
+ length = pickerValueArray[changeValue[0 ]].children .length ;
278
+ i < length;
279
+ i++
280
+ ) {
281
+ pickerValueMulTwoTwo .push (
282
+ pickerValueArray[changeValue[0 ]].children [i]
283
+ );
284
+ }
285
+ this .pickerValueMulTwoTwo = pickerValueMulTwoTwo;
286
+ // 第二列初始化为 0
285
287
changeValue[1 ] = 0 ;
286
288
}
287
- this .pickerValueMulTwoTwo = pickerValueMulTwoTwo;
288
289
this .pickerValue = changeValue;
289
290
} else if (this .deepLength === 3 ) {
290
291
let pickerValueArray = this .pickerValueArray ;
You can’t perform that action at this time.
0 commit comments