From f5f857bcb4fcfebb7a51036a89bc48a8ba060c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Wed, 13 Dec 2023 17:05:16 +0800 Subject: [PATCH] =?UTF-8?q?CN-1479=20fix:=20=E6=90=9C=E7=B4=A2=E7=BB=84?= =?UTF-8?q?=E4=BB=B6showHint=E6=8F=90=E7=A4=BA=E6=96=87=E6=9C=AC=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/advancedSearch/codemirror.scss | 64 +++- .../views/entityExplorer/entityList/row.scss | 2 +- .../showhint/Hint/HelperInfo.vue | 16 +- .../advancedSearch/showhint/Hint/Hint.vue | 20 +- .../advancedSearch/showhint/Hint/HintInfo.vue | 5 +- .../showhint/const/defaultTips.js | 91 +++-- .../showhint/const/fieldTips.js | 28 +- .../showhint/const/filterTips.js | 173 +++++---- .../showhint/const/functionTips.js | 220 ++++++------ .../showhint/const/operatorTips.js | 333 +++++------------- .../advancedSearch/showhint/const/sqlTips.js | 65 ++-- .../advancedSearch/showhint/const/varTips.js | 20 +- .../showhint/packages/getDataset.js | 5 +- src/views/entityExplorer/entityList/Row.vue | 8 +- 14 files changed, 471 insertions(+), 579 deletions(-) diff --git a/src/assets/css/components/components/advancedSearch/codemirror.scss b/src/assets/css/components/components/advancedSearch/codemirror.scss index e21dd841..2dc63c75 100644 --- a/src/assets/css/components/components/advancedSearch/codemirror.scss +++ b/src/assets/css/components/components/advancedSearch/codemirror.scss @@ -375,12 +375,16 @@ span.CodeMirror-selectedtext { background: none; } } .hint-title { - margin: 10px 10px 10px 4px; - line-height: 20px; - font-weight: bold; + margin: 10px 10px 10px 0; + height: 24px; + line-height: 24px; /* 禁止选中 样式 */ background: #fff !important; - color: #000 !important; + font-family: NotoSansHans-Medium; + font-size: 14px; + color: #333333 !important; + letter-spacing: 0; + font-weight: 500; } .cm-s-eclipse span.cm-string-2 { @@ -433,3 +437,55 @@ span.CodeMirror-selectedtext { background: none; } .cm-variable-2{ font-weight: bold; } + +.default-tips-header,.default-tips-title { + height: 24px; + line-height: 24px; + font-weight: 700; + color: #333333; + font-size: 14px; + margin: 6px 0; + font-family: NotoSansSC-Bold; + letter-spacing: 0; +} + +.default-tips-header { + font-size: 15px; +} + +.show-hint-tips__p { + word-break: keep-all; + margin: 0; + line-height: 24px; + color: #575757; + font-weight: 400; +} + +.Hint { + padding: 0; + z-index: 2; + + .hint__block { + display: flex; + flex-direction: row; + width: calc(100% - 41px); + min-height: 320px; + margin-top: 6px; + box-shadow: 0 2px 8px 0 rgba(0,0,0,.3); + z-index: 2; + + .hint__block-filter { + width: 326px; + background: #fff; + border-right: 1px solid #DEDEDE; + padding: 12px; + z-index: 2; + } + + .hint__block-helper { + width: calc(100% - 326px); + background: #fff; + z-index: 2; + } + } +} diff --git a/src/assets/css/components/views/entityExplorer/entityList/row.scss b/src/assets/css/components/views/entityExplorer/entityList/row.scss index 1b1d14c1..7186eee6 100644 --- a/src/assets/css/components/views/entityExplorer/entityList/row.scss +++ b/src/assets/css/components/views/entityExplorer/entityList/row.scss @@ -43,7 +43,7 @@ align-content: center; padding: 16px 0; margin-bottom: 1px; - background-color: white; + //background-color: white; border-radius: 0 4px 4px 0; .cn-entity__icon { diff --git a/src/components/advancedSearch/showhint/Hint/HelperInfo.vue b/src/components/advancedSearch/showhint/Hint/HelperInfo.vue index d223ddd2..cc9cae8c 100644 --- a/src/components/advancedSearch/showhint/Hint/HelperInfo.vue +++ b/src/components/advancedSearch/showhint/Hint/HelperInfo.vue @@ -15,6 +15,7 @@ import filterTips from '@/components/advancedSearch/showhint/const/filterTips.js import varTips from '@/components/advancedSearch/showhint/const/varTips.js' import { fieldRender } from '@/components/advancedSearch/showhint/const/fieldTips.js' +import { EN, storageKey, ZH } from '@/utils/constants' export default { name: 'HelperInfo', @@ -104,8 +105,12 @@ export default { return fieldRender } } + const language = localStorage.getItem(storageKey.language) || EN - return defaultTips.default.description + if (language === ZH) { + return defaultTips.zhDefault.description + } + return defaultTips.enDefault.description } } } @@ -122,7 +127,7 @@ export default { } .tips-container { - padding: 6px; + padding: 12px; } /deep/ ul li { @@ -143,9 +148,10 @@ export default { /deep/ code, .code { background: initial; - - border: 1px solid #ccc; - padding: 4px 12px; + border: 1px solid #DEDEDE; + height: 24px; + line-height: 24px; + padding: 0 12px; margin: 6px 0; display: block; } diff --git a/src/components/advancedSearch/showhint/Hint/Hint.vue b/src/components/advancedSearch/showhint/Hint/Hint.vue index 082adf9c..262e492f 100644 --- a/src/components/advancedSearch/showhint/Hint/Hint.vue +++ b/src/components/advancedSearch/showhint/Hint/Hint.vue @@ -1,19 +1,11 @@