index.vue 1.09 KB
<!-- 弹窗 -->
<template>
  <div v-if="showTip" class="table-top-tips">
    <div>
      <span class="el-icon-warning"></span>
      <div>
        <slot>{{ content }}</slot>
      </div>
    </div>
    <span class="el-icon-close" @click="showTip = false"></span>
  </div>
</template>

<script>
export default {
  name: 'title-tip',
  data() {
    return {}
  },
  props: {
    showTip: {
      type: Boolean,
      default: true
    },
    content: {
      type: String,
      default: '--'
    }
  },

  methods: {}
}
</script>
<style lang="scss" scoped>
.table-top-tips {
  box-sizing: border-box;
  margin-bottom: 16px;
  width: 100%;
  min-height: 40px;
  line-height: 30px;
  font-size: 14px;
  background-color: #fdf0bb;
  border: 1px solid #f9ca78;
  padding: 0 16px;
  border-radius: 4px;
  color: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  &>div{
    display: flex;
    align-items: center;
  }
  .el-icon-warning {
    color: #f77315;
    margin-right: 8px;
  }
  .el-icon-close {
    margin-left: 30px;
    color: #666;
    cursor: pointer;
  }
}
</style>