fix: menu api example in theme dev docs (#252)

日常主题开发中,我们应该使用菜单最终生成到名字

```release-note
None
````
This commit is contained in:
Hilary Liu
2023-09-08 10:40:12 +08:00
committed by GitHub
parent a1a2a4d297
commit 2e77363d29
19 changed files with 47 additions and 47 deletions

View File

@@ -19,7 +19,7 @@ title: 模型元数据
<ul th:with="menuItems = ${menu.menuItems}">
<li th:each="menuItem : ${menuItems}">
<i th:class="${#annotations.get(menuItem, 'icon')}"></i>
<a th:href="@{${menuItem.status.href}}" th:text="${menuItem.spec.displayName}"></a>
<a th:href="@{${menuItem.status.href}}" th:text="${menuItem.status.displayName}"></a>
</li>
</ul>
</div>
@@ -38,7 +38,7 @@ title: 模型元数据
<ul th:with="menuItems = ${menu.menuItems}">
<li th:each="menuItem : ${menuItems}">
<i th:class="${#annotations.getOrDefault(menuItem, 'icon', 'fa')}"></i>
<a th:href="@{${menuItem.status.href}}" th:text="${menuItem.spec.displayName}"></a>
<a th:href="@{${menuItem.status.href}}" th:text="${menuItem.status.displayName}"></a>
</li>
</ul>
</div>
@@ -57,7 +57,7 @@ title: 模型元数据
<ul th:with="menuItems = ${menu.menuItems}">
<li th:each="menuItem : ${menuItems}">
<i th:if="${#annotations.contains(menuItem, 'icon')}" th:class="${#annotations.get(menuItem, 'icon')}"></i>
<a th:href="@{${menuItem.status.href}}" th:text="${menuItem.spec.displayName}"></a>
<a th:href="@{${menuItem.status.href}}" th:text="${menuItem.status.displayName}"></a>
</li>
</ul>
</div>

View File

@@ -32,7 +32,7 @@ menuFinder.getByName(name)
<li th:each="menuItem : ${menuItems}">
<a
th:href="@{${menuItem.status.href}}"
th:text="${menuItem.spec.displayName}"
th:text="${menuItem.status.displayName}"
th:target="${menuItem.spec.target?.value}"
>
</a>
@@ -67,7 +67,7 @@ menuFinder.getPrimary()
<li th:each="menuItem : ${menuItems}">
<a
th:href="@{${menuItem.status.href}}"
th:text="${menuItem.spec.displayName}"
th:text="${menuItem.status.displayName}"
th:target="${menuItem.spec.target?.value}"
>
</a>