import Vue from 'vue'
import Search from './index.vue'

const searchBox = Vue.extend(Search)

Search.install = function (options,{ok,cancel}) {
  let instance = new searchBox({
    data: Object.assign(options,{okFunc:ok,cancelFunc:cancel})
  }).$mount()
  document.body.appendChild(instance.$el)

  Vue.nextTick(() => {
    instance.visible = true
  })
}
export default Search
