Commit 95caa796 by 前端

修复线上样式BUG

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