Commit 4550c660 by 姜雷

添加全局捕获错误

parent 18a21a3b
export default (err, vm, info) => {
console.table([err, { info: info }]);
return false;
};
...@@ -10,6 +10,8 @@ import { ...@@ -10,6 +10,8 @@ import {
import rymUi from 'rym-element-ui'; import rymUi from 'rym-element-ui';
import 'rym-element-ui/lib/rymUi.css'; import 'rym-element-ui/lib/rymUi.css';
import errorHandler from './errorHandler';
import HeaderImg from '../components/HeaderImg/HeaderImg.vue'; import HeaderImg from '../components/HeaderImg/HeaderImg.vue';
import UserWithContent from '../components/UserCard/UserWithContent.vue'; import UserWithContent from '../components/UserCard/UserWithContent.vue';
import UserCard from '../components/UserCard/UserCard.vue'; import UserCard from '../components/UserCard/UserCard.vue';
...@@ -35,6 +37,8 @@ const extendVue = Vue => { ...@@ -35,6 +37,8 @@ const extendVue = Vue => {
Vue.prototype.$formatterMoneyToDouble = formatterMoneyToDouble; Vue.prototype.$formatterMoneyToDouble = formatterMoneyToDouble;
Vue.prototype.$formatPrice = formatPrice; Vue.prototype.$formatPrice = formatPrice;
Vue.config.errorHandler = errorHandler;
Vue.component('UserCard', UserCard); Vue.component('UserCard', UserCard);
Vue.component('UserInfo', UserInfo); Vue.component('UserInfo', UserInfo);
Vue.component(UserWithContent.name, UserWithContent); Vue.component(UserWithContent.name, UserWithContent);
......
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