修复:确认发放按钮背景色始终通过 :style 注入

将 background 从 static style 移入 :style 绑定,
两种状态(启用/禁用)均显式包含 background,
彻底避免 Alpine :style 动态绑定覆盖静态 style background 的问题。

按钮颜色:橙红渐变 #ea580c→#dc2626
- 启用:opacity:1 + box-shadow 投影
- 禁用:opacity:0.4 + no-shadow(未输入金额时)
This commit is contained in:
2026-03-01 12:00:03 +08:00
parent 96c472bfb9
commit 4207528043
@@ -1009,13 +1009,14 @@
:max="quota.max_once || 999999" min="1" x-on:keydown.enter="send()"
style="flex:1; height:44px; padding:0 14px; border:2px solid #fcd34d;
border-radius:10px; font-size:15px; color:#92400e; outline:none; box-sizing:border-box;">
<button x-on:click="send()" :disabled="sending || !amount"
style="height:44px; padding:0 24px; border:none; border-radius:10px; font-size:14px;
font-weight:bold; cursor:pointer; white-space:nowrap;
background:linear-gradient(135deg,#ea580c,#dc2626);
color:#fff; box-shadow:0 4px 14px rgba(220,38,38,.45);
transition:opacity .15s;"
:style="(sending || !amount) ? 'opacity:.45; cursor:not-allowed;' : 'opacity:1;'">
<button x-on:click="send()"
style="height:44px; padding:0 24px; border:none; border-radius:10px;
font-size:14px; font-weight:bold; white-space:nowrap;
color:#fff; transition:opacity .15s;"
:style="(sending || !amount) ?
'background:linear-gradient(135deg,#ea580c,#dc2626); box-shadow:none; opacity:.4; cursor:not-allowed;' :
'background:linear-gradient(135deg,#ea580c,#dc2626); box-shadow:0 4px 14px rgba(220,38,38,.5); opacity:1; cursor:pointer;'"
:disabled="sending || !amount">
<span x-text="sending ? '发放中…' : '🎉 确认发放'"></span>
</button>
</div>