⚡Package notification component
This commit is contained in:
parent
d1523e749d
commit
1223646b7b
@ -1,3 +1,6 @@
|
||||
import Vue from 'vue'
|
||||
import notify from './notification'
|
||||
|
||||
Vue.prototype.$notify = notify
|
||||
|
||||
Vue.component('markdown', () => import('./markdown'))
|
||||
|
13
src/components/notification/index.js
Normal file
13
src/components/notification/index.js
Normal 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;
|
Loading…
Reference in New Issue
Block a user