From d82ce0d861d1b15a3f965026678648ea3c7d6572 Mon Sep 17 00:00:00 2001 From: zhangyao Date: Tue, 18 Jul 2023 11:03:15 +0800 Subject: [PATCH] feat: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化逻辑和样式 --- .../indicator-config/modules/add-form.vue | 81 ++++++++++++++----- 1 file changed, 59 insertions(+), 22 deletions(-) diff --git a/src/page/main/forewarning/indicator-config/modules/add-form.vue b/src/page/main/forewarning/indicator-config/modules/add-form.vue index b6676a8..4643439 100644 --- a/src/page/main/forewarning/indicator-config/modules/add-form.vue +++ b/src/page/main/forewarning/indicator-config/modules/add-form.vue @@ -24,14 +24,32 @@
- 当预警持续 - - - - - - - 时产生报警 + + + + + + 时产生报警 + + + +
@@ -108,6 +126,8 @@ const inputNum = () => { let { max } = unitOptions[state.form.unit]; if (time > +max) { state.form.time = max; + ElMessage.closeAll(); + ElMessage.error(`最大值:${max}`); } }; // 检查周期下拉数据 @@ -169,27 +189,44 @@ defineExpose({ margin-top: 0; } } + .duration { + flex: 1; display: flex; align-items: center; - gap: 8px; - :deep(.el-form-item__content) { - display: flex; - align-items: center; - gap: 8px; - > .el-input { + :deep(.el-form-item) { + flex: 1; + .el-input { + margin-right: 8px; flex: 1; - width: 80px; } - } - .no-el-label { - :deep(.el-form-item__content) { - margin-left: 0 !important; - .el-select { - width: 80px; - } + .el-input-group__prepend { + width: 102px; + border-radius: 4px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .el-input-group__append { + width: 80px; + border-radius: 4px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; } } + // :deep(.el-form-item__content) { + // display: flex; + // align-items: center; + // gap: 8px; + // > .el-input { + // flex: 1; + // width: 80px; + // } + // } + } + .duration-append { + display: flex; + align-items: center; + color: #404a62; } :deep(.el-switch__inner) { .is-hide { -- 2.26.0