Skip to content

Commit

Permalink
Merge pull request #21 from Tencent/feature/td_input_two_line
Browse files Browse the repository at this point in the history
fix:type为TDInputType.twoLine下leftLabelStyle设置不生效
  • Loading branch information
Luozf12345 authored Jan 4, 2024
2 parents 23796cb + b14466a commit 7d8d689
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tdesign-component/example/lib/page/td_input_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class _TDInputViewPageState extends State<TDInputViewPage> {
hintText: '请输入文字',
rightBtn: Container(
alignment: Alignment.center,
width: 72,
width: 73,
height: 28,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
Expand Down Expand Up @@ -481,7 +481,7 @@ class _TDInputViewPageState extends State<TDInputViewPage> {
hintText: '输入手机号',
backgroundColor: Colors.white,
rightBtn: SizedBox(
width: 97.5,
width: 98,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expand Down
3 changes: 2 additions & 1 deletion tdesign-component/lib/src/components/input/td_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class TDInput extends StatelessWidget {
: (leftLabel!.length > 5
? 5.1
: leftLabel.length)) *
16 +
16 + 1 +
(leftIcon != null ? 1 : 0) * 28) +
(required == true ? 1 : 0) * 14),
height = 56,
Expand Down Expand Up @@ -464,6 +464,7 @@ class TDInput extends StatelessWidget {
child: TDText(
leftLabel,
maxLines: 1,
style: leftLabelStyle,
font: TDTheme.of(context).fontBodyMedium,
fontWeight: FontWeight.w400,
),
Expand Down

0 comments on commit 7d8d689

Please sign in to comment.