el-dialog修改彈框到頂部的高度margin-top
阿新 • • 發佈:2021-01-05
el-dialog元件中
style() {
let style = {};
if (!this.fullscreen) {
style.marginTop = this.top;
if (this.width) {
style.width = this.width;
}
}
return style;
}
說明style.marginTop = this.top,所以可以直接新增top屬性就可以修改margin-top
<el-dialog
title="測試標題"
:visible.sync="DialogVisible"
append-to-body
width="60%"
top="8vh"
>