refactor: use repeater to setup footer menus

This commit is contained in:
Ryan Wang
2022-11-24 20:42:52 +08:00
parent dfb95dc40f
commit 2bd86cbd6a
2 changed files with 8 additions and 2 deletions

View File

@@ -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

View File

@@ -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}"