<template>
  <div class="top">
    <div class="title">
      <div class="icon"></div>
      <div class="name">{{ words }}</div>
      <el-tooltip class="item" effect="light" content="换电编号" popper-class="tipNo" placement="top" v-if="words=='任务进度'">
        <div class="taskNo">{{swapId}}</div>
      </el-tooltip>
      <div class="carOnline" v-if="flag" @click="handleCarShow">在线车辆 <font>{{ CarNum }}</font></div>
    </div>
  </div>
</template>

<script>
export default {
  name: "SubTitle",
  props:['words','flag','CarNum','swapId'],
  methods:{
    handleCarShow(){
      this.$emit('ShowCarline');
    }
  }
};
</script>