| | |
| | | |
| | | 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数据 |
| | |
| | | } |
| | | |
| | | 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' |
| | | }) |
| | | } |
| | | |
| | | /** |