fix: 兼容 Chrome 90 前端运行环境

- 为管理端与用户中心补齐旧浏览器运行时 API 和回归测试

- 增加现代 CSS 与选择器降级,保持现有界面效果

- 固定 Chrome 90 构建目标并补充兼容依赖
This commit is contained in:
2026-07-16 14:50:06 +08:00
parent 705e0faab6
commit 27e50a7624
34 changed files with 793 additions and 60 deletions

View File

@@ -10,7 +10,7 @@ const props = defineProps<{
<div
:class="
cn(
'relative [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5 [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5',
'relative [&>[data-slot=input]]:pl-5 [&>[data-slot=input]]:pr-5',
props.class,
)
"

View File

@@ -201,8 +201,11 @@ function toggleCitation(id: string) {
min-height: 26px;
padding: 3px 9px;
color: var(--el-color-primary);
background: var(--el-color-primary-light-9);
background: color-mix(in srgb, var(--el-color-primary-light-9) 78%, white);
border: 1px solid color-mix(in srgb, var(--el-color-primary-light-7) 72%, white);
border: 1px solid var(--el-color-primary-light-7);
border: 1px solid
color-mix(in srgb, var(--el-color-primary-light-7) 72%, white);
border-radius: 999px;
transition:
color 0.18s ease,
@@ -215,6 +218,7 @@ function toggleCitation(id: string) {
.chat-knowledge-card__pill:hover,
.chat-knowledge-card__pill.is-active {
color: var(--el-color-primary);
background: var(--el-color-primary-light-8);
background: color-mix(in srgb, var(--el-color-primary-light-8) 80%, white);
border-color: var(--el-color-primary-light-5);
}
@@ -236,7 +240,12 @@ function toggleCitation(id: string) {
justify-content: center;
width: 16px;
height: 16px;
color: color-mix(in srgb, var(--el-color-primary) 78%, var(--el-text-color-regular));
color: var(--el-color-primary);
color: color-mix(
in srgb,
var(--el-color-primary) 78%,
var(--el-text-color-regular)
);
}
.chat-knowledge-card__label {
@@ -253,7 +262,12 @@ function toggleCitation(id: string) {
font-size: 12px;
font-weight: 600;
line-height: 18px;
color: color-mix(in srgb, var(--el-color-primary) 62%, var(--el-text-color-secondary));
color: var(--el-text-color-secondary);
color: color-mix(
in srgb,
var(--el-color-primary) 62%,
var(--el-text-color-secondary)
);
text-align: center;
}
@@ -262,6 +276,7 @@ function toggleCitation(id: string) {
padding: 14px;
margin-top: 8px;
color: var(--el-text-color-primary);
background: var(--el-bg-color-overlay);
background: color-mix(in srgb, var(--el-bg-color-overlay) 94%, white);
border: 1px solid var(--el-border-color-lighter);
border-radius: 12px;
@@ -335,6 +350,7 @@ function toggleCitation(id: string) {
.chat-knowledge-card__hit {
padding: 10px 10px 10px 12px;
background: var(--el-fill-color-lighter);
background: color-mix(in srgb, var(--el-fill-color-lighter) 72%, white);
border-left: 2px solid var(--el-color-primary-light-5);
border-radius: 8px;
@@ -365,4 +381,10 @@ function toggleCitation(id: string) {
max-height: 200px;
overflow: auto;
}
@supports not (color: color-mix(in srgb, red, blue)) {
.chat-knowledge-card__pill {
border-color: var(--el-color-primary-light-7);
}
}
</style>

View File

@@ -104,6 +104,7 @@
padding: 0.6em 0;
}
.vxe-tools--operate:empty,
.vxe-tools--operate:not(:has(button)) {
margin-left: 0;
}

View File

@@ -164,7 +164,7 @@
</div>
{#snippet floating()}
<div class="tf-mixed-dropdown nopan nodrag nowheel">
<div class="tf-mixed-dropdown nopan nodrag nowheel {hoveredItem?.children?.length ? 'has-secondary' : ''}">
<div class="tf-mixed-list tf-mixed-primary-list">
{#each refOptions as item}
<button class="tf-mixed-item {hoveredItem?.value === item.value ? 'active' : ''}"
@@ -391,7 +391,7 @@
}
.tf-mixed-list { display: flex; flex-direction: column; padding: 8px; overflow-y: auto; }
.tf-mixed-primary-list { width: 100%; flex-shrink: 0; background: var(--tf-bg-surface-alt); }
.tf-mixed-dropdown:has(.tf-mixed-secondary-list) .tf-mixed-primary-list { width: auto; min-width: 180px; }
.tf-mixed-dropdown.has-secondary .tf-mixed-primary-list { width: auto; min-width: 180px; }
.tf-mixed-secondary-list { min-width: 220px; background: var(--tf-bg-surface); padding: 12px; border-left: 1px solid var(--tf-bg-muted); animation: slideIn 0.2s ease-out; box-sizing: border-box; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

View File

@@ -296,7 +296,7 @@
</div>
</div>
{:else}
<div class="tf-select-wrapper nopan nodrag nowheel">
<div class="tf-select-wrapper nopan nodrag nowheel {hoveredItem?.children?.length ? 'has-secondary' : ''}">
<!-- 一级列表:节点/分类 -->
<div class="tf-select-list tf-select-primary-list">
{#each items as item}
@@ -580,7 +580,7 @@
}
/* When a secondary list is open, we fix the primary list to 100% of the input's width (done via absolute positioning or just keeping it wide enough) */
.tf-select-wrapper:has(.tf-select-secondary-list) &.tf-select-primary-list {
.tf-select-wrapper.has-secondary &.tf-select-primary-list {
/* Let it take the width of the input minus borders/paddings if needed, but minWidth handles it mostly */
width: auto;
min-width: 160px;