<template>
    <div class="hint-box flexcenter" v-if="messagehint" v-html="messagehint"></div>
</template>

<script>
export default {
    name: 'Hintbox',

    data() {
        return {
        };
    },

    props: ["messagehint", "isauto"],

    watch: {
        isauto(val, oldVal) {
            if (val) {
                setTimeout(() => {
                    this.$parent.messagehint = ""
                }, 1500)
            }
        }
    },

    mounted() {
    },

    methods: {

    },
};
</script>

<style lang="scss" scoped>
.hint-box {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.2667rem 0.5333rem;
    border-radius: 0.1333rem;
    font-size: 0.3733rem;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    width: fit-content;
    max-width: 78%;
}
</style>