mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 08:29:40 +08:00
修复select组件不允许默认选择空值项的问题
This commit is contained in:
parent
00e0ae896b
commit
a7f01cdcff
@ -22,22 +22,22 @@ spec:
|
||||
- $formkit: select
|
||||
name: thumbnail_mode
|
||||
label: 文章列表缩略图模式
|
||||
value: ""
|
||||
value: "none"
|
||||
help: '文章在列表的缩略图模式,除网格布局外,当前配置将覆盖主题中的默认配置。'
|
||||
options:
|
||||
- value: default
|
||||
- value: "default"
|
||||
label: 默认模式
|
||||
- value: back
|
||||
- value: "back"
|
||||
label: 背景图模式
|
||||
- value: small
|
||||
- value: "small"
|
||||
label: 小图模式(左侧)
|
||||
- value: small-right
|
||||
- value: "small-right"
|
||||
label: 小图模式(右侧)
|
||||
- value: small-alter
|
||||
- value: "small-alter"
|
||||
label: 小图模式(交替)
|
||||
- value: fold
|
||||
- value: "fold"
|
||||
label: 折叠模式
|
||||
- value: ""
|
||||
- value: "none"
|
||||
label: 跟随默认配置
|
||||
- $formkit: text
|
||||
name: tips
|
||||
|
@ -2,7 +2,7 @@
|
||||
th:fragment="articleList (posts)">
|
||||
<th:block th:each="post : ${posts}"
|
||||
th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + (#strings.contains(theme.config.post.default_thumbnail, '?') ? '&' : '?') + 'id=' + post.metadata.name : thumbnail.gen(post.spec.cover, 's')},
|
||||
thumbnail_mode = ${(theme.config.post.top_thumbnail_mode == 'grid' || (!post.spec.pinned && theme.config.post.thumbnail_mode == 'grid'))? 'grid' : !#strings.isEmpty(post.metadata.annotations.get('thumbnail_mode'))? post.metadata.annotations.get('thumbnail_mode') : post.spec.pinned ? theme.config.post.top_thumbnail_mode : theme.config.post.thumbnail_mode}">
|
||||
thumbnail_mode = ${(theme.config.post.top_thumbnail_mode == 'grid' || (!post.spec.pinned && theme.config.post.thumbnail_mode == 'grid'))? 'grid' : (!#strings.isEmpty(post.metadata.annotations.get('thumbnail_mode')) && post.metadata.annotations.get('thumbnail_mode') != 'none')? post.metadata.annotations.get('thumbnail_mode') : post.spec.pinned ? theme.config.post.top_thumbnail_mode : theme.config.post.thumbnail_mode}">
|
||||
<div th:if="${!#strings.isEmpty(thumbnail) && thumbnail_mode == 'back'}" class="card widget card-cover">
|
||||
<a th:href="${post.status.permalink}">
|
||||
<div class="cover-image" th:style="'background-image: url(' + ${thumbnail} + ')'"></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user