<template>
  <div class="jl-card">
    <div v-if="title" class="jl-card-title">
      <span>{{title}}</span>
      <div class="jl-card-title-tool">
        <slot name="tool"></slot>
      </div>
    </div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  props: { title: String },
  data () {
    return {};
  }
};
</script>

<style>
.jl-card {
  width: 100%;
  height: 320px;
  background: #fff;
  padding: 20px 20px;
  position: relative;
  color: #333;
  box-sizing: border-box;
}
.jl-card-title {
  border: 0px solid #5d9df8;
  border-left-width: 4px;
  height: 20px;
  line-height: 20px;
  font-size: 18px;
  font-weight: bold;
  padding-left: 8px;
}
.jl-card-title-tool {
  float: right;
}
</style>