iview组件全局消息居中操作:
首先需要初始化消息提醒组件:
mounted() {
this.$Message.config({
//离上边多远,单位是px
top:250,
//消息停留时间
duration: 3
)}
}
之后就是方法里面的直接调用了:
this.$Message.error("你好")
这样就结束了。
iview组件全局消息居中操作:
首先需要初始化消息提醒组件:
mounted() {
this.$Message.config({
//离上边多远,单位是px
top:250,
//消息停留时间
duration: 3
)}
}
之后就是方法里面的直接调用了:
this.$Message.error("你好")
这样就结束了。