Spaces:
Sleeping
Sleeping
Update app.py
Browse files865 unmodified lines866867868869870871872134 unmodified lines100710081009101010111012101352 unmodified lines10661067106810691070107110721073107410751076865 unmodified lines/* 獨立控制數量群組 */.qty-group { display: flex !important; flex-wrap: nowrap !important; flex-direction: row !important; align-items: center !important; justify-content: center !important; gap: 4px !important; width: 100% !important; background: transparent !important; }.qty-group > * { margin: 0 !important; }.action-btn {font-size: 18px !important;134 unmodified linesgr.HTML("<div style='text-align: center; font-weight: bold; color: #64748b; font-size: 0.9em;'>圖示</div>")with gr.Column(scale=1, min_width=150):gr.HTML("<div style='display: flex; width: 100%; text-align: center; font-weight: bold; color: #64748b; font-size: 0.9em;'><div style='flex: 1;'>商品名稱</div><div style='flex: 1;'>規格</div><div style='flex: 1;'>單價</div></div>")with gr.Column(scale=0, min_width=120):gr.HTML("<div style='text-align: center; font-weight: bold; color: #64748b; font-size: 0.9em; width: 100%;'>數量</div>")# --------------------------------------------------52 unmodified linesgr.Markdown(info_html)# ====== 數量操作區:打包成獨立群組,強制綁定成橫列 ======with gr.Column(scale=0, min_width=120):with gr.Row(elem_classes="qty-group"):minus_btn = gr.Button("➖", elem_classes="action-btn", variant="secondary")qty_box = gr.Textbox(value="0", show_label=False, interactive=True, elem_classes="qty-input", container=False)plus_btn = gr.Button("➕", elem_classes="action-btn", variant="secondary")minus_btn.click(fn=None, inputs=[qty_box], outputs=[qty_box],865 unmodified lines866867868869870871872134 unmodified lines100710081009101010111012101352 unmodified lines10661067106810691070107110721073107410751076865 unmodified lines/* 獨立控制數量群組 */.qty-group { display: flex !important; flex-wrap: nowrap !important; flex-direction: row !important; align-items: center !important; justify-content: center !important; gap: 4px !important; width: 100% !important; background: transparent !important; }.qty-group > * { min-width: 0 !important; flex: 0 0 auto !important; margin: 0 !important; }.action-btn {font-size: 18px !important;134 unmodified linesgr.HTML("<div style='text-align: center; font-weight: bold; color: #64748b; font-size: 0.9em;'>圖示</div>")with gr.Column(scale=1, min_width=150):gr.HTML("<div style='display: flex; width: 100%; text-align: center; font-weight: bold; color: #64748b; font-size: 0.9em;'><div style='flex: 1;'>商品名稱</div><div style='flex: 1;'>規格</div><div style='flex: 1;'>單價</div></div>")with gr.Column(scale=0, min_width=140):gr.HTML("<div style='text-align: center; font-weight: bold; color: #64748b; font-size: 0.9em; width: 100%;'>數量</div>")# --------------------------------------------------52 unmodified linesgr.Markdown(info_html)# ====== 數量操作區:打包成獨立群組,強制綁定成橫列 ======with gr.Column(scale=0, min_width=140):with gr.Row(elem_classes="qty-group"):minus_btn = gr.Button("➖", elem_classes="action-btn", variant="secondary", min_width=36)qty_box = gr.Textbox(value="0", show_label=False, interactive=True, elem_classes="qty-input", container=False, min_width=45)plus_btn = gr.Button("➕", elem_classes="action-btn", variant="secondary", min_width=36)minus_btn.click(fn=None, inputs=[qty_box], outputs=[qty_box],
app.py+6-6