@x-edu/search-input

0.0.1 • Public • Published

searchInput (带 ui 组件)

开发

npm start

dev/entry.js 里面做本地测试

自定义 fish prefixCls

为了避免样式冲突,如果使用了 fish,需要自定义 prefixCls 参数:

  1. 入口添加 ConfigProvider 配置
  2. babel.config.js 里,babel-plugin-import 的 style 为 true
  3. 修改 gem-mine-config 配置,使用 modifyVars 修改 less 变量

fish-h5 目前不支持全局自定义 prefixCls。如果发现有冲突,可以对使用的组件单独自定义 prefixCls

使用

import { SearchInput, HeaderSearchInput } from '@x-edu/search-input'

export default function Demo() {
  return (
    <div>
      <div>
        <SearchInput
          inHeader // 是否在头部
          userInfo // 用户信息
          loginStatus // 登陆状态 获取登陆状态后执行一次搜索
          execSearch // 搜索 入参是 keyword
          history // 路由 用于跳转页面
          searchPath // 搜索页面地址
          onHistoryClick // 点击搜索历史子项的回调 入参为 keyword
          onFocus
          className // 最外层类名
          customSearchClassName // 自定义搜索框类名
          customDropdownClassName // 自定义搜索历史类名
        />
      </div>
      <div>
        <HeaderSearchInput
          searchPath // 搜索页面地址
          visible // 是否显示
          onClick // 点击事件
          history // 路由
          className // 最外层类名
        />
      </div>
    </div>
  )
}

/@x-edu/search-input/

    Package Sidebar

    Install

    npm i @x-edu/search-input

    Weekly Downloads

    0

    Version

    0.0.1

    License

    none

    Unpacked Size

    4.74 MB

    Total Files

    6

    Last publish

    Collaborators

    • huhb500
    • eliseisgood
    • dont_write_code
    • guoyh
    • caijiexuan
    • janya
    • githoniel
    • gylllll
    • caolvchong