1.0.1 • Published 4 years ago
wowsearch-ui v1.0.1
wowsearch-ui
官方搜索 UI 组件
使用
作为 React 组件使用
import WowseasrchUI from 'wowsearch-ui'
import elasticAdaptor from 'wowsearch-elastic-adaptor/browser'
import 'wowsearch-ui/index.less'
ReactDOM.render(
<WowseasrchUI {...elasticAdaptor({ index_name: '你的索引名' })} />
// ...
)
独立使用 (项目环境不依赖 React)
import wowsearchUI from 'wowsearch-ui/standalone'
import 'wowsearch-ui/index.less'
// wowsearchUI 为 https://github.com/imcuttle/react-pizza 实例
// 详见 https://github.com/imcuttle/react-pizza#readme
const ui = wowsearchUI(
'#root',
wowsearchUI.elasticAdaptor({
index_name: '_all'
})
);
CDN 独立使用
<script src="https://unpkg.com/wowsearch-ui"></script>
<link rel="stylesheet" href="https://unpkg.com/wowsearch-ui/dist/style.css"/>
<div id="root"></div>
<script>
/* eslint-disable */
WowsearchUI('#root', WowsearchUI.elasticAdaptor({
index_name: '_all'
}));
</script>
Props
wowsearch-ui 继承 rc-select 配置
fetcher
搜索时获取数据请求,一般通过 elasticAdaptor
输出
- Type:
(inputValue) => Promise<[]>
openInNew
是否在新窗口打开页面
- Default:
false
- Type:
boolean
1.0.1
4 years ago
1.0.0
4 years ago
0.4.0
4 years ago
0.3.1
4 years ago
0.3.0
4 years ago
0.2.0
4 years ago
0.1.2
5 years ago
0.1.0
5 years ago
0.1.1
5 years ago
0.0.32
5 years ago
0.0.31
5 years ago
0.0.30
5 years ago
0.0.29
5 years ago
0.0.28
5 years ago
0.0.27
5 years ago
0.0.26
5 years ago
0.0.23
5 years ago
0.0.24
5 years ago
0.0.25
5 years ago
0.0.22
5 years ago
0.0.21
5 years ago
0.0.20
5 years ago
0.0.19
5 years ago
0.0.18
5 years ago
0.0.17
5 years ago
0.0.16
5 years ago
0.0.15
5 years ago
0.0.14
5 years ago
0.0.13
5 years ago
0.0.12
5 years ago
0.0.11
5 years ago
0.0.10
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.6
5 years ago