mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
DropDownButton 下拉按钮增加鼠标滑入滑出事件
This commit is contained in:
parent
01e1c1b2d6
commit
ca9e7f8a55
@ -179,7 +179,8 @@ export default class DropDownButton extends React.Component<
|
||||
});
|
||||
}
|
||||
|
||||
open() {
|
||||
async open() {
|
||||
await this.props.dispatchEvent('mouseenter', {data: this.props.buttons});
|
||||
this.setState({
|
||||
isOpened: true
|
||||
});
|
||||
@ -187,6 +188,7 @@ export default class DropDownButton extends React.Component<
|
||||
|
||||
close() {
|
||||
this.timer = setTimeout(() => {
|
||||
this.props.dispatchEvent('mouseleave', {data: this.props.buttons});
|
||||
this.setState({
|
||||
isOpened: false
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user