From 945dc317ededf2b8ee6b90db8d993bef004fa472 Mon Sep 17 00:00:00 2001 From: Kinplemelon Date: Fri, 20 Dec 2024 11:44:00 +0800 Subject: [PATCH 1/2] style(auth): style of forms --- src/style/common.scss | 48 ++- src/views/Auth/components/BuiltInConfig.vue | 5 +- src/views/Auth/components/CInfoConfig.vue | 4 +- src/views/Auth/components/DatabaseConfig.vue | 65 ++-- src/views/Auth/components/HttpConfig.vue | 17 +- src/views/Auth/components/JwtConfig.vue | 5 +- src/views/Auth/components/KerberosConfig.vue | 5 +- src/views/Auth/components/LdapConfig.vue | 5 +- src/views/Auth/style/authConfig.scss | 10 +- src/views/General/Users.vue | 3 +- .../MessageTransform/TransformCreate.vue | 33 +- .../MessageTransform/TransformDetail.vue | 26 +- .../components/TransformForm.vue | 354 +++++++++-------- .../Schema/ExternalSchemaCreate.vue | 26 +- .../Schema/ExternalSchemaDetail.vue | 5 +- src/views/RuleEngine/Schema/SchemaCreate.vue | 26 +- src/views/RuleEngine/Schema/SchemaDetail.vue | 4 +- .../Schema/components/ExternalSchemaForm.vue | 111 +++--- .../Schema/components/SchemaRegistryForm.vue | 114 +++--- .../SchemaValidation/ValidationCreate.vue | 27 +- .../SchemaValidation/ValidationDetail.vue | 2 + .../components/SchemaValidationForm.vue | 362 +++++++++--------- 22 files changed, 673 insertions(+), 584 deletions(-) diff --git a/src/style/common.scss b/src/style/common.scss index 8f88f5b5f..61d08a566 100644 --- a/src/style/common.scss +++ b/src/style/common.scss @@ -325,6 +325,20 @@ p.description { margin-top: 30px; } } +.part-header-container { + display: flex; + align-items: center; + justify-content: flex-start; + line-height: 1.6; + padding-top: 8px; + padding-bottom: 16px; + .part-header { + margin-top: 0; + margin-bottom: 0; + padding-right: 12px; + text-align: right; + } +} .bold { font-weight: 600; @@ -495,8 +509,20 @@ input:disabled { } } .el-card { - &.app-card { - margin-bottom: 24px; + &.app-card, + &.ft-card { + margin-bottom: 16px; + } + .el-card__body >.el-form { + padding-top: 8px; + margin-bottom: -16px; + } + &.ft-card { + .el-card__body { + display: flex; + justify-content: center; + align-items: center; + } } .el-tabs.detail-tabs { .el-tabs__header { @@ -995,3 +1021,21 @@ code { .chart-tooltip { border-radius: 0 !important; } +.el-form.tong-form { + .el-col-12, + .el-col-8 { + width: 100%; + max-width: 100%; + flex-basis: 100%; + } + .el-form-item { + display: flex; + .el-form-item__label { + line-height: 32px; + display: inline-flex; + text-align: right; + height: 32px; + margin-bottom: 0; + } + } +} diff --git a/src/views/Auth/components/BuiltInConfig.vue b/src/views/Auth/components/BuiltInConfig.vue index 233cd7130..b2ceb71b3 100644 --- a/src/views/Auth/components/BuiltInConfig.vue +++ b/src/views/Auth/components/BuiltInConfig.vue @@ -5,9 +5,8 @@ ref="formCom" :model="builtConfig" :rules="rules" - class="create-form" - label-position="top" - require-asterisk-position="right" + class="create-form tong-form" + label-width="200px" > diff --git a/src/views/Auth/components/CInfoConfig.vue b/src/views/Auth/components/CInfoConfig.vue index 66ce64013..74c136036 100644 --- a/src/views/Auth/components/CInfoConfig.vue +++ b/src/views/Auth/components/CInfoConfig.vue @@ -4,8 +4,8 @@ ref="formCom" :model="cinfoConfig" :rules="rules" - class="create-form" - label-position="top" + class="create-form tong-form" + label-width="200px" > diff --git a/src/views/Auth/components/DatabaseConfig.vue b/src/views/Auth/components/DatabaseConfig.vue index 6aafa1f45..9984dc210 100644 --- a/src/views/Auth/components/DatabaseConfig.vue +++ b/src/views/Auth/components/DatabaseConfig.vue @@ -3,9 +3,8 @@ @@ -154,17 +153,17 @@ + + {{ $t('Auth.setDefault') }} + + + {{ $t('Base.help') }} +
@@ -180,17 +179,17 @@ + + {{ $t('Auth.setDefault') }} + + + {{ $t('Base.help') }} +
@@ -211,17 +210,17 @@ + + {{ $t('Auth.setDefault') }} + + + {{ $t('Base.help') }} +
diff --git a/src/views/Auth/components/HttpConfig.vue b/src/views/Auth/components/HttpConfig.vue index bdec10952..a55ad9b49 100644 --- a/src/views/Auth/components/HttpConfig.vue +++ b/src/views/Auth/components/HttpConfig.vue @@ -2,9 +2,8 @@
@@ -61,13 +60,13 @@ :desc="tl('httpBodyTip')" desc-marked /> - - {{ $t('Auth.setDefault') }} - - - {{ $t('Base.help') }} - + + {{ $t('Auth.setDefault') }} + + + {{ $t('Base.help') }} +
diff --git a/src/views/Auth/components/JwtConfig.vue b/src/views/Auth/components/JwtConfig.vue index e5d5d4ef3..0e72ceb75 100644 --- a/src/views/Auth/components/JwtConfig.vue +++ b/src/views/Auth/components/JwtConfig.vue @@ -8,9 +8,8 @@ ref="formCom" :model="jwtConfig" :rules="rules" - class="create-form" - label-position="top" - require-asterisk-position="right" + class="create-form tong-form" + label-width="200px" > diff --git a/src/views/Auth/components/KerberosConfig.vue b/src/views/Auth/components/KerberosConfig.vue index 7f5c064f4..0701d7d78 100644 --- a/src/views/Auth/components/KerberosConfig.vue +++ b/src/views/Auth/components/KerberosConfig.vue @@ -4,9 +4,8 @@ ref="formCom" :model="kerberosConfig" :rules="rules" - class="create-form" - label-position="top" - require-asterisk-position="right" + class="create-form tong-form" + label-width="200px" > diff --git a/src/views/Auth/components/LdapConfig.vue b/src/views/Auth/components/LdapConfig.vue index f7014cee7..0aa569bdd 100644 --- a/src/views/Auth/components/LdapConfig.vue +++ b/src/views/Auth/components/LdapConfig.vue @@ -2,9 +2,8 @@
diff --git a/src/views/Auth/style/authConfig.scss b/src/views/Auth/style/authConfig.scss index 735eb910e..0da27044e 100644 --- a/src/views/Auth/style/authConfig.scss +++ b/src/views/Auth/style/authConfig.scss @@ -5,9 +5,8 @@ } .button-in-label-line { position: absolute; - top: 50%; + top: -32px; right: 0; - transform: translateY(-50%); } .el-upload-list { display: none; @@ -19,16 +18,16 @@ .help-btn { position: absolute; right: 80px; - top: -1px; + top: -32px; } .help-container { width: 100%; - margin-top: 12px; + margin-bottom: 16px; } .help-block { padding: 24px; background: var(--color-bg-split); - margin-bottom: 22px; + margin-bottom: 0; line-height: 1.6; .help-bock__code { background: #1c2a28; @@ -56,7 +55,6 @@ } .viewer-container { border: 1px solid var(--color-border-primary); - margin-top: 12px; width: 100%; height: 280px; } diff --git a/src/views/General/Users.vue b/src/views/General/Users.vue index c81c6a8f1..76f087adb 100644 --- a/src/views/General/Users.vue +++ b/src/views/General/Users.vue @@ -72,8 +72,7 @@ ref="formCom" :model="record" :rules="rules" - label-position="top" - require-asterisk-position="right" + label-width="120px" @keyup.enter="save()" > diff --git a/src/views/RuleEngine/MessageTransform/TransformCreate.vue b/src/views/RuleEngine/MessageTransform/TransformCreate.vue index e935ccea1..2d2543df5 100644 --- a/src/views/RuleEngine/MessageTransform/TransformCreate.vue +++ b/src/views/RuleEngine/MessageTransform/TransformCreate.vue @@ -5,24 +5,25 @@ /> -
- - {{ t('Base.cancel') }} - - - {{ tl('preview') }} - - - {{ t('Base.create') }} - -
+
+ + + {{ t('Base.cancel') }} + + + {{ tl('preview') }} + + + {{ t('Base.create') }} +
+ diff --git a/src/views/RuleEngine/MessageTransform/TransformDetail.vue b/src/views/RuleEngine/MessageTransform/TransformDetail.vue index b207e05e6..3e8e35876 100644 --- a/src/views/RuleEngine/MessageTransform/TransformDetail.vue +++ b/src/views/RuleEngine/MessageTransform/TransformDetail.vue @@ -39,19 +39,19 @@ -
- - {{ tl('preview') }} - - - {{ $t('Base.update') }} - -
+
+ + + {{ tl('preview') }} + + + {{ $t('Base.update') }} +
diff --git a/src/views/RuleEngine/MessageTransform/components/TransformForm.vue b/src/views/RuleEngine/MessageTransform/components/TransformForm.vue index 8984e430c..3262ec466 100644 --- a/src/views/RuleEngine/MessageTransform/components/TransformForm.vue +++ b/src/views/RuleEngine/MessageTransform/components/TransformForm.vue @@ -1,181 +1,203 @@ @@ -494,8 +516,8 @@ defineExpose({ right: -12px; transform: translateX(100%); } - .part-header + .tip { - margin-bottom: 20px; + .part-header { + width: 200px; } .column-type.el-table__cell { vertical-align: top; diff --git a/src/views/RuleEngine/Schema/ExternalSchemaCreate.vue b/src/views/RuleEngine/Schema/ExternalSchemaCreate.vue index 412af4386..8517dcad4 100644 --- a/src/views/RuleEngine/Schema/ExternalSchemaCreate.vue +++ b/src/views/RuleEngine/Schema/ExternalSchemaCreate.vue @@ -6,19 +6,19 @@ /> -
- - {{ $t('Base.cancel') }} - - - {{ $t('Base.create') }} - -
+
+ + + {{ $t('Base.cancel') }} + + + {{ $t('Base.create') }} +
diff --git a/src/views/RuleEngine/Schema/ExternalSchemaDetail.vue b/src/views/RuleEngine/Schema/ExternalSchemaDetail.vue index 6a577167a..9e8faa6c1 100644 --- a/src/views/RuleEngine/Schema/ExternalSchemaDetail.vue +++ b/src/views/RuleEngine/Schema/ExternalSchemaDetail.vue @@ -23,13 +23,15 @@
- + + + import { deleteExternalSchema, getExternalSchemaDetail, putExternalSchema } from '@/api/ruleengine' import DetailHeader from '@/components/DetailHeader.vue' -import PreWithEllipsis from '@/components/PreWithEllipsis.vue' import useI18nTl from '@/hooks/useI18nTl' import useOperationConfirm from '@/hooks/useOperationConfirm' import type { ExternalSchema } from '@/types/typeAlias' diff --git a/src/views/RuleEngine/Schema/SchemaCreate.vue b/src/views/RuleEngine/Schema/SchemaCreate.vue index fc19591fa..c8e2a7c4e 100644 --- a/src/views/RuleEngine/Schema/SchemaCreate.vue +++ b/src/views/RuleEngine/Schema/SchemaCreate.vue @@ -11,19 +11,19 @@ v-model="formData" :fixed-type="!isInSinglePage && !!type" /> -
- - {{ $t('Base.cancel') }} - - - {{ $t('Base.create') }} - -
+
+ + + {{ $t('Base.cancel') }} + + + {{ $t('Base.create') }} +
diff --git a/src/views/RuleEngine/Schema/SchemaDetail.vue b/src/views/RuleEngine/Schema/SchemaDetail.vue index 38ddc801b..ac4511b8f 100644 --- a/src/views/RuleEngine/Schema/SchemaDetail.vue +++ b/src/views/RuleEngine/Schema/SchemaDetail.vue @@ -19,13 +19,15 @@
- + + + - - - - - diff --git a/src/views/RuleEngine/Schema/components/SchemaRegistryForm.vue b/src/views/RuleEngine/Schema/components/SchemaRegistryForm.vue index 8b90fc427..42383f12d 100644 --- a/src/views/RuleEngine/Schema/components/SchemaRegistryForm.vue +++ b/src/views/RuleEngine/Schema/components/SchemaRegistryForm.vue @@ -2,64 +2,70 @@ - - - - - - - - - - - - - @@ -75,6 +75,5 @@ const submit = async () => { diff --git a/src/views/RuleEngine/SchemaValidation/ValidationDetail.vue b/src/views/RuleEngine/SchemaValidation/ValidationDetail.vue index db971a5bd..fe6a6510d 100644 --- a/src/views/RuleEngine/SchemaValidation/ValidationDetail.vue +++ b/src/views/RuleEngine/SchemaValidation/ValidationDetail.vue @@ -44,6 +44,8 @@ v-model="validationData" is-edit /> + + - - - - - -
    -
  • - - -
    - - -
    -
    -
  • -
-
- - - - - + + + + + + + + +
    +
  • + + +
    + + +
    +
    +
  • +
+
+
+ + + + + +
-

{{ tl('verificationMethod') }}

- - - - {{ label }} - - - - - - - - - - - diff --git a/src/views/Auth/AuthnDetails.vue b/src/views/Auth/AuthnDetails.vue index 438d65a35..a207b3323 100644 --- a/src/views/Auth/AuthnDetails.vue +++ b/src/views/Auth/AuthnDetails.vue @@ -106,6 +106,11 @@ ref="formCom" /> + + + {{ $t('Base.cancel') }} @@ -117,9 +122,6 @@ > {{ $t('Base.update') }} - -
- - {{ $t('Base.cancel') }} - - - {{ $t('Base.nextStep') }} - -
@@ -69,21 +61,31 @@ :database="type" auth-type="authz" /> -
- - {{ $t('Base.backStep') }} - - - {{ $t('Base.create') }} - -
+ + + +
diff --git a/src/views/Auth/AuthzDetails.vue b/src/views/Auth/AuthzDetails.vue index 288a44141..18c821715 100644 --- a/src/views/Auth/AuthzDetails.vue +++ b/src/views/Auth/AuthzDetails.vue @@ -80,6 +80,11 @@ v-model="configData" ref="formCom" /> + + + {{ $t('Base.cancel') }} @@ -91,9 +96,6 @@ > {{ $t('Base.update') }} -
diff --git a/src/views/Auth/components/AuthnManager.vue b/src/views/Auth/components/AuthnManager.vue index c47ee6749..3c9a2a7d6 100644 --- a/src/views/Auth/components/AuthnManager.vue +++ b/src/views/Auth/components/AuthnManager.vue @@ -88,8 +88,8 @@ ref="recordForm" :model="record" :rules="getRules()" - label-position="top" - require-asterisk-position="right" + class="tong-form" + label-width="120px" > @@ -360,9 +360,6 @@ const resetIsSuperuser = () => { width: 260px; } } - .border-checkbox { - margin-top: 16px; - } .add-funcs-container { display: flex; diff --git a/src/views/Auth/components/HttpConfig.vue b/src/views/Auth/components/HttpConfig.vue index a55ad9b49..38dd72516 100644 --- a/src/views/Auth/components/HttpConfig.vue +++ b/src/views/Auth/components/HttpConfig.vue @@ -26,11 +26,13 @@ - + diff --git a/src/views/Auth/style/auth.scss b/src/views/Auth/style/auth.scss index 58c8cee82..39950b037 100644 --- a/src/views/Auth/style/auth.scss +++ b/src/views/Auth/style/auth.scss @@ -26,9 +26,6 @@ margin-bottom: 32px; } } - .step-btn { - margin-top: 24px; - } .result-block { .result-title { font-size: 16px; diff --git a/src/views/Auth/style/authConfig.scss b/src/views/Auth/style/authConfig.scss index 0da27044e..07ce0cb94 100644 --- a/src/views/Auth/style/authConfig.scss +++ b/src/views/Auth/style/authConfig.scss @@ -1,4 +1,7 @@ .config { + .el-form{ + margin-bottom: -16px; + } .create-form { .el-form-item { position: relative; @@ -12,7 +15,7 @@ display: none; } } - .config-sub-block { + .config-sub-block:not(:last-child) { margin-bottom: 16px; } .help-btn { diff --git a/src/views/Clients/components/CreateSubscribe.vue b/src/views/Clients/components/CreateSubscribe.vue index 57fd934d8..289b9867a 100644 --- a/src/views/Clients/components/CreateSubscribe.vue +++ b/src/views/Clients/components/CreateSubscribe.vue @@ -7,13 +7,7 @@ @close="close" @open="open" > - + diff --git a/src/views/Config/ClusterLinking/ClusterLinkingCreate.vue b/src/views/Config/ClusterLinking/ClusterLinkingCreate.vue index 393ed8b8c..2b78e312e 100644 --- a/src/views/Config/ClusterLinking/ClusterLinkingCreate.vue +++ b/src/views/Config/ClusterLinking/ClusterLinkingCreate.vue @@ -5,19 +5,19 @@ /> -
- - {{ t('Base.cancel') }} - - - {{ t('Base.create') }} - -
+
+ + + {{ t('Base.cancel') }} + + + {{ t('Base.create') }} +
diff --git a/src/views/Config/ClusterLinking/ClusterLinkingDetail.vue b/src/views/Config/ClusterLinking/ClusterLinkingDetail.vue index 323a310ec..8e6049624 100644 --- a/src/views/Config/ClusterLinking/ClusterLinkingDetail.vue +++ b/src/views/Config/ClusterLinking/ClusterLinkingDetail.vue @@ -46,6 +46,8 @@ :edit-data-topic-length="editDataTopicLength" is-edit /> + + diff --git a/src/views/Diagnose/LogTrace/LogTrace.vue b/src/views/Diagnose/LogTrace/LogTrace.vue index 55cb750d7..9d5362f55 100644 --- a/src/views/Diagnose/LogTrace/LogTrace.vue +++ b/src/views/Diagnose/LogTrace/LogTrace.vue @@ -121,10 +121,10 @@ > @@ -188,11 +188,13 @@ - +
{{ $t('SlowSub.basicSettings') }}
@@ -237,6 +237,9 @@ getConfig() color: var(--color-title-primary); line-height: 25px; } +.slow-sub-form { + width: 70%; +} .type-desc { line-height: 1.5; } diff --git a/src/views/Diagnose/TopicMetrics.vue b/src/views/Diagnose/TopicMetrics.vue index 33c9ac864..4d2148104 100644 --- a/src/views/Diagnose/TopicMetrics.vue +++ b/src/views/Diagnose/TopicMetrics.vue @@ -148,9 +148,9 @@ diff --git a/src/views/Exhook/ExhookCreate.vue b/src/views/Exhook/ExhookCreate.vue index 8d08b2e93..4e4aaa6c3 100644 --- a/src/views/Exhook/ExhookCreate.vue +++ b/src/views/Exhook/ExhookCreate.vue @@ -3,19 +3,19 @@ -
- - {{ $t('Base.cancel') }} - - - {{ $t('Base.create') }} - -
+
+ + + {{ $t('Base.cancel') }} + + + {{ $t('Base.create') }} +
diff --git a/src/views/Exhook/ExhookDetail.vue b/src/views/Exhook/ExhookDetail.vue index b31f63246..662864fc1 100644 --- a/src/views/Exhook/ExhookDetail.vue +++ b/src/views/Exhook/ExhookDetail.vue @@ -67,6 +67,8 @@ + + @@ -64,7 +63,6 @@
- + diff --git a/src/views/Gateway/components/exprotoBasic.vue b/src/views/Gateway/components/exprotoBasic.vue index da85500e5..449453cb3 100644 --- a/src/views/Gateway/components/exprotoBasic.vue +++ b/src/views/Gateway/components/exprotoBasic.vue @@ -1,6 +1,6 @@