var t = getApp(), os = t.globalData.setting;
Component({
  properties: {},
  data: {
      f_sear:0,
      sear_key:''
  },

  ready: function() {},
  methods: {
    show_sear_inp(){
      this.setData({f_sear:1});
    },

    blur_sear(){
      if(!this.data.sear_key) this.setData({f_sear:0});
    },

    search_lb(){
      this.triggerEvent('search_lb');
    },

    input_sear(e){
      let value = e.detail.value;
      this.setData({sear_key:value});
      this.triggerEvent('input_sear',value);
    },

    //-- 置空文本输入 --
    close_txt(e){
      setTimeout(()=>{
        this.setData({sear_key:'',f_sear:1});
        this.triggerEvent('input_sear','');
      },50)

    },

    //-- 父组件调用 --
    clear(){
      this.setData({sear_key:'',f_sear:0});
    }

  }

})