Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: mod panel host binding method #474

Merged
merged 4 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/heavy-beans-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@alauda/ui": patch
---

refactor: mod panel host binding method
8 changes: 5 additions & 3 deletions src/time-picker/panel/panel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Component,
ElementRef,
EventEmitter,
HostListener,
Input,
OnChanges,
Output,
Expand Down Expand Up @@ -44,9 +45,6 @@ const bem = buildBem('aui-time-picker-panel');
multi: true,
},
],
host: {
mousedown: '$event.preventDefault()',
},
})
export class TimePickerPanelComponent
extends CommonFormControl<Dayjs>
Expand Down Expand Up @@ -78,6 +76,10 @@ export class TimePickerPanelComponent
return this.enabledColumns * TIME_PICKER_COLUMN_WIDTH;
}

@HostListener('mousedown') onMousedown() {
return false;
}

@Input()
hourStep = 1;

Expand Down