Sfoglia il codice sorgente

fix(web): 统一合同服务构成按钮样式

sy 1 ora fa
parent
commit
d422769fcc

+ 12 - 3
web-scaffold/src/pages/ContractDetailPages.tsx

@@ -30,6 +30,7 @@ import { isImeComposing } from "../lib/ime";
 import { PackagePlanEditor, type EditorState } from "../components/PackagePlanEditor";
 import "../styles/operations.css";
 import "../styles/customer-onboarding.css";
+import "../styles/organization.css";
 import "../styles/contract-editor.css";
 
 /**
@@ -1684,7 +1685,9 @@ export function ContractEditorPage() {
                 return <article key={item.key} id={`contract-item-${index}`} className={child ? "ops-contract-item is-child" : "ops-contract-item"} data-item-mode={item.itemMode} data-has-qty={stackable ? "1" : "0"}>
                   <header className="ops-contract-item-head">
                     <span className="ops-contract-index">{roleMark}</span>
-                    <Button variant="ghost" size="sm" className="ops-contract-item-remove" aria-label={`删除${roleMark}`} title={child ? "删除该叠加服务(父行保留)" : "删除该条目(其下叠加服务一并删除)"} onClick={() => removeItem(index)}><Trash2 size={15} /></Button>
+                    <button type="button" className="org-button org-button-compact org-button-danger-soft" aria-label={`删除${roleMark}`} title={child ? "删除该叠加服务(父行保留)" : "删除该条目(其下叠加服务一并删除)"} onClick={() => removeItem(index)}>
+                      <Trash2 size={15} aria-hidden="true" />删除
+                    </button>
                   </header>
                   <div className={`ops-contract-item-grid${stackable ? " has-qty" : ""}`}>
                     <div className="ops-contract-plan-cell">
@@ -1760,7 +1763,9 @@ export function ContractEditorPage() {
                   {/* D-7:叠加服务只能从跨境节点下新增;页面上⛔ 平级的「新增叠加服务」按钮。 */}
                   {node.item.itemMode === "new" && node.item.planFamily === "link" && (
                     <div className="ops-contract-child-add">
-                      <Button type="button" variant="ghost" size="sm" onClick={() => addChildItem(node.item.key)}><Plus size={14} />添加叠加服务(挂在该链路下)</Button>
+                      <button type="button" className="org-button org-button-compact org-button-info" title="添加叠加服务(挂在该链路下)" onClick={() => addChildItem(node.item.key)}>
+                        <Plus size={14} aria-hidden="true" />添加叠加服务
+                      </button>
                     </div>
                   )}
                 </div>)}
@@ -1770,7 +1775,11 @@ export function ContractEditorPage() {
           {itemNotice && <p className="contract-form-summary" role="status">{itemNotice}</p>}
           <div className="ops-contract-item-actions">
             <p className="contract-form-summary"><span><strong>{draft.items.length}</strong> 个构成条目</span><span>{draft.increment ? "增量合同:叠加服务" : "跨境链路"} {draft.items.filter((item) => (draft.increment ? item.itemMode === "increment" : item.planFamily === "link")).length} · 叠加服务 {draft.items.filter((item) => item.parentKey || item.itemMode === "increment").length}</span></p>
-            {!draft.increment && <Button variant="outline" size="sm" onClick={addRootItem}><Plus size={15} />添加</Button>}
+            {!draft.increment && (
+              <button type="button" className="org-button org-button-compact org-button-scope" onClick={addRootItem}>
+                <Plus size={15} aria-hidden="true" />添加
+              </button>
+            )}
             {/* 增量合同的顶层入口是上方的「引用既有链路订阅」下拉,⛔ 再给平级的「添加」按钮。 */}
           </div>
         </section>

+ 1 - 0
web-scaffold/src/styles/organization.css

@@ -541,6 +541,7 @@
 .org-account-setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 13px; padding: 11px 0; }
 .org-account-setting-row + .org-account-setting-row { border-top: 1px solid var(--border-subtle); }
 .org-account-setting-row strong { color: var(--foreground); font-size: var(--type-body); font-weight: 600; }
+.org-button-compact,
 .org-account-settings .org-button,
 .org-account-inline-actions .org-button {
   min-height: 34px;