src/components/elalert.vue
@@ -1,10 +1,10 @@
<!--  -->
<template>
    <div v-if="$store.state.elAlertShow">
        <el-alert  :closable="closable" :title="$t($store.state.elAlertText)" :type="$store.state.elAlertType" center style="z-index:99999999999999999;position: fixed;top: 0;bottom: 0;margin: auto;">
        <el-alert  :closable="closable" :title="$store.state.elAlertText" :type="$store.state.elAlertType" center style="z-index:99999999999999999;position: fixed;top: 0;bottom: 0;margin: auto;">
    </el-alert>
    </div>
</template>
<script>
@@ -45,11 +45,11 @@
    },
    //生命周期 - 创建完成(访问当前this实例)
    created() {
    },
    //生命周期 - 挂载完成(访问DOM元素)
    mounted() {
    },
    methods:{
        //定时调用父组件方法关闭弹窗
@@ -59,7 +59,7 @@
                this.$emit('closeAlert')
            },2000)
        },
    }
}
</script>
@@ -73,4 +73,4 @@
    position: absolute;
    top: 50%;
}
</style>
</style>