Skip to content

Commit

Permalink
Merge pull request #357 from hkaikai/fix/rate
Browse files Browse the repository at this point in the history
rate disabled 功能支持
  • Loading branch information
Luozf12345 authored Oct 21, 2024
2 parents 5ff1507 + 7b5daab commit 70eab7b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tdesign-component/lib/src/components/rate/td_rate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,29 @@ class _TDRateState extends State<TDRate> with TickerProviderStateMixin {
children: [
GestureDetector(
onTapDown: (event) {
if (widget.disabled == true) {
return;
}
_isClick = true;
},
onTapUp: (details) {
if (widget.disabled == true) {
return;
}
_changeSelect(details.globalPosition, true);
_hideTip();
},
onHorizontalDragUpdate: (details) {
if (widget.disabled == true) {
return;
}
_isClick = false;
_changeSelect(details.globalPosition);
},
onHorizontalDragEnd: (details) {
if (widget.disabled == true) {
return;
}
_hideTip();
},
child: Row(
Expand Down

0 comments on commit 70eab7b

Please sign in to comment.