mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-29 18:57:36 +08:00
Dropdown: click open uses show-timeout
attribute (#8734)
* Dropdown: Click open uses `show-timeout` attribute * Dropdown: Modified test to work with `show-timeout` attribute * Dropdown: Clean up in testfix
This commit is contained in:
parent
0f7dcb9d32
commit
8ae2defa2d
@ -128,7 +128,11 @@
|
|||||||
},
|
},
|
||||||
handleClick() {
|
handleClick() {
|
||||||
if (this.triggerElm.disabled) return;
|
if (this.triggerElm.disabled) return;
|
||||||
this.visible = !this.visible;
|
if (this.visible) {
|
||||||
|
this.hide();
|
||||||
|
} else {
|
||||||
|
this.show();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleTriggerKeyDown(ev) {
|
handleTriggerKeyDown(ev) {
|
||||||
const keyCode = ev.keyCode;
|
const keyCode = ev.keyCode;
|
||||||
|
@ -102,12 +102,11 @@ describe('Dropdown', () => {
|
|||||||
triggerEvent(triggerElm, 'mouseenter');
|
triggerEvent(triggerElm, 'mouseenter');
|
||||||
dropdown.$nextTick(_ => {
|
dropdown.$nextTick(_ => {
|
||||||
expect(dropdown.visible).to.not.true;
|
expect(dropdown.visible).to.not.true;
|
||||||
|
|
||||||
triggerElm.click();
|
triggerElm.click();
|
||||||
dropdown.$nextTick(_ => {
|
setTimeout(_ => {
|
||||||
expect(dropdown.visible).to.be.true;
|
expect(dropdown.visible).to.be.true;
|
||||||
done();
|
done();
|
||||||
});
|
}, 300);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('split button', done => {
|
it('split button', done => {
|
||||||
|
Loading…
Reference in New Issue
Block a user