feat(admin): make all sortable/repeater cards collapsible, collapsed by default

- Add useCollapsibleItems: key-based open state, clickable/keyboard head, aria-expanded
- sortable items with sub-fields and every inline repeater/group row now collapse
- Repeater head summary falls back to the first filled field when no listPreview
- Drop per-schema collapsible/defaultCollapsed for repeater groups (JS + PHP)
- Align FloatBtnItemPanel head with the shared collapse attrs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-28 14:12:13 +08:00
1 parent 8843ae4261
commit 116b6b2223
9 files changed
+114 -76

No files matched your search

+2 -6
View File
@@ -292,8 +292,6 @@ class SchemaPayment {
],
'dependsOn' => ['key' => 'pay_vip_points_exchange_s', 'value' => true],
'help' => '每一行为一个可兑换的会员套餐',
'collapsible' => true,
'defaultCollapsed' => true,
'listPreview' => ['prefix' => '积分:', 'titleKey' => 'points', 'descKey' => 'time', 'descUnitKey' => 'unit'],
'fields' => [
['key' => 'points', 'label' => '使用积分', 'type' => 'number', 'default' => 100, 'min' => 0, 'unit' => '积分'],
@@ -576,15 +574,13 @@ class SchemaPayment {
}
/**
* 会员商品/续费商品的手风琴配置:默认收起,标题行显示价格与时长摘要。
* 会员商品/续费商品:标题行显示价格与时长摘要(行默认收起由 SPA 统一处理)。
*
* @return array<string,mixed>
*/
private static function vip_product_group_options(): array {
return [
'collapsible' => true,
'defaultCollapsed' => true,
'listPreview' => ['prefix' => '价格:', 'titleKey' => 'price', 'descKey' => 'time', 'descUnitKey' => 'unit'],
'listPreview' => ['prefix' => '价格:', 'titleKey' => 'price', 'descKey' => 'time', 'descUnitKey' => 'unit'],
];
}