var tmpl=`
    <el-card ref="cardSelf" class="box-card">
        <slot name="header">
        </slot>
        <div>
          <div>
            <slot></slot>
          </div>
        </div>
    </el-card>
`
module.exports=
`{
   template:'${tmpl}',
   props:["title"],
   data:function(){
     return {
       currentDate:new Date(),
       isShowCardButton:true
     };
   },
   mounted:function(){
     var $card=$(this.$refs.cardSelf.$el);
     var ch=$(window).height()-this.$root.$data.header_h;
     $card.height(ch-20);
     $(window).resize(()=>{
       var ch=$(window).height()-this.$root.$data.header_h;
       $card.height(ch-20);
     });
   },
   created:function(){

   },
   methods:{
      homePage(){
        this.$router.push("/workbench");
      },
      toolbox(){
        this.$router.push("/toolbox");
      },
      changeButtonState(){
        this.isShowCardButton=!this.isShowCardButton;
      },
      searchEnter(v){
      var pt=this.$store.state.products.forEach(p=>{
         if(p.code==v){
           this.$router.push("/products/"+v+"/"+p.id);
           return false;
         }
       });
      }
   },
   vname:"gsb-card4"
}`
