From 3fa10fb26931882df81004d8026b5e4f40b740c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A5=9E=E4=BB=99=E9=83=BD=E6=B2=A1=E7=94=A8?=
<615206459@qq.com>
Date: Thu, 20 Mar 2025 16:57:21 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 8 ++--
src/modules/base/components/code/json.vue | 48 ++++++++++++-------
.../base/pages/main/components/bmenu.tsx | 2 +-
.../base/pages/main/components/process.vue | 13 +++--
.../base/pages/main/components/route-nav.vue | 2 +-
.../base/pages/main/components/slider.vue | 2 +-
src/modules/helper/components/ai-code/btn.vue | 18 ++-----
src/plugins/crud/components/select/index.scss | 4 ++
8 files changed, 56 insertions(+), 41 deletions(-)
diff --git a/index.html b/index.html
index 3297a21..6a70d3e 100644
--- a/index.html
+++ b/index.html
@@ -16,13 +16,13 @@
body,
#app {
height: 100%;
- font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
- 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}
* {
- margin: 0;
- padding: 0;
+ -webkit-font-smoothing: antialiased;
+ font-family:
+ 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
+ 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}
.preload__wrap {
diff --git a/src/modules/base/components/code/json.vue b/src/modules/base/components/code/json.vue
index ebd4540..2cd15f8 100644
--- a/src/modules/base/components/code/json.vue
+++ b/src/modules/base/components/code/json.vue
@@ -7,7 +7,7 @@
effect="dark"
>
- {{ text }}
+ {{ text }}
@@ -33,7 +33,8 @@ import { computed, defineComponent } from 'vue';
import { useI18n } from 'vue-i18n';
const props = defineProps({
- modelValue: [String, Object],
+ content: null,
+ modelValue: null,
popover: Boolean,
height: {
type: [Number, String],
@@ -42,7 +43,8 @@ const props = defineProps({
maxHeight: {
type: [Number, String],
default: 300
- }
+ },
+ title: String
});
const { copy } = useClipboard();
@@ -50,14 +52,14 @@ const { t } = useI18n();
// 文本
const text = computed(() => {
- const v = props.modelValue;
+ const v = props.modelValue || props.content;
if (isString(v)) {
return v;
} else if (isObject(v)) {
return JSON.stringify(v, null, 4);
} else {
- return '';
+ return String(v);
}
});
@@ -72,16 +74,20 @@ const viewer = defineComponent({
return () => {
return (
-
-
- {t('复制')}
-
+
+ {text.value != '{}' && (
+
+ {t('复制')}
+
+ )}
{slots.op && slots.op()}
+ {props.title &&
{props.title}
}
+
@@ -101,25 +107,35 @@ const viewer = defineComponent({
position: relative;
min-width: 200px;
max-width: 500px;
+ font-size: 14px;
- .op {
+ &__op {
position: absolute;
right: 8px;
top: 8px;
z-index: 9;
}
- .scrollbar {
+ &__title {
+ padding: 10px;
+ font-size: 12px;
+ color: var(--el-text-color-regular);
+
+ & + .cl-code-json__content {
+ padding-top: 0;
+ }
+ }
+
+ &__content {
+ padding: 10px;
+
code {
- display: block;
- padding: 10px;
- font-size: 14px;
white-space: pre-wrap;
}
}
&__wrap {
- .text {
+ .cl-code-json__text {
display: block;
text-overflow: ellipsis;
white-space: nowrap;
diff --git a/src/modules/base/pages/main/components/bmenu.tsx b/src/modules/base/pages/main/components/bmenu.tsx
index 1ea8e3a..6f0be72 100644
--- a/src/modules/base/pages/main/components/bmenu.tsx
+++ b/src/modules/base/pages/main/components/bmenu.tsx
@@ -54,7 +54,7 @@ export default defineComponent({
const item = (e: Menu.Item) => {
const arr = [
- ,
+ ,
{e.meta?.label}
diff --git a/src/modules/base/pages/main/components/process.vue b/src/modules/base/pages/main/components/process.vue
index 73c0a89..cf82f72 100644
--- a/src/modules/base/pages/main/components/process.vue
+++ b/src/modules/base/pages/main/components/process.vue
@@ -25,7 +25,7 @@
@click="onTap(item, Number(index))"
@contextmenu.stop.prevent="openCM($event, item)"
>
-
+
{{ item.meta.label || item.name || item.path }}
@@ -209,7 +209,7 @@ onMounted(() => {
height: 100%;
flex: 1;
position: relative;
- margin: 0 10px;
+ margin: 0 5px;
}
&__scroller {
@@ -229,8 +229,9 @@ onMounted(() => {
padding: 0 8px;
cursor: pointer;
color: var(--el-text-color-regular);
- border-radius: 4px;
+ border-radius: var(--el-border-radius-base);
margin-right: 5px;
+ border: 1px solid var(--el-fill-color-dark);
.close {
width: 0;
@@ -245,6 +246,11 @@ onMounted(() => {
}
}
+ .label {
+ font-size: 12px;
+ line-height: 1;
+ }
+
&:last-child {
margin-right: 0;
}
@@ -255,6 +261,7 @@ onMounted(() => {
&.active {
background-color: var(--el-color-primary);
+ border-color: var(--el-color-primary);
color: #fff;
}
diff --git a/src/modules/base/pages/main/components/route-nav.vue b/src/modules/base/pages/main/components/route-nav.vue
index 2c9eef5..54b9bfb 100644
--- a/src/modules/base/pages/main/components/route-nav.vue
+++ b/src/modules/base/pages/main/components/route-nav.vue
@@ -7,7 +7,7 @@
- {{ item.meta?.label || item.name }}
+ {{ item.meta?.label || item.name }}
diff --git a/src/modules/base/pages/main/components/slider.vue b/src/modules/base/pages/main/components/slider.vue
index 488689a..635262c 100644
--- a/src/modules/base/pages/main/components/slider.vue
+++ b/src/modules/base/pages/main/components/slider.vue
@@ -144,7 +144,7 @@ const keyWord = ref('');
}
&:not(&--popup) {
- --el-menu-base-level-padding: 24px;
+ --el-menu-base-level-padding: 23px;
.el-menu-item,
.el-sub-menu__title {
diff --git a/src/modules/helper/components/ai-code/btn.vue b/src/modules/helper/components/ai-code/btn.vue
index ea2a3b9..592f211 100644
--- a/src/modules/helper/components/ai-code/btn.vue
+++ b/src/modules/helper/components/ai-code/btn.vue
@@ -1,6 +1,5 @@
-
{{ $t('AI极速编码') }}
Start
@@ -21,12 +20,7 @@ function toCode() {
width: auto;
position: relative;
overflow: hidden;
- width: 120px;
-
- .icon {
- position: absolute;
- left: 8px;
- }
+ width: 90px;
.t1,
.t2 {
@@ -37,11 +31,10 @@ function toCode() {
letter-spacing: 1px;
position: absolute;
width: 100%;
- padding-left: 18px;
top: 50%;
left: 0;
transform: translateY(-50%);
- background: linear-gradient(to right, #9f9f9f 0, #fff 10%, #868686 20%);
+ background: linear-gradient(to right, #9f9f9f 0, #fff 10%, #666 20%);
background-position: 0;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
@@ -49,7 +42,6 @@ function toCode() {
animation-fill-mode: forwards;
-webkit-text-size-adjust: none;
font-size: 12px;
- line-height: 1;
}
.t2 {
@@ -57,10 +49,6 @@ function toCode() {
}
&:hover {
- .icon {
- color: var(--el-color-primary);
- }
-
.t1 {
top: -100%;
}
@@ -76,7 +64,7 @@ function toCode() {
background-position: 0;
}
100% {
- background-position: 100px;
+ background-position: 90px;
}
}
diff --git a/src/plugins/crud/components/select/index.scss b/src/plugins/crud/components/select/index.scss
index 18217ab..8ab7d3f 100644
--- a/src/plugins/crud/components/select/index.scss
+++ b/src/plugins/crud/components/select/index.scss
@@ -14,6 +14,10 @@
&__item {
padding: var(--cl-select-button-padding) !important;
border-radius: var(--cl-select-button-radius) !important;
+
+ &-label {
+ line-height: unset;
+ }
}
}