fix notification bug

This commit is contained in:
Mutasem 2021-07-30 12:27:59 +02:00
parent bf79ec77a0
commit 08a7b6d42e

View file

@ -1,5 +1,4 @@
// @ts-ignore // @ts-ignore
import { Notification } from 'element-ui/lib/notification';
import { ElNotificationComponent, ElNotificationOptions } from 'element-ui/types/notification'; import { ElNotificationComponent, ElNotificationOptions } from 'element-ui/types/notification';
import mixins from 'vue-typed-mixins'; import mixins from 'vue-typed-mixins';
@ -14,7 +13,7 @@ export const showMessage = mixins(externalHooks).extend({
messageData.position = 'bottom-right'; messageData.position = 'bottom-right';
} }
return Notification(messageData); return this.$notify(messageData);
}, },
$showWarning(title: string, message: string, config?: {onClick?: () => void, duration?: number, customClass?: string, closeOnClick?: boolean}) { $showWarning(title: string, message: string, config?: {onClick?: () => void, duration?: number, customClass?: string, closeOnClick?: boolean}) {