Commit 95caa796 by 前端

修复线上样式BUG

1 parent 977fdc30
// import Vue from 'vue' // import Vue from 'vue'
import { Message, MessageBox, Loading } from 'element-ui' // import { Message, MessageBox, Loading } from 'element-ui'
// import moment from 'moment' // import moment from 'moment'
import dayjs from 'dayjs' import dayjs from 'dayjs'
let loadingInstance = '' let loadingInstance = ''
...@@ -16,81 +16,81 @@ export const Util = { ...@@ -16,81 +16,81 @@ export const Util = {
* confirmButtonColor 确认按钮颜色 * confirmButtonColor 确认按钮颜色
* cancelButtonColor 取消按钮颜色 * cancelButtonColor 取消按钮颜色
*/ */
msg: function(options) { // msg: function(options) {
MessageBox({ // MessageBox({
title: options.title || '', // title: options.title || '',
type: options.type || 'error', // type: options.type || 'error',
message: options.message || '', // message: options.message || '',
className: options.className || '', // className: options.className || '',
showCancelButton: options.showCancelButton || false, // showCancelButton: options.showCancelButton || false,
confirmButtonText: options.confirmButtonText || '确认', // confirmButtonText: options.confirmButtonText || '确认',
cancelButtonText: options.cancelButtonText || '取消', // cancelButtonText: options.cancelButtonText || '取消',
confirmButtonColor: options.confirmButtonColor || '#1989fa', // confirmButtonColor: options.confirmButtonColor || '#1989fa',
cancelButtonColor: options.cancelButtonColor || '#000', // cancelButtonColor: options.cancelButtonColor || '#000',
dangerouslyUseHTMLString: true, // dangerouslyUseHTMLString: true,
callback: function(action, done) { // callback: function(action, done) {
if (action == 'confirm') { // if (action == 'confirm') {
if (options.success) { // if (options.success) {
options.success(done) // options.success(done)
} // }
} else { // } else {
console.log(done) // console.log(done)
// done() // // done()
} // }
} // }
}) // })
/* Vue.$vux.alert.show({ // /* Vue.$vux.alert.show({
title: options.title||'', // title: options.title||'',
content: options.message||'', // content: options.message||'',
onShow() { // onShow() {
options.onShow?(options.onShow)():''; // options.onShow?(options.onShow)():'';
}, // },
onHide() { // onHide() {
options.onHide?(options.onHide)():''; // options.onHide?(options.onHide)():'';
} // }
}) */ // }) */
}, // },
/** /**
* 提示框 * 提示框
*/ */
Info: function(options) { // Info: function(options) {
Message({ // Message({
message: options.message || '提示', // message: options.message || '提示',
type: options.type || 'error', // type: options.type || 'error',
duration: options.time || 2000, // duration: options.time || 2000,
onClose: options.onClose || '' // onClose: options.onClose || ''
}) // })
}, // },
/** /**
* 轻提示 * 轻提示
*/ */
Tips: function(options) { // Tips: function(options) {
Message({ // Message({
message: options.message || '提示', // message: options.message || '提示',
duration: options.duration || 3000, // duration: options.duration || 3000,
type: options.type || 'text', // type: options.type || 'text',
icon: options.icon || '' // icon: options.icon || ''
}) // })
}, // },
/** /**
* loading * loading
*/ */
loading: function(message) { // loading: function(message) {
loadingInstance = Loading.service({ // loadingInstance = Loading.service({
text: message || '加载中...' // text: message || '加载中...'
}) // })
}, // },
/** /**
* 关闭loading * 关闭loading
*/ */
closeLoading: function() { // closeLoading: function() {
loadingInstance.close() // loadingInstance.close()
}, // },
/** /**
* 校验手机号码格式 * 校验手机号码格式
...@@ -332,10 +332,10 @@ export const Util = { ...@@ -332,10 +332,10 @@ export const Util = {
} }
} }
export const showModal = Util.msg // export const showModal = Util.msg
export const showToast = Util.Info // export const showToast = Util.Info
export const showLoading = Util.loading // export const showLoading = Util.loading
export const hideLoading = Util.closeLoading // export const hideLoading = Util.closeLoading
export const deepClone = Util.deepClone export const deepClone = Util.deepClone
export const downLoadFile = Util.downLoadFile export const downLoadFile = Util.downLoadFile
export const returnFloat = Util.returnFloat export const returnFloat = Util.returnFloat
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!