From 05f16d5fd70b28b6f97a66ac36d30dc36ddfb577 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 18 Oct 2026 17:51:28 +0800 Subject: [PATCH] feat(vip): collapse the structured membership groups into accordions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The structured groups introduced in the previous commit rendered every row fully expanded, which buried the fields an admin actually came to edit. They now behave like accordions and start collapsed. - 会员商品, 一级/二级会员续费 and 积分兑换明细 opt in via `collapsible` on the group schema. Each row shows only its header, carrying a summary line built from `listPreview` (价格:99.00 · 3 个月 / 积分:500 · 30 天), and expands on click. `defaultCollapsed` keeps the collapsed default; setting it to false restores the previous always-open behaviour. - 升级价格 splits into its three reference-theme blocks (月费升月费 / 月费升永久 / 永久升永久) through a new `sections` option on the accordion type, each block independently collapsible. - AksField keeps the existing open state keyed by index so adding or removing a row does not disturb the others, and the drag handle, delete button and chevron are excluded from the header toggle. - Non-collapsible groups are untouched: the accordion markup only renders when the schema opts in. Verified: php -l on the changed PHP, 656 Node contract tests passing (including new assertions that every collapsible group is opted in, that the upgrade sections cover exactly the declared fields, and that the SPA mirror matches), and the admin SPA builds. --- assets/admin/src/components/form/AksField.vue | 258 ++++++++++++++++-- .../admin/src/schema/sections/payment/vip.js | 23 ++ src/Admin/Schema/SchemaPayment.php | 24 ++ .../vip-settings-structured-contract.test.cjs | 81 ++++++ .../vip-settings-structured-harness.php | 46 ++++ 5 files changed, 411 insertions(+), 21 deletions(-) diff --git a/assets/admin/src/components/form/AksField.vue b/assets/admin/src/components/form/AksField.vue index 23a4c071..962ac9fc 100644 --- a/assets/admin/src/components/form/AksField.vue +++ b/assets/admin/src/components/form/AksField.vue @@ -476,14 +476,43 @@
- + +