弹框样式与文案收口处理

AddDeviceDialog 确认后关闭弹框;CustomDialog 去掉 :global 与紧邻选择器,合并 el-dialog__body 样式块;删除未使用的 --dialog-form/--dialog-code;AddWisdomBodyDialog 的 cancel/handleClose 委托到同一个实现;多语言文案同步去冒号与双点。
This commit is contained in:
hrz 2026-10-06 21:48:37 +08:00
parent f943d31d65
commit 81883240f6
8 changed files with 21 additions and 26 deletions

View file

@ -71,6 +71,7 @@ export default {
},
closeDialog() {
this.deviceCode = '';
this.$emit('update:visible', false);
},
cancel() {
this.deviceCode = "";

View file

@ -70,8 +70,7 @@ export default {
this.$emit('update:visible', false);
},
handleClose() {
this.wisdomBodyName = "";
this.$emit('update:visible', false);
this.cancel();
}
}
}

View file

@ -138,16 +138,15 @@ export default {
</script>
<style lang="scss" scoped>
/* wrapper 上带 custom-dialog class(来自 :class prop),用 :global() 命中它本身 */
:global(.el-dialog__wrapper.custom-dialog) {
/* 弹框垂直居中:element-ui 把 .el-dialog__wrapper 渲染到 body 上,需要 deep 选择器穿透 */
::v-deep .el-dialog__wrapper.custom-dialog {
display: flex;
align-items: center;
justify-content: center;
overflow: auto;
}
/* 内部 .el-dialog(custom-class 应用到它上面)才有 custom-dialog--large;
默认 .custom-dialog 也通过 customClass prop 传到内部 dialog 上时命中 */
/* 内部 .el-dialog 也带 custom-dialog class(来自 customClass prop),用于区分大小档 */
::v-deep .el-dialog.custom-dialog {
border-radius: 10px;
overflow: hidden;
@ -161,9 +160,11 @@ export default {
::v-deep .el-dialog__body {
max-height: calc(100vh - 220px);
overflow-y: auto;
padding: 20px;
}
::v-deep + .v-modal {
/* PopupManager 把 .v-modal 挂到 body 末尾,用后代选择器穿透命中 */
::v-deep .v-modal {
background: rgba(15, 23, 42, 0.55) !important;
backdrop-filter: blur(2px);
}
@ -226,10 +227,6 @@ export default {
}
}
::v-deep .el-dialog__body {
padding: 20px;
}
::v-deep .el-dialog__footer {
padding: 12px 20px 16px;
}

View file

@ -477,8 +477,8 @@ export default {
'device.type': 'Gerätetyp',
'device.status': 'Gerätestatus',
'device.dialogTitle': 'Gerät hinzufügen',
'device.verificationCode': 'Bestätigungscode:',
'device.verificationCodePlaceholder': 'Bitte den 6-stelligen Bestätigungscode eingeben, der vom Gerät gesendet wird..',
'device.verificationCode': 'Bestätigungscode',
'device.verificationCodePlaceholder': 'Bitte den 6-stelligen Bestätigungscode eingeben, der vom Gerät gesendet wird…',
'device.confirmButton': 'Bestätigen',
'device.cancelButton': 'Abbrechen',
'device.input6DigitCode': 'Bitte 6-stelligen Bestätigungscode eingeben',
@ -820,7 +820,7 @@ export default {
// Add agent dialog text
'addAgentDialog.title': 'Agent hinzufügen',
'addAgentDialog.agentName': 'Agent-Name',
'addAgentDialog.placeholder': 'Bitte Agent-Namen eingeben..',
'addAgentDialog.placeholder': 'Bitte Agent-Namen eingeben…',
'addAgentDialog.confirm': 'Bestätigen',
'addAgentDialog.cancel': 'Abbrechen',
'addAgentDialog.nameRequired': 'Bitte Agent-Namen eingeben',

View file

@ -477,8 +477,8 @@ export default {
'device.type': 'Device Type',
'device.status': 'Device Status',
'device.dialogTitle': 'Add Device',
'device.verificationCode': 'Verification Code:',
'device.verificationCodePlaceholder': 'Please enter the 6-digit verification code broadcasted by the device..',
'device.verificationCode': 'Verification Code',
'device.verificationCodePlaceholder': 'Please enter the 6-digit verification code broadcasted by the device…',
'device.confirmButton': 'Confirm',
'device.cancelButton': 'Cancel',
'device.input6DigitCode': 'Please enter a 6-digit verification code',
@ -820,7 +820,7 @@ export default {
// Add agent dialog text
'addAgentDialog.title': 'Add Agent',
'addAgentDialog.agentName': 'Agent Name',
'addAgentDialog.placeholder': 'Please enter agent name..',
'addAgentDialog.placeholder': 'Please enter agent name…',
'addAgentDialog.confirm': 'Confirm',
'addAgentDialog.cancel': 'Cancel',
'addAgentDialog.nameRequired': 'Please enter agent name',

View file

@ -477,8 +477,8 @@ export default {
'device.type': 'Tipo de Dispositivo',
'device.status': 'Status do Dispositivo',
'device.dialogTitle': 'Adicionar Dispositivo',
'device.verificationCode': 'Código de Verificação:',
'device.verificationCodePlaceholder': 'Por favor, insira o código de verificação de 6 dígitos transmitido pelo dispositivo..',
'device.verificationCode': 'Código de Verificação',
'device.verificationCodePlaceholder': 'Por favor, insira o código de verificação de 6 dígitos transmitido pelo dispositivo…',
'device.confirmButton': 'Confirmar',
'device.cancelButton': 'Cancelar',
'device.input6DigitCode': 'Por favor, insira um código de verificação de 6 dígitos',
@ -820,7 +820,7 @@ export default {
// Diálogo de adicionar agente
'addAgentDialog.title': 'Adicionar Agente',
'addAgentDialog.agentName': 'Nome do Agente',
'addAgentDialog.placeholder': 'Por favor, insira o nome do agente..',
'addAgentDialog.placeholder': 'Por favor, insira o nome do agente…',
'addAgentDialog.confirm': 'Confirmar',
'addAgentDialog.cancel': 'Cancelar',
'addAgentDialog.nameRequired': 'Por favor, insira o nome do agente',

View file

@ -477,8 +477,8 @@ export default {
'device.type': 'Loại thiết bị',
'device.status': 'Trạng thái thiết bị',
'device.dialogTitle': 'Thêm thiết bị',
'device.verificationCode': 'Mã xác minh:',
'device.verificationCodePlaceholder': 'Vui lòng nhập mã xác minh 6 chữ số được phát từ thiết bị..',
'device.verificationCode': 'Mã xác minh',
'device.verificationCodePlaceholder': 'Vui lòng nhập mã xác minh 6 chữ số được phát từ thiết bị…',
'device.confirmButton': 'Xác nhận',
'device.cancelButton': 'Hủy bỏ',
'device.input6DigitCode': 'Vui lòng nhập mã xác minh 6 chữ số',
@ -820,7 +820,7 @@ export default {
// Add agent dialog text
'addAgentDialog.title': 'Thêm tác nhân',
'addAgentDialog.agentName': 'Tên tác nhân',
'addAgentDialog.placeholder': 'Vui lòng nhập tên tác nhân..',
'addAgentDialog.placeholder': 'Vui lòng nhập tên tác nhân…',
'addAgentDialog.confirm': 'Xác nhận',
'addAgentDialog.cancel': 'Hủy bỏ',
'addAgentDialog.nameRequired': 'Vui lòng nhập tên tác nhân',

View file

@ -45,9 +45,7 @@ select:-webkit-autofill:focus {
}
}
// 大弹框宽度档位(三档:表单 / 代码 / 表格)
// 大弹框宽度档位(表格档使用)
:root {
--dialog-form: 960px;
--dialog-code: 1080px;
--dialog-table-max: 1280px;
}