Skip to content

Commit

Permalink
Merge pull request #60 from Tencent/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Luozf12345 authored Mar 18, 2024
2 parents c27c5d4 + b775a70 commit 997e646
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'${selected['minute'].toString().padLeft(2, '0')}:'
'${selected['second'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
useHour: true,
useMinute: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'${selected['minute'].toString().padLeft(2, '0')}:'
'${selected['second'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
useYear: false,
useMonth: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
selected_3 = '${selected['month'].toString().padLeft(2, '0')}-'
'${selected['day'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
useYear: false,
dateStart: [1999, 01, 01],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'${selected['day'].toString().padLeft(2, '0')} '
'${weekDayList[selected['weekDay']! - 1]}';
});
Navigator.of(context).pop();
},
useWeekDay: true,
dateStart: [1999, 01, 01],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'${selected['month'].toString().padLeft(2, '0')}-'
'${selected['day'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
dateStart: [1999, 01, 01],
dateEnd: [2023, 12, 31],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'${selected['month'].toString().padLeft(2, '0')}-'
'${selected['day'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
dateStart: [1999, 01, 01],
dateEnd: [2023, 12, 31],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
selected_2 = '${selected['year'].toString().padLeft(4, '0')}-'
'${selected['month'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
useDay: false,
dateStart: [1999, 01, 01],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
setState(() {
selected_1 = '${selected['year'].toString().padLeft(4, '0')}-${selected['month'].toString().padLeft(2, '0')}-${selected['day'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
dateStart: [1999, 01, 01],
dateEnd: [2023, 12, 31],
Expand Down
1 change: 1 addition & 0 deletions tdesign-component/example/assets/code/picker.buildArea.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
setState(() {
selected_1 = '${data_1[selected[0]]}';
});
Navigator.of(context).pop();
}, data: [data_1]);
},
child: buildSelectRow(context, selected_1, '选择地区'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
setState(() {
selected_4 = '${data_1[selected[0]]}';
});
Navigator.of(context).pop();
}, data: [data_1]);
},
child: buildSelectRow(context, selected_4, '带标题选择器'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
setState(() {
selected_5 = '${data_1[selected[0]]}';
});
Navigator.of(context).pop();
}, data: [data_1]);
},
child: buildSelectRow(context, selected_5, '无标题选择器'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
setState(() {
selected_3 = '${selected[0]} ${selected[1]} ${selected[2]}';
});
Navigator.of(context).pop();
},
data: data_3,
columnNum: 3,
Expand Down
1 change: 1 addition & 0 deletions tdesign-component/example/assets/code/picker.buildTime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
setState(() {
selected_2 = '${data_2[0][selected[0]]} ${data_2[1][selected[1]]}';
});
Navigator.of(context).pop();
}, data: data_2);
},
child: buildSelectRow(context, selected_2, '选择时间'),
Expand Down
2 changes: 1 addition & 1 deletion tdesign-component/lib/src/components/input/td_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class TDInput extends StatelessWidget {
/// 输入框宽度(TDCardStyle时必须设置该参数)
final double? width;

/// 输入框宽度
/// 输入框高度
final double? height;

/// 输入框背景色
Expand Down
8 changes: 8 additions & 0 deletions tdesign-site/src/date-time-picker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
setState(() {
selected_1 = '${selected['year'].toString().padLeft(4, '0')}-${selected['month'].toString().padLeft(2, '0')}-${selected['day'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
dateStart: [1999, 01, 01],
dateEnd: [2023, 12, 31],
Expand All @@ -57,6 +58,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
selected_2 = '${selected['year'].toString().padLeft(4, '0')}-'
'${selected['month'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
useDay: false,
dateStart: [1999, 01, 01],
Expand Down Expand Up @@ -84,6 +86,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
selected_3 = '${selected['month'].toString().padLeft(2, '0')}-'
'${selected['day'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
useYear: false,
dateStart: [1999, 01, 01],
Expand Down Expand Up @@ -112,6 +115,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
'${selected['minute'].toString().padLeft(2, '0')}:'
'${selected['second'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
useYear: false,
useMonth: false,
Expand Down Expand Up @@ -148,6 +152,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
'${selected['minute'].toString().padLeft(2, '0')}:'
'${selected['second'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
useHour: true,
useMinute: true,
Expand Down Expand Up @@ -179,6 +184,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
'${selected['day'].toString().padLeft(2, '0')} '
'${weekDayList[selected['weekDay']! - 1]}';
});
Navigator.of(context).pop();
},
useWeekDay: true,
dateStart: [1999, 01, 01],
Expand Down Expand Up @@ -208,6 +214,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
'${selected['month'].toString().padLeft(2, '0')}-'
'${selected['day'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
dateStart: [1999, 01, 01],
dateEnd: [2023, 12, 31],
Expand Down Expand Up @@ -235,6 +242,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
'${selected['month'].toString().padLeft(2, '0')}-'
'${selected['day'].toString().padLeft(2, '0')}';
});
Navigator.of(context).pop();
},
dateStart: [1999, 01, 01],
dateEnd: [2023, 12, 31],
Expand Down
5 changes: 5 additions & 0 deletions tdesign-site/src/picker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
setState(() {
selected_1 = '${data_1[selected[0]]}';
});
Navigator.of(context).pop();
}, data: [data_1]);
},
child: buildSelectRow(context, selected_1, '选择地区'),
Expand All @@ -53,6 +54,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
setState(() {
selected_2 = '${data_2[0][selected[0]]} ${data_2[1][selected[1]]}';
});
Navigator.of(context).pop();
}, data: data_2);
},
child: buildSelectRow(context, selected_2, '选择时间'),
Expand All @@ -75,6 +77,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
setState(() {
selected_3 = '${selected[0]} ${selected[1]} ${selected[2]}';
});
Navigator.of(context).pop();
},
data: data_3,
columnNum: 3,
Expand All @@ -101,6 +104,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
setState(() {
selected_4 = '${data_1[selected[0]]}';
});
Navigator.of(context).pop();
}, data: [data_1]);
},
child: buildSelectRow(context, selected_4, '带标题选择器'),
Expand All @@ -123,6 +127,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
setState(() {
selected_5 = '${data_1[selected[0]]}';
});
Navigator.of(context).pop();
}, data: [data_1]);
},
child: buildSelectRow(context, selected_5, '无标题选择器'),
Expand Down

0 comments on commit 997e646

Please sign in to comment.