Commit 177cef25 by 姜雷

修改错误提示方式

parent aac56ccb
......@@ -3,7 +3,7 @@ if (process.env.NODE_ENV === 'production') {
removeConsolePlugin.push([
'transform-remove-console',
{
exclude: ['error', 'warn'],
exclude: ['error', 'warn', 'table'],
},
]);
}
......
export default (err, vm, info) => {
console.table([err, { info: info }]);
console.error(err);
console.table([{ name: 'vm', data: vm }, { name: 'info', data: info }]);
return false;
};
......@@ -10,7 +10,7 @@ import {
import rymUi from 'rym-element-ui';
import 'rym-element-ui/lib/rymUi.css';
// import errorHandler from './errorHandler';
import errorHandler from './errorHandler';
import HeaderImg from '../components/HeaderImg/HeaderImg.vue';
import UserWithContent from '../components/UserCard/UserWithContent.vue';
......@@ -37,7 +37,7 @@ const extendVue = Vue => {
Vue.prototype.$formatterMoneyToDouble = formatterMoneyToDouble;
Vue.prototype.$formatPrice = formatPrice;
// Vue.config.errorHandler = errorHandler;
Vue.config.errorHandler = errorHandler;
Vue.component('UserCard', UserCard);
Vue.component('UserInfo', UserInfo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment