大弹框上下留白收口到十像素并按三档统一宽度

大弹框上下各留十像素让边框和圆角清晰可见。宽度按用途分三档:表单 960、含代码 1080、表格 80% 加宽度上限。供应器、上下文供应器、音色克隆都改 960;TTS 从 90% 改 80%;角色模板从 1200 改 1080;缓存查看从 70% 改 80%。新增模板的大文本框改成自适应高度。
This commit is contained in:
hrz 2026-10-06 20:56:42 +08:00
parent bddd5e8b74
commit f943d31d65
9 changed files with 36 additions and 22 deletions

View file

@ -2115,11 +2115,11 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
margin: 0 auto !important; margin: 10px auto !important;
border-radius: 0; border-radius: 10px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
height: 100vh; height: calc(100vh - 20px);
max-height: 100vh; max-height: calc(100vh - 20px);
} }
::v-deep .el-dialog__wrapper { ::v-deep .el-dialog__wrapper {

View file

@ -2,7 +2,7 @@
<el-dialog <el-dialog
:title="$t('cache.dialogTitle')" :title="$t('cache.dialogTitle')"
:visible.sync="visible" :visible.sync="visible"
width="70%" width="80%"
:before-close="handleClose" :before-close="handleClose"
> >
<div v-if="isLoading" class="loading-container"> <div v-if="isLoading" class="loading-container">
@ -206,12 +206,13 @@ h3 {
} }
::v-deep .el-dialog { ::v-deep .el-dialog {
margin: 0 auto !important; margin: 10px auto !important;
height: 100vh; height: calc(100vh - 20px);
max-height: 100vh; max-height: calc(100vh - 20px);
border-radius: 0; border-radius: 10px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-width: 1280px;
} }
::v-deep .el-dialog__wrapper { ::v-deep .el-dialog__wrapper {
@ -220,7 +221,7 @@ h3 {
::v-deep .el-dialog__body { ::v-deep .el-dialog__body {
flex: 1; flex: 1;
max-height: calc(100vh - 130px); max-height: calc(100vh - 20px - 130px);
overflow-y: auto; overflow-y: auto;
} }
</style> </style>

View file

@ -2,7 +2,7 @@
<CustomDialog <CustomDialog
:title="$t('contextProviderDialog.title')" :title="$t('contextProviderDialog.title')"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="720px" width="960px"
size="large" size="large"
class="context-provider-dialog" class="context-provider-dialog"
:closeOnClickModal="false" :closeOnClickModal="false"

View file

@ -104,6 +104,7 @@ export default {
const classes = ["custom-dialog"]; const classes = ["custom-dialog"];
if (this.customClass) classes.push(this.customClass); if (this.customClass) classes.push(this.customClass);
if (this.size === "large") classes.push("custom-dialog--large"); if (this.size === "large") classes.push("custom-dialog--large");
if (String(this.width).includes("%")) classes.push("custom-dialog--fluid");
return classes.join(" "); return classes.join(" ");
}, },
}, },
@ -266,16 +267,21 @@ export default {
} }
} }
/* size="large":dialog 撑满整个浏览器高度 */ /* size="large":dialog 上下各留 10px 让边框和圆角可见,但仍占满大部分浏览器高度 */
::v-deep .el-dialog.custom-dialog.custom-dialog--large { ::v-deep .el-dialog.custom-dialog.custom-dialog--large {
margin: 0 auto !important; margin: 10px auto !important;
height: 100vh; height: calc(100vh - 20px);
max-height: 100vh; max-height: calc(100vh - 20px);
border-radius: 0; border-radius: 10px;
}
::v-deep .el-dialog.custom-dialog.custom-dialog--large.custom-dialog--fluid {
max-width: var(--dialog-table-max);
} }
::v-deep .el-dialog.custom-dialog--large .el-dialog__body { ::v-deep .el-dialog.custom-dialog--large .el-dialog__body {
max-height: calc(100vh - 120px); max-height: calc(100vh - 20px - 110px);
flex: 1; flex: 1;
min-height: 0;
} }
</style> </style>

View file

@ -2,7 +2,7 @@
<CustomDialog <CustomDialog
:title="title" :title="title"
:visible.sync="visible" :visible.sync="visible"
width="57%" width="960px"
size="large" size="large"
class="provider-dialog-wrapper" class="provider-dialog-wrapper"
@confirm="submit" @confirm="submit"

View file

@ -1,5 +1,5 @@
<template> <template>
<CustomDialog :visible.sync="localVisible" :title="$t('modelConfig.voiceManagement')" width="90%" size="large" <CustomDialog :visible.sync="localVisible" :title="$t('modelConfig.voiceManagement')" width="80%" size="large"
:close-on-click-modal="true" :destroy-on-close="false" :footer="false" :append-to-body="true" :close-on-click-modal="true" :destroy-on-close="false" :footer="false" :append-to-body="true"
@close="handleClose"> @close="handleClose">
<div class="scroll-wrapper"> <div class="scroll-wrapper">

View file

@ -2,7 +2,7 @@
<CustomDialog <CustomDialog
:title="$t('voiceClone.dialogTitle')" :title="$t('voiceClone.dialogTitle')"
:visible.sync="innerVisible" :visible.sync="innerVisible"
width="900px" width="960px"
size="large" size="large"
:footer="false" :footer="false"
@close="handleDialogClose" @close="handleDialogClose"

View file

@ -43,4 +43,11 @@ select:-webkit-autofill:focus {
background: #f0f3fe; background: #f0f3fe;
border-radius: 3px; border-radius: 3px;
} }
}
// 大弹框宽度档位(三档:表单 / 代码 / 表格)
:root {
--dialog-form: 960px;
--dialog-code: 1080px;
--dialog-table-max: 1280px;
} }

View file

@ -74,7 +74,7 @@
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:confirm-loading="confirmLoading" :confirm-loading="confirmLoading"
:footer="true" :footer="true"
:width="'1200px'" :width="'1080px'"
size="large" size="large"
@confirm="handleDialogConfirm" @confirm="handleDialogConfirm"
@cancel="dialogVisible = false" @cancel="dialogVisible = false"
@ -93,7 +93,7 @@
:placeholder="$t('templateQuickConfig.agentSettings.systemPromptPlaceholder')" :placeholder="$t('templateQuickConfig.agentSettings.systemPromptPlaceholder')"
show-word-limit show-word-limit
maxlength="2000" maxlength="2000"
:rows="16" :autosize="{ minRows: 16 }"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>