ver. 1.0.4

<mf-search-results></mf-search-results>

Search result display element Example of use

Applicable attributes

Setting Example

If you want to make the title of pdf a file name

Define the js function on the search result page.

  <script>
  window.my_title = function(doc,i){
    if (doc.attrs.type == 'application/pdf' || doc.attrs.type == 'pdf') {
      var m = doc.uri.match(/([^#]*)(#.*)?/);
      var t = m[1].replace(/.*\/([^/]+\/?)/, '$1') + (m[2]||'');
      return [{id:0, text:t, type:'custom'}];
    }
  }
  </script>

Specify the function above with the “:title-frags-func” attribute of the custom element

  <mf-search-results
    :title-frags-func="window.my_title"
    ></mf-search-results>

DOM structure and class settings

Slot for DOM customization

For the slots, see the description below

Slot name header

Properties that can be referenced

Example of use

Slot name docs

Properties that can be referenced

Example of use

Slot name doc

Properties that can be referenced

Example of use

Slot name doc_image

Properties that can be referenced

Example of use

Slot name doc_head

Properties that can be referenced

Example of use

Slot name doc_title_prev

Properties that can be referenced

Example of use

Slot name doc_title

Properties that can be referenced

Slot name doc_title_post

Properties that can be referenced

Example of use

Slot name doc_body_prev

Properties that can be referenced

Example of use

Slot name doc_body

Properties that can be referenced

Slot name doc_body_post

Properties that can be referenced

Example of use

Slot name doc_url_prev

Properties that can be referenced

Example of use

Slot name doc_url

Properties that can be referenced

Slot name doc_url_post

Properties that can be referenced

Example of use

Slot name doc_foot

Properties that can be referenced

Example of use