/*
 * @Author: hejk
 * @Email: hejk@hxmec.com
 * @Date: 2021-04-13 14:47:15
 * @Last Modified by: hejk
 * @Last Modified time: 2021-04-13 17:05:50
 * @Description: 列表提示组件
 */
<template>
    <div v-show="(tip||slotFlag)&&showFlag"
         class="bk-list-alert">
        <div class="bk-alert__content">
            <span v-if="!slotFlag"
                  class="bk-alert__title">{{ tip }}</span>
            <slot />
            <i @click="showFlag=!showFlag"
               class="el-icon-close bk-alert__closebtn" />
        </div>
    </div>
</template>
<script>
export default {
    name: 'BkListAlert',
    props: {
        tip: {
            type: String,
            default: ''
        }
    },
    data() {
        return {
            showFlag: true
        };
    },
    computed: {
        slotFlag() {
            return this.$slots.default;
        }
    }

};
</script>
