From 2396f65769a0d73c307e25526ca98612f196d69e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Tue, 29 Jul 2025 14:10:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(risk-history):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=85=A8=E5=B1=80=20Toast=20=E6=8F=90=E7=A4=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 Toast 组件样式和脚本,实现全局提示消息功能- 在评论保存按钮点击后显示 Toast 提示 - 优化评论保存按钮文案,从"保存"改为"发布" --- public/bpic_eli/risk_history.html | 126 +++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) diff --git a/public/bpic_eli/risk_history.html b/public/bpic_eli/risk_history.html index 5c28fbc..e03bbc8 100644 --- a/public/bpic_eli/risk_history.html +++ b/public/bpic_eli/risk_history.html @@ -516,6 +516,46 @@ *background: #000; *filter: alpha(opacity=50); } + + + /* 全局 Toast 样式 - 兼容 IE8 */ + .toast { + position: fixed; + /* IE8 不完全支持 fixed,但可以尝试 */ + *position: absolute; /* IE8 降级 */ + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + /* IE8 兼容居中 */ + *top: 200px; + *left: 50%; + *margin-left: -150px; /* 假设宽度为 300px */ + width: 300px; + padding: 15px 20px; + background-color: #333; + color: #fff; + text-align: center; + border-radius: 4px; + z-index: 2000; /* 确保在最上层 */ + opacity: 0; + transition: opacity 0.3s ease-in-out; + /* IE8 不支持 transition 和 opacity 动画 */ + *filter: alpha(opacity=0); /* IE8 透明度 */ + *zoom: 1; /* IE8 触发 hasLayout */ + } + + .toast.show { + opacity: 1; + /* IE8 不支持 opacity 动画 */ + *filter: alpha(opacity=100); /* IE8 透明度 */ + } + + #toastMessage { + display: block; + font-size: 14px; + } + + @@ -577,11 +617,14 @@
- +
- + +