var tmpl=`
  <div style="padding:20px">
    <slot name="header"></slot>
    <div style="width:100%;border:1px solid #eee"></div>
    <el-row  :gutter="20">
      <el-col  :xs="8" :sm="8" :md="8" :lg="8" :xl="8" v-for="item in datasrc">
          <el-card shadow="hover" class="box-card" style="min-height:300px;margin-top:20px;border-radius:0px">
              <div :style="styleFunc(item)"><h3>{{item.title}}</h3></div>
              <el-table
                 :data="item.articles"
                 @row-click="rowclick"
                 size="mini"
                 :show-header="hasHeader"
                 style="width: 100%;text-align:left;postion:absolute;top:0px;z-index:10">
                 <el-table-column
                   label="xxx">
                   <template slot-scope="scope">
                     <i class="el-icon-time"></i>
                     <span style="margin-left: 10px">{{ scope.row.title }}</span>
                   </template>
                 </el-table-column>
              </el-table>
              <div style="text-align:right;"><el-button type="text" @click="moreclick(item.id)">更多...</el-button></div>
          </el-card>
      </el-col>
    </el-row>
  </div>
`
module.exports=
`{
   template:'${tmpl}',
   props:['datasrc'],
   data:function(){
     return {
       hasHeader:false,
     };
   },
   mounted:function(){

   },
   methods:{
     rowclick:function(r){
       console.log(r);
       this.$emit("rowclick",r);
     },
     moreclick:function(id){
       this.$emit("moreclick",id);
     },
     styleFunc:function(item){
       return {
         'background':'no-repeat url('+item.bgimg+') center',
         "postion":"absolute",
         "top":"0px",
         "width":"100%",
         "line-height":"50px",
         "color":"#eee",
       };
     },
   },
   vname:"gsb-simplechannel"
}`
