<template>
    <el-popover
            class="popover-login"
            placement="bottom"
            width="200"
            v-model="status"
            trigger="click">
        <slot></slot>
        <span style="cursor: pointer" slot="reference" type="text" class="color-p">{{text}}</span>
    </el-popover>
</template>

<script>
    export default {
        name: 'popoverWrap',
        props: {
            text: {
                type: String,
                required: true
            },
            visible: {
                type: Boolean,
                required: true,
                default: false,
            }
        },
        data() {
            return {
                status: false,
            }
        },
        watch: {
            visible(newVal, oldVal) {
                this.status = newVal;
            }
        }
    };
</script>

