<!--
 * @Author: changjun
 * @FilePath: /qingdao-safety-product/src/views/threatIntelligence/components/CommonTableHead.vue
 * @Date: 2022-08-10 16:40:16
 * @Description: 
 * @LastEditTime: 2023-09-01 17:03:44
 * @LastEditors: 曹文丽
-->
<script setup lang="ts">
import { defineProps } from 'vue'
import { ElIcon } from 'element-plus'
import { Warning } from '@element-plus/icons-vue'
interface CommonTableHeadProps {
  title: string;
  tip?: string;
}

const { title = '', tip = '' } = defineProps<CommonTableHeadProps>()


</script>

<template>
  <div class="title-block prefix">
    <div class="title">{{ title }}</div>
    <ElIcon class="tip-icon" v-if="tip">
      <Warning />
    </ElIcon>
    <div class="tip" v-if="tip">{{ tip }}</div>
  </div>
</template>

<style lang="scss" scoped>
.title-block {
  display: flex;
  align-items: center;
  padding-left: 8px;
  box-sizing: border-box;
  margin-top: 16px;

  .tip-icon {
    font-size: 10px;
    margin-left: 10px;
    color: rgba(3, 3, 3, 0.4000);
  }

  .tip {
    font-size: 12px;
    font-weight: 400;
    color: rgba(3, 3, 3, 0.4000);
    margin-left: 2px;
  }
}

.prefix {
  position: relative;
  font-size: 14px;
  font-weight: 400;
  color: rgba(3, 3, 3, 0.6500);
}

.prefix::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 14px;
  background: #0095FF;
}
</style>
