首页 > 解决方案 > 禁用 list.js 中的类似结果

问题描述

我使用 list.js,但它也显示类似的结果。例如,我正在输入 Mar...,网站还显示 mur、car、man 等。如何禁用它们?

这是来自codepen的演示:

<p class="codepen" data-height="265" data-theme-id="0" data-default-tab="html,result" data-user="javve" data-slug-hash="isInl" style="height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="List.js - Fuzzy search">
  <span>See the Pen <a href="https://codepen.io/javve/pen/isInl/">
  List.js - Fuzzy search</a> by Jonny Strömberg (<a href="https://codepen.io/javve">@javve</a>)
  on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>

标签: list.js

解决方案


您正在使用模糊搜索,如果您更改<input type="text" class="fuzzy-search" /><input type="text" class="search" />它有效。

检查它


推荐阅读