<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Instantsearch.js即時搜索結果

          聯(lián)合創(chuàng)作 · 2023-10-02 09:21

          Instantsearch.js 是一個 JavaScript 庫,它可以讓你用 Algolia 的 REST API 創(chuàng)建一個即時搜索結果體驗。

          搜索結果的頁面是由單個組件組成的,也被稱為 widgets。Widgets 既是搜索輸入的 UI 組件也是搜索輸出的 UI 組件。

          示例代碼:

          var instantsearch = require('instantsearch.js');// or use the 'instantsearch' global variable when using the jsDelivr buildvar search = instantsearch({
            appId: appId, // Mandatory
            apiKey: apiKey, // Mandatory
            indexName: indexName, // Mandatory
            numberLocale: 'fr-FR' // Optional, defaults to 'en-EN',
            urlSync: { // optionnal, activate url sync if defined
              useHash: false
            }
          });// add a searchBox widgetsearch.addWidget(
            instantsearch.widgets.searchBox({
              container: '#search-box',
              placeholder: 'Search for libraries in France...'
            })
          );// add a hits widgetsearch.addWidget(
            instantsearch.widgets.hits({
              container: '#hits-container',
              hitsPerPage: 10
            })
          );// startsearch.start();

           

          瀏覽 19
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  亚洲做视频 | 国产 无码 成人免费 | 黑人大屌孟操日本女人 | 日韩精品A片一区二区三区妖精 | 亚洲黄色电影精品 |