新版搜索界面支持最大搜索结果数量设置,未输入内容和输入*号开头提示文本优化

This commit is contained in:
mjsoftware 2024-07-19 11:51:04 +08:00
parent b2dc9e99dd
commit 6575aeac16
3 changed files with 11 additions and 2 deletions

View File

@ -1156,6 +1156,14 @@ spec:
value: '没有搜索结果' value: '没有搜索结果'
height: 240px height: 240px
help: '搜索页面-无搜索结果提示语,支持 HTML 格式。' help: '搜索页面-无搜索结果提示语,支持 HTML 格式。'
- $formkit: number
if: $get(search_enable).value
name: search_limit
validation: required
label: "搜索页面-搜索结果最大显示数量"
value: 10
height: 240px
help: '搜索页面-搜索结果最大显示数量。'
- group: enhance - group: enhance
label: '增强功能' label: '增强功能'
formSchema: formSchema:

View File

@ -19,7 +19,7 @@
// 阻止表单提交 // 阻止表单提交
event.preventDefault() event.preventDefault()
// 显示错误信息 // 显示错误信息
Qmsg.warning(!query ? '请输入搜索内容' : '搜索内容不能以 * 开头') Qmsg.warning(!query ? '请输入内容' : '不能输入星号(*)作为内容开头')
return return
} }
if(DreamConfig.pjax_state) { if(DreamConfig.pjax_state) {
@ -31,6 +31,7 @@
}) })
</script> </script>
<form id="halo-search-form" class="search-form-inner" method="get" action="/search" role="search"> <form id="halo-search-form" class="search-form-inner" method="get" action="/search" role="search">
<input type="hidden" name="limit" th:value="${theme.config.page_config.search.search_limit}">
<input <input
id="halo-search-form-text-input" id="halo-search-form-text-input"
class="text-input" class="text-input"

View File

@ -30,7 +30,7 @@ spec:
settingName: theme-dream2-plus-setting settingName: theme-dream2-plus-setting
configMapName: theme-dream2-plus-configMap configMapName: theme-dream2-plus-configMap
# 版本号 # 版本号
version: 1.2.6.beta6 version: 1.2.6.beta8
# 最低支持的 Halo 版本 # 最低支持的 Halo 版本
require: ">=2.15.0" require: ">=2.15.0"
# 许可 # 许可