gpt4 book ai didi

javascript - 空白搜索 - 语义 UI

转载 作者:行者123 更新时间:2023-12-02 16:35:44 28 4
gpt4 key购买 nike

我正在尝试在我的应用原型(prototype)中实现 Semantic-UI 搜索模块。

但它将结果显示为空白组件 ->

LINK

应用程序正在使用 Node-Webkit 运行

JS 代码:

$(document).ready(function() {
$('.ui.search.agendamento').search({
source : agendamento,
searchFields : [
'patient',
],
searchFullText: false
});
});

HTML

<div class="ui fluid search agendamento">
<div class="ui icon input">
<input class="prompt" type="text" placeholder="Buscar consulta">
<i class="search icon"></i>
</div>
<div class="results"></div>
</div>

最佳答案

我的问题出在 Semantic-UI 搜索的结果 json 数组中。

它需要正确格式化,例如:

{
"results": [
{
"title": "Result Title",
"url": "/optional/url/on/click",
"image": "optional-image.jpg",
"price": "Optional Price"
"description": "Optional Description"
},
{
"title": "Result Title",
"description": "Result Description"
}
],
// optional action below results
"action": {
"url": '/path/to/results'
"text": "View all 202 results"
}
}

关于javascript - 空白搜索 - 语义 UI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27952584/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com