mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:38:53 +08:00
feat: 完善时间类的事件和动作
This commit is contained in:
parent
da8ba7cfe3
commit
9c336c6316
@ -415,12 +415,9 @@ export default class DateControl extends React.PureComponent<
|
||||
|
||||
// 派发有event的事件
|
||||
@autobind
|
||||
dispatchEvent(e: React.SyntheticEvent<HTMLElement> | string) {
|
||||
dispatchEvent(e: React.SyntheticEvent<HTMLElement>) {
|
||||
const {dispatchEvent, data} = this.props;
|
||||
const dispatcher = dispatchEvent(e, data);
|
||||
if (dispatcher?.prevented) {
|
||||
return;
|
||||
}
|
||||
dispatchEvent(e, data);
|
||||
}
|
||||
|
||||
// 动作
|
||||
|
@ -165,12 +165,9 @@ export default class DateRangeControl extends React.Component<DateRangeProps> {
|
||||
|
||||
// 派发有event的事件
|
||||
@autobind
|
||||
dispatchEvent(e: React.SyntheticEvent<HTMLElement> | string) {
|
||||
dispatchEvent(e: React.SyntheticEvent<HTMLElement>) {
|
||||
const {dispatchEvent, data} = this.props;
|
||||
const dispatcher = dispatchEvent(e, data);
|
||||
if (dispatcher?.prevented) {
|
||||
return;
|
||||
}
|
||||
dispatchEvent(e, data);
|
||||
}
|
||||
|
||||
// 动作
|
||||
|
@ -162,12 +162,9 @@ export default class MonthRangeControl extends React.Component<MonthRangeProps>
|
||||
|
||||
// 派发有event的事件
|
||||
@autobind
|
||||
dispatchEvent(e: React.SyntheticEvent<HTMLElement> | string) {
|
||||
dispatchEvent(e: React.SyntheticEvent<HTMLElement>) {
|
||||
const {dispatchEvent, data} = this.props;
|
||||
const dispatcher = dispatchEvent(e, data);
|
||||
if (dispatcher?.prevented) {
|
||||
return;
|
||||
}
|
||||
dispatchEvent(e, data);
|
||||
}
|
||||
|
||||
// 动作
|
||||
|
Loading…
Reference in New Issue
Block a user