前言
网上大部分文章毫无用处,最后我还得自己到官网学习整理
提示
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');
const msg = this.$Message.loading({
content: 'Loading...',
duration: 0
});
setTimeout(msg, 3000);
提醒
this.$Notice.info({
title: 'Notification title',
desc: 'Here is the notification description. Here is the notification description. '
});
this.$Notice.success({
title: 'Notification title',
desc: 'Here is the notification description. Here is the notification description. '
});
this.$Notice.warning({
title: 'Notification title',
desc: 'Here is the notification description. Here is the notification description. '
});
this.$Notice.error({
title: 'Notification title',
desc: 'Here is the notification description. Here is the notification description. '
});
对话框
<Modal
v-model="modal6"
title="Title"
:loading="loading"
@on-ok="asyncOK">
<p>After you click ok, the dialog box will close in 2 seconds.</p>
</Modal>
asyncOK () {
setTimeout(() => {
this.modal6 = false;
}, 2000);
}