网站首页 程序开发 iView的Message提示框
import iView from 'iview' Vue.use(iView)
this.$Message.info('This is a info tip'); this.$Message.success('This is a success tip'); this.$Message.warning('This is a warning tip'); this.$Message.error('This is an error tip');
import { Message } from 'iview' Message.info('hello'); Message.success('hello'); Message.warning('hello'); Message.error('hello');
main.js
Vue.prototype.$Message.config({ top: 70, duration:2 });
局部配置中设置高度无效
this.$Message.info({ content: 'I'll be gone in 10 seconds', duration: 10, closable: true });