vue中使用element-UI —notice—notification的使用
官网使用的是
<el-button
plain
@click="open1">
成功
</el-button>
可以换成div,这样使用起来相对方便
<template>
<div>
<div
plain
@click="open1">
可自动关闭
</div>
</div>
</template>
<script>
export default {
methods: {
open1() {
const h = this.$createElement;
this.$notify({
title: '温馨提示',
message: h('i', { style: 'color: #00B052'}, '您未通过健康评测!'),
offset: 100
});
},
}
}
</script>