From d5e607f3565e61eed7a9c0a09fdf6f3a7d21c7f3 Mon Sep 17 00:00:00 2001 From: chenxi Date: Sun, 25 Oct 2026 23:39:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=BE=85=E6=A0=B8=E9=AA=8C?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E4=B8=8E=E5=88=B7=E6=96=B0=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=20(#572)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一待核验导出与刷新按钮样式 (#572) --- .../financial-operations/product-costs.blade.php | 13 ++++++++++++- .../Feature/Business/ProductCostPageLayoutTest.php | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/resources/views/business/pages/financial-operations/product-costs.blade.php b/resources/views/business/pages/financial-operations/product-costs.blade.php index 8c40081e..31a6db9a 100644 --- a/resources/views/business/pages/financial-operations/product-costs.blade.php +++ b/resources/views/business/pages/financial-operations/product-costs.blade.php @@ -711,6 +711,13 @@ color: var(--vip-content-accent-dark, #856632); } + .product-cost-pending-dialog__actions button:focus-visible, + .product-cost-pending-dialog__actions a:focus-visible, + .product-cost-pending-dialog__pagination button:focus-visible { + outline: 2px solid var(--vip-content-accent-dark, #856632); + outline-offset: 2px; + } + .product-cost-pending-dialog__pagination button:disabled { cursor: not-allowed; opacity: .45; @@ -1477,6 +1484,7 @@ id="product-cost-pending-dialog" aria-labelledby="product-cost-pending-dialog-title" data-product-cost-pending-dialog + tabindex="-1" >
@@ -2085,7 +2093,10 @@ syncExport(baseFilters); trigger.addEventListener('click', function () { - if (!dialog.open) { dialog.showModal(); } + if (!dialog.open) { + dialog.showModal(); + dialog.focus(); + } load(1, currentFilters()); }); rowsBody.addEventListener('click', async function (event) { diff --git a/tests/Feature/Business/ProductCostPageLayoutTest.php b/tests/Feature/Business/ProductCostPageLayoutTest.php index 00c63215..feecf326 100644 --- a/tests/Feature/Business/ProductCostPageLayoutTest.php +++ b/tests/Feature/Business/ProductCostPageLayoutTest.php @@ -73,6 +73,12 @@ class ProductCostPageLayoutTest extends TestCase $this->assertStringContainsString('待核验成本明细', $html); $this->assertStringContainsString('data-product-cost-pending-filters', $html); $this->assertStringContainsString('data-product-cost-pending-export', $html); + $this->assertMatchesRegularExpression( + '/assertStringContainsString('.product-cost-pending-dialog__actions a:focus-visible', $html); + $this->assertStringContainsString("dialog.showModal();\n dialog.focus();", $html); $this->assertStringContainsString('待核验类型', $html); $this->assertStringContainsString('点击任一明细值可复制', $html); $this->assertStringContainsString('data-product-cost-pending-copy-status', $html);