Component({
  properties: {
    list:{
      type:Object,
      observer:function(list){
        this.setData({ list });
      }
    },
    share:{
      type:Boolean,
      observer: function (share){
        this.setData({ share });
      }
    }
  },
  data: {
    list:[],
    share:false,
    scrollLeft:0,
    current:0
  },
  methods: {
    childChange(e){
      let index = e.currentTarget.dataset.index;
      this.setData({ current: index, scrollLeft: ((index - 1) * 90) });
      this.triggerEvent('getChildIndex', index );
    }
  }
})
