# hy-search-bar

#### 项目介绍

海颐移动UI组件，搜索框、带搜索页面的搜索框


#### 软件架构

软件架构说明

#### 安装教程

    npm install hy-search-bar --save

#### 使用说明

    在main.js中
    import 'hy-search-bar/dist/vue-search-bar.min.css';
    import { SearchBar } from 'hy-search-bar';
    Vue.use(SearchBar);

    页面中使用
    <search-bar :searchList="reslist" @confirm="select">
    </search-bar>

    export default {
      components: {
      },
      data () {
        return {
          date_demo: '',
          reslist: [{title: '如何创建一个Vue组件', id: 1}, {title: '如何创', id: 2}, {title: '如何创建一个html组件', id: 3}]
        };
      },
      methods: {
        select (val) {
          if (val != null) {
            this.date_demo = val.title;
          } else {
            this.date_demo = '';
          }
        }
      }
    };



