From b0233e3f6b2fc42162a3998d3f50c7e56e65ce56 Mon Sep 17 00:00:00 2001 From: jialin Date: Wed, 6 Mar 2024 21:24:08 +0800 Subject: [PATCH] fix(style): code viewer separator line --- config/vite.config.dev.ts | 2 +- src/assets/style/variable.less | 2 + src/components/code-diff-view/index.vue | 76 +++++++++++++------------ src/views/cli-download/pages/index.vue | 18 +----- 4 files changed, 45 insertions(+), 53 deletions(-) diff --git a/config/vite.config.dev.ts b/config/vite.config.dev.ts index a5e86be1f..366a63a9f 100644 --- a/config/vite.config.dev.ts +++ b/config/vite.config.dev.ts @@ -19,7 +19,7 @@ export default mergeConfig( }, https: true, port: 5050, - proxy: createProxyTable() + proxy: createProxyTable('https://lmkcc.site') }, plugins: [ basicSsl(), diff --git a/src/assets/style/variable.less b/src/assets/style/variable.less index ab61fa38b..f54b3c4d8 100644 --- a/src/assets/style/variable.less +++ b/src/assets/style/variable.less @@ -2,6 +2,7 @@ body { --color-white-1: #fff; --color-white-2: #fff; --color-white-3: #fff; + --color-seal-black-1: #000; --color-button-close: #fff; --color-border-input-disabled: #fff; --color-bg-input-disabled: var(--color-fill-1); @@ -228,6 +229,7 @@ body[arco-theme='dark'] { --color-background-2: 21, 21, 21; --color-background-3: 52, 62, 76; --color-modal-bg: 21, 21, 21; + --color-seal-black-1: rgba(255, 255, 255, 0.7); --black-1: rgb(var(--color-background-1)); --black-2: rgb(var(--color-background-2)); --black-3: rgb(var(--color-background-3)); diff --git a/src/components/code-diff-view/index.vue b/src/components/code-diff-view/index.vue index ff9c4e1cb..2427af0a1 100644 --- a/src/components/code-diff-view/index.vue +++ b/src/components/code-diff-view/index.vue @@ -71,39 +71,41 @@ } ]} > - { - leftChunks.value[item.leftIndex].collapsed = false; - rightChunks.value[item.rightIndex].collapsed = false; - }} - v-slots={{ - title: ctx.slots.leftTitle - ? () => ctx.slots.leftTitle?.() - : null - }} - > - {ctx.slots.sperator ? ( - () => ctx.slots.sperator?.() - ) : ( -
- )} - { - leftChunks.value[item.leftIndex].collapsed = false; - rightChunks.value[item.rightIndex].collapsed = false; - }} - v-slots={{ - title: ctx.slots.rightTitle - ? () => ctx.slots.rightTitle?.() - : null - }} - > +
+ { + leftChunks.value[item.leftIndex].collapsed = false; + rightChunks.value[item.rightIndex].collapsed = false; + }} + v-slots={{ + title: ctx.slots.leftTitle + ? () => ctx.slots.leftTitle?.() + : null + }} + > + {ctx.slots.sperator ? ( + () => ctx.slots.sperator?.() + ) : ( +
+ )} + { + leftChunks.value[item.leftIndex].collapsed = false; + rightChunks.value[item.rightIndex].collapsed = false; + }} + v-slots={{ + title: ctx.slots.rightTitle + ? () => ctx.slots.rightTitle?.() + : null + }} + > +
) : null} @@ -133,8 +135,6 @@ .chunk-box { position: relative; - display: flex; - justify-content: space-between; overflow: hidden; overflow-y: auto; font-size: var(--font-size-small); @@ -144,6 +144,12 @@ border: 1px solid var(--color-border-2); } + .main { + display: flex; + justify-content: space-between; + height: max-content; + } + .line { width: 1px; border-left: 1px solid var(--color-border-2); diff --git a/src/views/cli-download/pages/index.vue b/src/views/cli-download/pages/index.vue index df35d9983..0fbd6f4c8 100644 --- a/src/views/cli-download/pages/index.vue +++ b/src/views/cli-download/pages/index.vue @@ -6,22 +6,6 @@ > -