From 69eba978c784f2a3e3cc9c0e984635d970a45a67 Mon Sep 17 00:00:00 2001 From: hptangxi Date: Sun, 6 Jul 2025 10:17:52 +0800 Subject: [PATCH] group form style --- web/src/components/keys/GroupFormModal.vue | 118 +++++++++++++-------- 1 file changed, 71 insertions(+), 47 deletions(-) diff --git a/web/src/components/keys/GroupFormModal.vue b/web/src/components/keys/GroupFormModal.vue index af46dbc..6933061 100644 --- a/web/src/components/keys/GroupFormModal.vue +++ b/web/src/components/keys/GroupFormModal.vue @@ -13,7 +13,6 @@ import { NInputNumber, NModal, NSelect, - NSpace, useMessage, } from "naive-ui"; import { reactive, ref, watch } from "vue"; @@ -309,7 +308,9 @@ async function handleSubmit() { v-model:value="formData.description" type="textarea" placeholder="可选,分组描述信息" - :rows="3" + :rows="2" + :autosize="{ minRows: 2, maxRows: 2 }" + style="resize: none" /> @@ -335,7 +336,7 @@ async function handleSubmit() { -
+

上游地址

- +
+ 权重 - - - - +
+ + + +
+
@@ -390,7 +395,7 @@ async function handleSubmit() {
-
+
@@ -405,11 +410,11 @@ async function handleSubmit() { :path="`configItems[${index}].key`" :rule="{ required: true, - message: '请选择配置参数', + message: '', trigger: ['blur', 'change'], }" > - +
- +
- - - 添加配置参数 - +
+ + + 添加配置参数 + +
参数覆盖
@@ -471,7 +479,7 @@ async function handleSubmit() { v-model:value="formData.param_overrides" type="textarea" placeholder="JSON 格式的参数覆盖配置" - :rows="8" + :rows="4" />
@@ -499,7 +507,7 @@ async function handleSubmit() { } .form-section { - margin-top: 24px; + margin-top: 20px; } .section-title { @@ -515,6 +523,10 @@ async function handleSubmit() { font-weight: 500; } +:deep(.n-form-item-blank) { + flex-grow: 1; +} + :deep(.n-input) { --n-border-radius: 6px; } @@ -529,10 +541,21 @@ async function handleSubmit() { :deep(.n-card-header) { border-bottom: 1px solid rgba(239, 239, 245, 0.8); + padding: 10px 20px; } -:deep(.n-card-footer) { +:deep(.n-card__content) { + max-height: calc(100vh - 68px - 61px - 50px); + overflow-y: auto; +} + +:deep(.n-card__footer) { border-top: 1px solid rgba(239, 239, 245, 0.8); + padding: 10px 15px; +} + +:deep(.n-form-item-feedback-wrapper) { + min-height: 10px; } .config-section { @@ -546,12 +569,13 @@ async function handleSubmit() { margin: 0 0 12px 0; } -/* .empty-config { - color: #9ca3af; - font-style: italic; - text-align: center; - padding: 20px 0; -} */ +.form-label { + margin-left: 25px; + margin-right: 10px; + height: 34px; + line-height: 34px; + font-weight: 500; +} .config-item { margin-bottom: 12px;