<!-- Description: h5-用户信息弹窗 Author: 李亚光 Date: 2024-12-24 --> <script lang="ts" setup name="H5userInfo"> const dialogFormVisible = ref(false) // 对话框是否显示 // 打开弹窗 const initDialog = () => { dialogFormVisible.value = true } // 关闭 const cancel = () => { dialogFormVisible.value = false } defineExpose({ initDialog, }) </script> <template> <el-dialog class="dialog" v-model="dialogFormVisible" title="用户信息" append-to-body width="80%"> <!-- <template #footer> <div class="dialog-footer"> <el-button type="primary" @click="cancel"> 确认 </el-button> </div> </template> --> </el-dialog> </template> <style lang="scss" scoped> .dialog { ::v-deep .el-dialog { display: flex; flex-direction: column; margin: 0 !important; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-height: calc(100% - 30px); max-width: calc(100% - 30px); } ::v-deep .el-dialog .el-dialog__body { flex: 1; overflow: auto; } } </style>