fix: standardize border styles across components
- Updated border styles in multiple components to use a consistent thickness of 0.5px instead of 1px, enhancing visual uniformity. - Adjusted styles in components such as AgentSelector, Input-field, KnowledgeBaseSelector, and others to improve overall UI consistency. - Refined CSS variables for borders to ensure maintainability and adherence to design specifications. These changes improve the aesthetic coherence of the application, providing a more polished user interface.
This commit is contained in:
@@ -478,7 +478,7 @@ watch(() => props.visible, (newVal) => {
|
||||
background: var(--td-bg-color-container, #fff);
|
||||
border-radius: 10px;
|
||||
box-shadow: var(--td-shadow-2, 0 6px 28px rgba(15, 23, 42, 0.08));
|
||||
border: 1px solid var(--td-component-border, #e7e9eb);
|
||||
border: .5px solid var(--td-component-border, #e7e9eb);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -2017,7 +2017,7 @@ const getImgSrc = (url: string) => {
|
||||
width: 800px;
|
||||
background: var(--td-bg-color-container, #FFF);
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--td-component-border, #E7E7E7);
|
||||
border: .5px solid var(--td-component-border, #E7E7E7);
|
||||
box-shadow: 0 6px 6px 0 rgba(0, 0, 0, 0.04), 0 12px 12px -1px rgba(0, 0, 0, 0.08);
|
||||
|
||||
&:focus-within {
|
||||
@@ -2032,7 +2032,7 @@ const getImgSrc = (url: string) => {
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 6px 12px 6px;
|
||||
border-bottom: 1px solid var(--td-component-stroke, #e7e7e7);
|
||||
border-bottom: .5px solid var(--td-component-stroke, #e7e7e7);
|
||||
background: var(--td-bg-color-container, #fff);
|
||||
border-radius: 11px 11px 0 0; /* 与 .rich-input-container 内缘上边圆角一致(12px - 1px 边框) */
|
||||
}
|
||||
@@ -2047,7 +2047,7 @@ const getImgSrc = (url: string) => {
|
||||
font-weight: 500;
|
||||
cursor: default;
|
||||
transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
|
||||
border: 1px solid transparent;
|
||||
border: .5px solid transparent;
|
||||
color: var(--td-text-color-primary, #1f2937);
|
||||
line-height: 1.3;
|
||||
}
|
||||
@@ -2263,7 +2263,6 @@ const getImgSrc = (url: string) => {
|
||||
gap: 4px;
|
||||
padding: 6px 10px;
|
||||
border-radius: 6px;
|
||||
background: var(--td-bg-color-secondarycontainer, #f5f5f5);
|
||||
color: var(--td-text-color-secondary, #666);
|
||||
cursor: pointer;
|
||||
transition: background 0.12s, color 0.12s;
|
||||
@@ -2290,7 +2289,7 @@ const getImgSrc = (url: string) => {
|
||||
min-width: auto;
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
border: 1px solid var(--td-component-border, #e7e7e7);
|
||||
border: .5px solid var(--td-component-border, #e7e7e7);
|
||||
}
|
||||
|
||||
.agent-icon {
|
||||
@@ -2433,7 +2432,7 @@ const getImgSrc = (url: string) => {
|
||||
:global(.input-field-tooltip) {
|
||||
.t-popup__content {
|
||||
box-shadow: var(--td-shadow-2);
|
||||
border: 1px solid var(--td-component-border, #e7e7e7);
|
||||
border: .5px solid var(--td-component-border, #e7e7e7);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2556,8 +2555,7 @@ const getImgSrc = (url: string) => {
|
||||
min-width: 100px;
|
||||
height: 22px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--td-component-border, #e7e7e7);
|
||||
background: var(--td-bg-color-secondarycontainer, #f5f5f5);
|
||||
border: .5px solid var(--td-component-border, #e7e7e7);
|
||||
transition: background 0.12s, border-color 0.12s;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -2615,7 +2613,7 @@ const getImgSrc = (url: string) => {
|
||||
background: var(--td-bg-color-container, #fff);
|
||||
border-radius: 10px;
|
||||
box-shadow: var(--td-shadow-2, 0 6px 28px rgba(15, 23, 42, 0.08));
|
||||
border: 1px solid var(--td-component-border, #e7e9eb);
|
||||
border: .5px solid var(--td-component-border, #e7e9eb);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -2629,7 +2627,7 @@ const getImgSrc = (url: string) => {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--td-component-stroke, #f0f0f0);
|
||||
border-bottom: .5px solid var(--td-component-stroke, #f0f0f0);
|
||||
background: var(--td-bg-color-container, #fff);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
@@ -2651,7 +2649,7 @@ const getImgSrc = (url: string) => {
|
||||
gap: 4px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid transparent;
|
||||
border: .5px solid transparent;
|
||||
background: transparent;
|
||||
color: var(--td-brand-color, #07c05f);
|
||||
font-size: 12px;
|
||||
|
||||
@@ -366,7 +366,7 @@ watch(() => props.visible, async (v) => {
|
||||
.kb-dropdown {
|
||||
position: fixed !important;
|
||||
background: var(--td-bg-color-container);
|
||||
border: 1px solid var(--td-component-border);
|
||||
border: .5px solid var(--td-component-border);
|
||||
border-radius: 10px;
|
||||
box-shadow: var(--td-shadow-2);
|
||||
overflow: hidden;
|
||||
@@ -382,13 +382,13 @@ watch(() => props.visible, async (v) => {
|
||||
/* 宽度由 JS 控制(dropdownWidth),这里只做内部样式 */
|
||||
.kb-search {
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid var(--td-component-stroke);
|
||||
border-bottom: .5px solid var(--td-component-stroke);
|
||||
}
|
||||
.kb-search-input {
|
||||
width: 100%;
|
||||
padding: 6px 10px;
|
||||
font-size: 12px;
|
||||
border: 1px solid var(--td-component-stroke);
|
||||
border: .5px solid var(--td-component-stroke);
|
||||
border-radius: 6px;
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
outline: none;
|
||||
|
||||
@@ -145,12 +145,12 @@ onMounted(() => {
|
||||
font-size: 12px;
|
||||
height: 26px;
|
||||
padding: 0 8px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
|
||||
background: var(--td-bg-color-container);
|
||||
|
||||
&:hover {
|
||||
color: var(--td-brand-color);
|
||||
border-color: var(--td-brand-color);
|
||||
background: var(--td-bg-color-container);
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
}
|
||||
|
||||
:deep(.t-button__text) {
|
||||
|
||||
@@ -265,7 +265,7 @@ onUnmounted(() => {
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
border: 1px solid var(--td-component-stroke);
|
||||
border: .5px solid var(--td-component-stroke);
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-container-hover);
|
||||
@@ -323,7 +323,7 @@ onUnmounted(() => {
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--td-bg-color-container);
|
||||
border: 1px solid var(--td-component-stroke);
|
||||
border: .5px solid var(--td-component-stroke);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
|
||||
z-index: 1000;
|
||||
@@ -332,7 +332,7 @@ onUnmounted(() => {
|
||||
|
||||
.dropdown-header {
|
||||
padding: 12px;
|
||||
border-bottom: 1px solid var(--td-component-stroke);
|
||||
border-bottom: .5px solid var(--td-component-stroke);
|
||||
}
|
||||
|
||||
.dropdown-title {
|
||||
@@ -350,7 +350,7 @@ onUnmounted(() => {
|
||||
padding: 7px 10px;
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
border-radius: 6px;
|
||||
border: 1px solid transparent;
|
||||
border: .5px solid transparent;
|
||||
transition: all 0.2s;
|
||||
|
||||
&:focus-within {
|
||||
|
||||
@@ -1188,7 +1188,7 @@ defineExpose({
|
||||
|
||||
/* 与知识库列表卡片统一尺寸:160px 高、18px 20px 内边距、12px 圆角 */
|
||||
.agent-card {
|
||||
border: 1px solid var(--td-component-stroke);
|
||||
border: .5px solid var(--td-component-stroke);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
@@ -1469,7 +1469,7 @@ defineExpose({
|
||||
justify-content: space-between;
|
||||
margin-top: auto;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid var(--td-component-stroke);
|
||||
border-top: .5px solid var(--td-component-stroke);
|
||||
}
|
||||
|
||||
.bottom-left {
|
||||
|
||||
@@ -310,8 +310,6 @@ onBeforeUnmount(() => {
|
||||
background: var(--td-bg-color-container);
|
||||
border-radius: 6px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid var(--td-brand-color);
|
||||
box-shadow: 0 1px 3px rgba(7, 192, 95, 0.06);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
<div class="think-header" @click="toggleFold">
|
||||
<div class="think-title">
|
||||
<span v-if="deepSession.thinking" class="thinking-status">
|
||||
<img class="thinking-gif" src="@/assets/img/think.gif" :alt="$t('chat.thinkingAlt')">
|
||||
<span class="thinking-indicator">
|
||||
<span class="indicator-dot"></span>
|
||||
<span class="indicator-ring"></span>
|
||||
</span>
|
||||
<span class="thinking-text">{{ $t('chat.thinking') }}</span>
|
||||
</span>
|
||||
<span v-else class="done-status">
|
||||
@@ -80,13 +83,13 @@ const toggleFold = () => {
|
||||
// 安全地处理思考内容,防止XSS攻击
|
||||
const safeProcessThinkContent = (content) => {
|
||||
if (!content || typeof content !== 'string') return '';
|
||||
|
||||
|
||||
// 先处理换行符
|
||||
const contentWithBreaks = content.replace(/\n/g, '<br/>');
|
||||
|
||||
|
||||
// 使用DOMPurify进行安全清理,允许基本的文本格式化标签
|
||||
const cleanContent = sanitizeHTML(contentWithBreaks);
|
||||
|
||||
|
||||
return cleanContent;
|
||||
};
|
||||
</script>
|
||||
@@ -98,6 +101,7 @@ const safeProcessThinkContent = (content) => {
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
background-color: var(--td-bg-color-container);
|
||||
border: .5px solid var(--td-component-stroke);
|
||||
box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
@@ -126,13 +130,34 @@ const safeProcessThinkContent = (content) => {
|
||||
.thinking-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.thinking-gif {
|
||||
|
||||
.thinking-indicator {
|
||||
position: relative;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.indicator-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: var(--td-brand-color);
|
||||
animation: pulse-dot 1.8s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.indicator-ring {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--td-brand-color);
|
||||
opacity: 0;
|
||||
animation: pulse-ring 1.8s ease-out infinite;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.thinking-text {
|
||||
font-size: 12px;
|
||||
color: var(--td-text-color-primary);
|
||||
@@ -143,13 +168,13 @@ const safeProcessThinkContent = (content) => {
|
||||
.done-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.done-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
|
||||
.done-text {
|
||||
font-size: 12px;
|
||||
color: var(--td-text-color-primary);
|
||||
@@ -161,7 +186,7 @@ const safeProcessThinkContent = (content) => {
|
||||
font-size: 14px;
|
||||
padding: 0 2px 1px 2px;
|
||||
color: var(--td-brand-color);
|
||||
|
||||
|
||||
.toggle-icon {
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
@@ -170,7 +195,7 @@ const safeProcessThinkContent = (content) => {
|
||||
|
||||
.think-content {
|
||||
border-top: 1px solid var(--td-bg-color-secondarycontainer);
|
||||
|
||||
|
||||
.content-inner {
|
||||
padding: 8px 14px;
|
||||
font-size: 12px;
|
||||
@@ -179,11 +204,11 @@ const safeProcessThinkContent = (content) => {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
word-break: break-word;
|
||||
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 2px;
|
||||
@@ -191,4 +216,36 @@ const safeProcessThinkContent = (content) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse-dot {
|
||||
0%, 100% {
|
||||
transform: scale(0.85);
|
||||
opacity: 0.6;
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse-ring {
|
||||
0% {
|
||||
transform: scale(0.5);
|
||||
opacity: 0.6;
|
||||
}
|
||||
100% {
|
||||
transform: scale(1.2);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
html[theme-mode="dark"] {
|
||||
.deep-think {
|
||||
.think-content .content-inner {
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="refer">
|
||||
<div class="refer_header" @click="referBoxSwitch" v-if="session.knowledge_references && session.knowledge_references.length">
|
||||
<div class="refer" v-if="session.knowledge_references && session.knowledge_references.length">
|
||||
<div class="refer_header" @click="referBoxSwitch">
|
||||
<div class="refer_title">
|
||||
<img src="@/assets/img/ziliao.svg" :alt="$t('chat.referenceIconAlt')" />
|
||||
<span>{{ headerText }}</span>
|
||||
@@ -195,6 +195,7 @@ const getWebSearchDisplayText = (item) => {
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
background-color: var(--td-bg-color-container);
|
||||
border: .5px solid var(--td-component-stroke);
|
||||
box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -54,7 +54,7 @@ const props = defineProps<{
|
||||
|
||||
.kb-card {
|
||||
background: @card-bg;
|
||||
border: 1px solid @card-border;
|
||||
border: .5px solid @card-border;
|
||||
border-radius: @card-radius;
|
||||
padding: 12px;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
@@ -115,13 +115,20 @@ const props = defineProps({
|
||||
gap: 4px;
|
||||
flex: 1 0 0;
|
||||
border-radius: 4px;
|
||||
background: var(--td-success-color);
|
||||
background: #8CE97F;
|
||||
margin-left: auto;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #000000e6;
|
||||
font-size: 16px;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html[theme-mode="dark"] {
|
||||
.user_msg {
|
||||
background: var(--td-brand-color-3);
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1585,7 +1585,7 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
}
|
||||
|
||||
.kb-card {
|
||||
border: 1px solid var(--td-component-stroke);
|
||||
border: .5px solid var(--td-component-stroke);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
@@ -1832,7 +1832,7 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
justify-content: space-between;
|
||||
margin-top: auto;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid var(--td-component-stroke);
|
||||
border-top: .5px solid var(--td-component-stroke);
|
||||
}
|
||||
|
||||
.bottom-left {
|
||||
|
||||
@@ -1412,7 +1412,7 @@ onUnmounted(() => {
|
||||
|
||||
/* 与知识库列表卡片统一尺寸:160px 高、18px 20px 内边距、12px 圆角 */
|
||||
.org-card {
|
||||
border: 1px solid var(--td-component-stroke);
|
||||
border: .5px solid var(--td-component-stroke);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
@@ -1626,7 +1626,7 @@ onUnmounted(() => {
|
||||
justify-content: space-between;
|
||||
margin-top: auto;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid var(--td-component-stroke);
|
||||
border-top: .5px solid var(--td-component-stroke);
|
||||
}
|
||||
|
||||
.bottom-left {
|
||||
|
||||
Reference in New Issue
Block a user