Package notification component

This commit is contained in:
Aicirou 2020-07-04 22:55:33 +08:00
parent d1523e749d
commit 1223646b7b
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import notify from './notification'
Vue.prototype.$notify = notify
Vue.component('markdown', () => import('./markdown')) Vue.component('markdown', () => import('./markdown'))

View File

@ -0,0 +1,13 @@
import { Notification } from "element-ui";
import i18n from "@/i18n";
const notify = ({ title, message, type, duration }) => {
Notification({
title: i18n.t(title),
message: i18n.t(message),
type: type,
duration: duration,
});
};
export default notify;