Commit 484725b1 authored by hetech's avatar hetech Committed by GitHub

Dialog: ignore width when fullscreen is true (#12203)

parent 156fccd8
......@@ -129,11 +129,11 @@
computed: {
style() {
let style = {};
if (this.width) {
style.width = this.width;
}
if (!this.fullscreen) {
style.marginTop = this.top;
if (this.width) {
style.width = this.width;
}
}
return style;
}
......
......@@ -134,8 +134,10 @@ describe('Dialog', () => {
};
it('fullscreen', () => {
vm = getDialogVm('fullscreen');
expect(vm.$el.querySelector('.el-dialog').classList.contains('is-fullscreen')).to.true;
vm = getDialogVm('fullscreen width="40%"');
const dialogEl = vm.$el.querySelector('.el-dialog');
expect(dialogEl.classList.contains('is-fullscreen')).to.true;
expect(dialogEl.style.width).to.be.empty;
});
it('top', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment