var tmpl=`
  <div style="padding:20px">
    <slot name="header"></slot>
    <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:250px;margin-top:20px;border-radius:0px">
              <div :style="styleFunc(item)"><h3>{{item.title}}</h3></div>
              <el-table 
                 style="width:90%;margin:auto"
                 :data="item.articles"
                 @row-click="rowclick"
                 size="mini"
                 :show-header="hasHeader"
                 >
                 <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;padding-right:50px"><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 {
         "width":"100%",
         "line-height":"50px",
         "color":"black",
       };
     },
   },
   vname:"gsb-simplechannel"
}`
