fix: example code in menu finder api (#260)

Fixes https://github.com/halo-dev/docs/issues/259

```release-note
修正文档中关于获取菜单显示名称的代码示例,详情请参见:https://github.com/halo-dev/docs/issues/259
```
wan92hen-patch-1
AllinProgram 1 year ago committed by GitHub
parent 58b41335e1
commit 8df9f0ceeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save