生成代码 el-dialog 弹窗内容过多滚动功能

This commit is contained in:
lingdeng 2022-04-17 12:46:22 +08:00
parent e920dffa82
commit 8db4190c7a
4 changed files with 86 additions and 4 deletions

View File

@ -165,7 +165,7 @@
</el-table>
<!-- 添加或修改${functionName}对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :visible.sync="open" class="roll-dialog" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
#foreach($column in $columns)
#set($field=$column.javaField)
@ -511,3 +511,23 @@ export default {
}
};
</script>
<style lang="scss" scoped>
.roll-dialog {
display: flex;
justify-content: center;
align-items: Center;
overflow: hidden;
::v-deep .el-dialog {
margin: 0 auto !important;
width: 60%;
height: 90vh;
overflow: hidden;
.el-dialog__body {
overflow: hidden;
overflow-y: auto;
height: calc(90vh - 140px);
}
}
}
</style>

View File

@ -180,7 +180,7 @@
/>
<!-- 添加或修改${functionName}对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :visible.sync="open" class="roll-dialog" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
#foreach($column in $columns)
#set($field=$column.javaField)
@ -607,3 +607,24 @@ export default {
}
};
</script>
<style lang="scss" scoped>
.roll-dialog {
display: flex;
justify-content: center;
align-items: Center;
overflow: hidden;
::v-deep .el-dialog {
margin: 0 auto !important;
width: 60%;
height: 90vh;
overflow: hidden;
.el-dialog__body {
overflow: hidden;
overflow-y: auto;
height: calc(90vh - 140px);
}
}
}
</style>

View File

@ -159,7 +159,7 @@
</el-table>
<!-- 添加或修改${functionName}对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-dialog :title="title" v-model="open" class="roll-dialog" append-to-body>
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
#foreach($column in $columns)
#set($field=$column.javaField)
@ -492,3 +492,23 @@ function handleDelete(row) {
getList();
</script>
<style lang="scss" scoped>
.roll-dialog {
display: flex;
justify-content: center;
align-items: Center;
overflow: hidden;
::v-deep .el-dialog {
margin: 0 auto !important;
width: 60%;
height: 90vh;
overflow: hidden;
.el-dialog__body {
overflow: hidden;
overflow-y: auto;
height: calc(90vh - 140px);
}
}
}
</style>

View File

@ -173,7 +173,7 @@
/>
<!-- 添加或修改${functionName}对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-dialog :title="title" v-model="open" class="roll-dialog" append-to-body>
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
#foreach($column in $columns)
#set($field=$column.javaField)
@ -604,3 +604,24 @@ function handleExport() {
getList();
</script>
<style lang="scss" scoped>
.roll-dialog {
display: flex;
justify-content: center;
align-items: Center;
overflow: hidden;
::v-deep .el-dialog {
margin: 0 auto !important;
width: 60%;
height: 90vh;
overflow: hidden;
.el-dialog__body {
overflow: hidden;
overflow-y: auto;
height: calc(90vh - 140px);
}
}
}
</style>