mirror of
https://github.com/halo-dev/theme-earth.git
synced 2025-11-30 01:02:18 +08:00
refactor: use repeater to setup footer menus
This commit is contained in:
@@ -226,12 +226,18 @@ spec:
|
||||
key: menu
|
||||
label: 右侧菜单
|
||||
|
||||
- $formkit: menuCheckbox
|
||||
- $formkit: repeater
|
||||
if: "$get(style).value === style_2"
|
||||
name: menus
|
||||
id: menus
|
||||
key: menus
|
||||
label: 菜单组
|
||||
value: []
|
||||
children:
|
||||
- $formkit: menuRadio
|
||||
name: name
|
||||
label: 菜单
|
||||
validation: "required"
|
||||
|
||||
- $formkit: repeater
|
||||
name: social_media
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
class="grid grid-cols-2 gap-8 sm:grid-cols-4 sm:gap-12"
|
||||
>
|
||||
<th:block th:each="menuName : ${theme.config.footer.menus}">
|
||||
<div th:with="menu = ${menuFinder.getByName(menuName)}">
|
||||
<div th:with="menu = ${menuFinder.getByName(menuName.name)}">
|
||||
<h2
|
||||
class="mb-6 text-sm font-semibold text-gray-900 dark:text-slate-50"
|
||||
th:text="${menu.spec.displayName}"
|
||||
|
||||
Reference in New Issue
Block a user