Appearance
Feedback 反馈1
数据大屏反馈组件规范,包含弹窗和对话框组件,采用纯 HTML+CSS 实现。
CSS样式
全部 feedback 样式代码:
查看代码
css
/* 大屏组件全局 CSS 变量 */
:root {
/* ==================== 主题色 ==================== */
--hn-color-primary: #439FFF; /* 品牌色 */
/* ==================== 辅助色 ==================== */
--hn-color-auxiliary-blue: #00EEFF; /* 海天蓝 */
--hn-color-auxiliary-cyan: #00FFB7; /* 炫丽青 */
--hn-color-auxiliary-purple: #AA00FF; /* 神秘紫 */
/* ==================== 文字颜色 ==================== */
--hn-color-text-white: #FFFFFF; /* 闪亮白 */
--hn-color-text-gray: #A3C0E5; /* 朦胧灰 */
/* ==================== 告警颜色 ==================== */
--hn-color-success: #00FF4D; /* 成功绿 */
--hn-color-link: #247BFF; /* 超链蓝 */
--hn-color-warning: #FFC300; /* 警告黄 */
--hn-color-danger: #FF1F47; /* 危险红 */
/* ==================== 渐变色 ==================== */
/* 品牌色渐变01 */
--hn-gradient-brand-start: #A1CFFF;
--hn-gradient-brand-end: #439FFF;
--hn-gradient-brand: linear-gradient(90deg, #A1CFFF 0%, #439FFF 100%);
/* 蓝色渐变02 */
--hn-gradient-blue-start: #7FB2FF;
--hn-gradient-blue-end: #0066FF;
--hn-gradient-blue: linear-gradient(90deg, #7FB2FF 0%, #0066FF 100%);
/* 红色渐变03 */
--hn-gradient-red-start: #E98197;
--hn-gradient-red-end: #E98197;
--hn-gradient-red: linear-gradient(90deg, #E98197 0%, #E98197 100%);
/* 蓝青色渐变04 */
--hn-gradient-cyan-start: #00D4FF;
--hn-gradient-cyan-end: #00FFB7;
--hn-gradient-cyan: linear-gradient(90deg, #00D4FF 0%, #00FFB7 100%);
/* 警告渐变05 */
--hn-gradient-warning-start: #FFE799;
--hn-gradient-warning-end: #FFC300;
--hn-gradient-warning: linear-gradient(90deg, #FFE799 0%, #FFC300 100%);
/* 绿色渐变06 */
--hn-gradient-green-start: #8CF7B7;
--hn-gradient-green-end: #00FF4D;
--hn-gradient-green: linear-gradient(90deg, #8CF7B7 0%, #00FF4D 100%);
/* 白色渐变07 */
--hn-gradient-white-start: #FFFFFF;
--hn-gradient-white-end: #A3C0E5;
--hn-gradient-white: linear-gradient(90deg, #FFFFFF 0%, #A3C0E5 100%);
/* 紫色渐变08 */
--hn-gradient-purple-start: #D47FFF;
--hn-gradient-purple-end: #AA00FF;
--hn-gradient-purple: linear-gradient(90deg, #D47FFF 0%, #AA00FF 100%);
/* ==================== 背景色 ==================== */
--hn-bg-center: #072652; /* 径向渐变中心 */
--hn-bg-edge: #00102A; /* 径向渐变边缘 */
--hn-bg-radial: radial-gradient(60% 60% at 50% 50%, #072652 0%, #00102A 100%), #D8D8D8;
--hn-bg-radial-center: linear-gradient(0deg, #072652, #072652), #D8D8D8;;
--hn-bg-radial-edge: linear-gradient(0deg, #00102A, #00102A), #D8D8D8;
/* ==================== 品牌梯度色 ==================== */
--hn-brand-level-1: #72B7FF;
--hn-brand-level-2: #439FFF;
--hn-brand-level-3: #1377FF;
--hn-brand-level-4: #133EF1;
--hn-brand-level-5: #000BDA;
/* ==================== 白色梯度色(文字) ==================== */
--hn-text-level-1: #FFFFFF;
--hn-text-level-2: #D8E4F4;
--hn-text-level-3: #A3C0E5;
--hn-text-level-4: #759DCF;
--hn-text-level-5: #426FA9;
/* ==================== 字体家族 ==================== */
--hn-font-family-title: 'DouYuZhuiGuangTi', sans-serif; /* 斗鱼追光体 - 头部标题 */
--hn-font-family-cn: 'Source Han Sans CN', 'Noto Sans SC', sans-serif; /* 思源黑体 - 中文 */
--hn-font-family-num: 'D-DIN', 'DIN Alternate', sans-serif; /* D-DIN - 数值/英文 */
/* ==================== 字号 ==================== */
--hn-font-size-h1: 28px; /* 头部标题栏 */
--hn-font-size-h2: 16px; /* 标题 */
--hn-font-size-h3: 14px; /* 小标题、按钮文字 */
--hn-font-size-body: 14px; /* 正文 */
--hn-font-size-caption: 12px; /* 辅助文字 */
--hn-font-size-num-lg: 32px; /* 大数值 */
--hn-font-size-num-md: 16px; /* 中数值 */
--hn-font-size-num-sm: 14px; /* 小数值 */
--hn-font-size-num-xs: 12px; /* 超小数值 */
/* ==================== 字重 ==================== */
--hn-font-weight-regular: 400;
--hn-font-weight-medium: 500;
--hn-font-weight-bold: 700;
}css
/* 容器 */
.hn-dialog-overlay {
display: flex;
align-items: center;
justify-content: center;
padding: 20px 0;
}
/* 对话框容器 */
.hn-dialog {
position: relative;
width: 420px;
background:
linear-gradient(#0a2852, #0a2852) padding-box,
linear-gradient(
180deg,
#1a4dde 0%,
var(--hn-color-auxiliary-blue) 28%,
#e8fdfe 46%,
var(--hn-color-primary) 78%,
var(--hn-color-auxiliary-blue) 100%
)
border-box;
box-sizing: border-box;
border: 2px solid transparent;
border-radius: 8px;
box-shadow: inset 0px 0px 68px 0px #073f8d;
padding: 0;
overflow: hidden;
}
/* 对话框头部 */
.hn-dialog-header {
padding: 22px 24px 0 24px;
display: flex;
align-items: center;
justify-content: space-between;
}
.hn-dialog-overlay .hn-dialog-title {
display: flex;
align-items: center;
gap: 8px;
color: #fff;
font-size: 16px;
font-weight: 500;
margin: 0;
margin-top: 0;
}
.hn-dialog-base .hn-dialog-title {
color: #80eeff;
}
/* 标题图标 */
.hn-dialog-icon {
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.hn-dialog-icon--warning {
color: var(--hn-color-warning);
}
.hn-dialog-icon--warning::before {
content: '⚠';
font-size: 20px;
font-weight: bold;
}
/* 关闭按钮 */
.hn-dialog-close {
width: 20px;
height: 20px;
background: none;
border: none;
color: var(--hn-text-level-4);
cursor: pointer;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
transition: color 0.3s;
font-size: 24px;
line-height: 1;
}
.hn-dialog-close:hover {
color: var(--hn-color-text-white);
}
/* 对话框内容 */
.hn-dialog-body {
padding: 20px;
color: var(--hn-text-level-2);
font-size: 14px;
line-height: 22px;
}
/* 对话框底部 */
.hn-dialog-footer {
padding: 16px 20px;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 12px;
}
/* 底部按钮 */
.hn-dialog-button {
min-width: 80px;
height: 28px;
padding: 0 16px;
border-radius: 2px;
font-size: 14px;
cursor: pointer;
transition: all 0.3s;
border: 1px solid transparent;
line-height: 1;
border-radius: 2px;
}
.hn-dialog-button--default {
background: rgba(255, 255, 255, 0.1);
border: 1px solid #34547f;
color: #b5cae6;
}
.hn-dialog-button--default:hover {
border-color: var(--hn-color-primary);
color: var(--hn-color-primary);
}
.hn-dialog-button--primary {
background:
linear-gradient(180deg, #0f1f51 0%, #004891 100%) padding-box,
linear-gradient(142deg, #62ceff 34%, #a8d5ff 77%) border-box;
border: 1px solid transparent;
color: var(--hn-color-text-white);
box-shadow: inset 0px -4px 6px 0px #2eafff;
}
.hn-dialog-button--primary:hover {
background: var(--hn-brand-level-1);
border-color: var(--hn-brand-level-1);
box-shadow: 0 0 12px rgba(67, 159, 255, 0.7);
}弹窗
基础弹窗组件,用于信息展示和确认操作。具有标题、内容区域、关闭按钮和底部操作按钮。
弹窗
查看代码
vue
<div class="demo-container">
<div class="hn-dialog-overlay">
<div class="hn-dialog hn-dialog-base">
<div class="hn-dialog-header">
<h3 class="hn-dialog-title">我是标题</h3>
<button class="hn-dialog-close" @click="handleClose">×</button>
</div>
<div class="hn-dialog-body">
我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容
</div>
<div class="hn-dialog-footer">
<button
class="hn-dialog-button hn-dialog-button--default"
@click="handleClose"
>
关闭
</button>
<button
class="hn-dialog-button hn-dialog-button--primary"
@click="handleSave"
>
保存
</button>
</div>
</div>
</div>
</div>对话框
带有警告图标的确认对话框,用于重要操作确认。在标题前显示警告图标。
对话框
查看代码
vue
<div class="demo-container">
<div class="hn-dialog-overlay">
<div class="hn-dialog">
<div class="hn-dialog-header">
<h3 class="hn-dialog-title">
<span class="hn-dialog-icon hn-dialog-icon--warning"></span>
确认删除这条信息吗?
</h3>
<button class="hn-dialog-close" @click="handleClose">×</button>
</div>
<div class="hn-dialog-body">
我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容
</div>
<div class="hn-dialog-footer">
<button class="hn-dialog-button hn-dialog-button--default" @click="handleClose">
关闭
</button>
<button class="hn-dialog-button hn-dialog-button--primary" @click="handleConfirm">
保存
</button>
</div>
</div>
</div>
</div>