From 56b43d0a37ec52b718b32b00c63eb88f2e2744f3 Mon Sep 17 00:00:00 2001 From: YANGDL <114714267@qq.com> Date: 星期五, 26 二月 2021 09:07:56 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/utils/tools.js | 27 +++++++++++++++++++++------ 1 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/utils/tools.js b/src/utils/tools.js index 9aeb1f0..0838a7f 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -1,9 +1,9 @@ import * as $CONST from './constant' +import { Message } from 'element-ui' // import { notify } from '@nutui/nutui' export const _ = require('lodash') -const notify = window.vm.$notify /** * 闆嗗悎杞崲涓篔SON * @param obj collection鏁版嵁 @@ -993,23 +993,38 @@ } export function success (msg = $CONST.MSG_SYS_SUCCESS) { - notify.success(msg) + Message({ + message: msg, + type: 'success' + }) } export function fail (msg = $CONST.MSG_SYS_FAIL) { - notify.warn(msg) + Message({ + message: msg, + type: 'error' + }) } export function error (msg = $CONST.MSG_SYS_ERR) { - notify.danger(msg) + Message({ + message: msg, + type: 'error' + }) } export function warning (msg = $CONST.MSG_SYS_WARNING) { - notify.warn(msg) + Message({ + message: msg, + type: 'warning' + }) } export function info (msg = $CONST.MSG_SYS_CANCELED) { - notify.primary(msg) + Message({ + message: msg, + type: 'info' + }) } /** -- Gitblit v1.8.0