feat(web): unify semantic empty states

This commit is contained in:
lingniu
2026-07-20 03:49:28 +08:00
parent df03aaac6a
commit 5ba636419b
13 changed files with 345 additions and 46 deletions

View File

@@ -27344,3 +27344,184 @@
line-height: 14px;
}
}
/*
* Semi UI semantic panel states.
* Empty evidence surfaces share one visual and interaction contract instead
* of inheriting page-specific illustrations, spacing and typography.
*/
.v2-state-surface.is-empty {
--v2-state-accent: #70839a;
--v2-state-soft: #f4f7fa;
--v2-state-border: #dfe6ee;
position: relative;
display: flex;
width: 100%;
min-width: 0;
min-height: 190px;
align-items: center;
justify-content: center;
overflow: hidden;
border: 1px solid var(--v2-state-border);
border-radius: 10px;
background: linear-gradient(180deg, var(--v2-state-soft) 0, #fff 58%);
padding: 18px;
}
.v2-state-surface.is-empty::before {
position: absolute;
z-index: 0;
top: 0;
right: 0;
left: 0;
height: 2px;
background: var(--v2-state-accent);
content: "";
opacity: .88;
}
.v2-state-surface.is-empty.tone-primary {
--v2-state-accent: #1769dc;
--v2-state-soft: #f2f7ff;
--v2-state-border: #d7e5f8;
}
.v2-state-surface.is-empty.tone-success {
--v2-state-accent: #1b9b6a;
--v2-state-soft: #f2faf7;
--v2-state-border: #d7ece4;
}
.v2-state-surface.is-empty.tone-warning {
--v2-state-accent: #d88622;
--v2-state-soft: #fff8ef;
--v2-state-border: #f0e0ca;
}
.v2-state-surface.is-empty.tone-danger {
--v2-state-accent: #d54c4c;
--v2-state-soft: #fff5f5;
--v2-state-border: #f0d7d7;
}
.v2-state-surface.is-empty > .v2-state-empty.semi-empty {
position: relative;
z-index: 1;
min-height: 0;
padding: 4px;
}
.v2-state-surface.is-empty > .v2-state-empty .semi-empty-image {
display: grid !important;
width: auto;
height: auto;
place-items: center;
margin: 0 0 12px;
opacity: 1;
}
.v2-state-empty-icon {
display: grid;
width: 48px;
height: 48px;
place-items: center;
border: 1px solid var(--v2-state-border);
border-radius: 14px;
background: #fff;
color: var(--v2-state-accent);
box-shadow: 0 8px 18px rgba(38, 58, 82, .08);
}
.v2-state-empty-icon .semi-icon {
font-size: 21px;
}
.v2-state-surface.is-empty > .v2-state-empty .semi-empty-title {
margin-top: 0;
color: #2f435a;
font-size: 14px;
font-weight: 760;
letter-spacing: -.01em;
}
.v2-state-surface.is-empty > .v2-state-empty .semi-empty-description {
max-width: 460px;
margin-top: 6px;
color: #77869a;
font-size: 11px;
line-height: 1.6;
}
.v2-state-surface.is-empty > .v2-state-empty .semi-empty-content {
margin-top: 15px;
}
.v2-state-surface.is-empty > .v2-state-empty .semi-empty-content > .semi-button {
min-height: 34px;
border-radius: 8px;
padding-inline: 15px;
font-weight: 700;
}
.v2-state-surface.is-empty.is-panel.is-compact {
position: relative;
top: auto;
min-height: 112px;
border-bottom: 1px solid var(--v2-state-border);
background: linear-gradient(180deg, var(--v2-state-soft) 0, #fff 72%);
padding: 10px 12px;
backdrop-filter: none;
}
.v2-state-surface.is-empty.is-compact > .v2-state-empty .semi-empty-image {
margin-bottom: 7px;
}
.v2-state-surface.is-empty.is-compact .v2-state-empty-icon {
width: 36px;
height: 36px;
border-radius: 10px;
box-shadow: 0 5px 12px rgba(38, 58, 82, .06);
}
.v2-state-surface.is-empty.is-compact .v2-state-empty-icon .semi-icon {
font-size: 17px;
}
.v2-state-surface.is-empty.is-compact > .v2-state-empty .semi-empty-title {
font-size: 12px;
}
.v2-state-surface.is-empty.is-compact > .v2-state-empty .semi-empty-description {
margin-top: 3px;
font-size: 9px;
line-height: 1.5;
}
.v2-vehicle-recent-card > .semi-card-body > .v2-state-surface.v2-vehicle-recent-empty {
min-height: 0;
flex: 1 1 auto;
border: 0;
border-radius: 0;
}
@media (max-width: 680px) {
.v2-state-surface.is-empty {
min-height: 170px;
padding: 15px 12px;
}
.v2-state-surface.is-empty > .v2-state-empty .semi-empty-title {
font-size: 13px;
}
.v2-state-surface.is-empty > .v2-state-empty .semi-empty-description {
max-width: 300px;
font-size: 10px;
}
.v2-state-surface.is-empty.is-panel.is-compact {
min-height: 104px;
padding: 9px 10px;
}
}