Metronic

下一代应用程序的终极Bootstrap和Angular 6管理主题框架,一次购买永久包更新,当前版本5.5.5。

Quicksearch

Overview

mQuicksearch is a Metronic's custom plugin defined in src/js/framework/components/general/quicksearch.js.

Initialization

First parameter is the id, class, or tag of the HTML element. The second parameter is for the options.

var quicksearch = new mQuicksearch('m_quicksearch', options);

Options

var options = {
    mode: 'default', //'default/dropdown'
    minLength: 1,
    maxHeight: 300,
    requestTimeout: 200, // ajax request fire timeout in milliseconds
    inputTarget: 'm_quicksearch_input',
    iconCloseTarget: 'm_quicksearch_close',
    iconCancelTarget: 'm_quicksearch_cancel',
    iconSearchTarget: 'm_quicksearch_search',

    spinnerClass: 'm-loader m-loader--skin-light m-loader--right',
    hasResultClass: 'm-list-search--has-result',

    templates: {
        error: '<div class="m-search-results m-search-results--skin-light"><span class="m-search-result__message">{{message}}</div></div>'
    }
};
Field Type Description
mode string

Quick search mode. Accepted values are default and dropdown

Sample
mode: 'default'
minLength number

Minimum length of records to be displayed

Sample
minLength: 1
maxHeight number

Maximum height of result to be displayed

Sample
maxHeight: 300
requestTimeout number

The timeout in miliseconds for the request

Sample
requestTimeout: 200
inputTarget string

The target of input textbox where the search action to be triggered

Sample
inputTarget: 'm_quicksearch_input'
iconCloseTarget string

Set the icon for the search close

Sample
iconCloseTarget: 'm_quicksearch_close'
iconCancelTarget string

Set the icon for the search cancel

Sample
iconCancelTarget: 'm_quicksearch_cancel'
iconSearchTarget string

Set the icon for the search

Sample
iconSearchTarget: 'm_quicksearch_search'
spinnerClass string

Set spinner icon class name to be displayed during search action

Sample
spinnerClass: 'm-loader m-loader--skin-light m-loader--right'
hasResultClass string

Set search result class name when the search has result

Sample
hasResultClass: 'm-list-search--has-result'
templates.error string

The error template in HTML format, to be displayed when the search result has error. Add the placeholder {{message}} in the template, and it will be replaced by showError(message) API method.

Sample
templates: {
    error: '<div class="m-search-results m-search-results--skin-light"><span class="m-search-result__message">{{message}}</div></div>'
}

API Methods

Method Description
setDefaults(options)

Set default options

Input Parameters
Name Type Description
options object

A new options object for the menu

showResult(response)

Show the result of the search

Input Parameters
Name Type Description
response string

The search result response to be displayed

showError(message)

Show the error based of the template error defined in the options. {{message}} placeholder in the error template will be replaced by the message parameter.

Input Parameters
Name Type Description
message string

The text for the error

showProgress()

Show the search progress bar

hideProgress()

Hide the search progress bar

search()

Trigger search manually

on(name, handler)

Register event

Input Parameters
Name Type Description
name string

Unique event name

handler function

Callback function handler for the event

one(name, handler)

Register event to be run once

Input Parameters
Name Type Description
name string

Unique event name

handler function

Callback function handler for the event

我运营着一个由20个产品经理,开发人员,QA和UX资源组成的团队。以前我们自己设计了一切。对于我们最新的平台,我们试用了Metronic。我无法高估Metronic的影响力。它加速了3倍的开发,并将质量保证问题减少了50%。如果你减少了对设计时间/资源的需求,开发速度的提高和质量保证的减少,那么这个项目可能只为我们节省了10万美元,我计划将它用于所有平台。
设计的灵活性也使我们能够提供更好的外观和工作平台,并使我的头痛减少90%。谢谢KeenThemes! Jonathan Bartlett, Metronic 客户

强大的框架

Metronic的所有产品都可在全球范围内定制,以提供无限的独特风格项目

多演示

为数百个演示中的下一个项目选择一个完美的设计

无限组件

利用最新的UI / UX交易为您的应用程序提供大量组件的大量组件

Angular 6支持

企业级Angular 6集成了内置的身份验证模块等等

Bootstrap 4

Metronic深度定制Bootstrap,具有原生外观

独家数据库插件

我们超级时尚和直观的Datatable包含所有先进的CRUD功能

60,000+强

Metronic是全球60,000多名开发商信赖的唯一主题

持续更新

使用新演示和功能的终身更新得到保证

质量准则

Metronic是一个具有代码结构的作家,所有开发人员都可以轻松拿起并坠入爱河

全球超过60,000名开发人员信赖的Ultimate Bootstrap Admin主题