派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-01-05 1820aef3fb5c926664de1d4d484f64a5c9ba7099
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
/**
 * 集合转换为JSON
 * @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'
  })
}
/**