mirror of https://github.com/ElemeFE/element
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 testfixpull/8751/head
parent
0f7dcb9d32
commit
8ae2defa2d
|
@ -128,7 +128,11 @@
|
|||
},
|
||||
handleClick() {
|
||||
if (this.triggerElm.disabled) return;
|
||||
this.visible = !this.visible;
|
||||
if (this.visible) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
}
|
||||
},
|
||||
handleTriggerKeyDown(ev) {
|
||||
const keyCode = ev.keyCode;
|
||||
|
|
|
@ -102,12 +102,11 @@ describe('Dropdown', () => {
|
|||
triggerEvent(triggerElm, 'mouseenter');
|
||||
dropdown.$nextTick(_ => {
|
||||
expect(dropdown.visible).to.not.true;
|
||||
|
||||
triggerElm.click();
|
||||
dropdown.$nextTick(_ => {
|
||||
setTimeout(_ => {
|
||||
expect(dropdown.visible).to.be.true;
|
||||
done();
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
});
|
||||
it('split button', done => {
|
||||
|
|
Loading…
Reference in New Issue