|
|
import Vue from 'vue';
|
|
|
import Router from 'vue-router';
|
|
|
import Promise from 'promise-polyfill';
|
|
|
import App from './pages/app';
|
|
|
import Routers from './pages';
|
|
|
import yohoPluginCore from './plugins/yoho-plugin-core';
|
...
|
...
|
@@ -8,9 +9,20 @@ import './filters'; |
|
|
import './directives';
|
|
|
import 'iview/dist/styles/iview.css';
|
|
|
import 'font-awesome/css/font-awesome.css';
|
|
|
import Promise from 'promise-polyfill';
|
|
|
|
|
|
// To add to window
|
|
|
// 兼容IE的Function没有name属性为题,为了修复iView的bug
|
|
|
if (!(function f() {}).name) {
|
|
|
Object.defineProperty(Function.prototype, 'name', { //eslint-disable-line
|
|
|
get: function() {
|
|
|
let name = (this.toString().match(/^function\s*([^\s(]+)/) || [])[1];
|
|
|
|
|
|
Object.defineProperty(this, 'name', { value: name });
|
|
|
return name;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 使用了webpack code spliting IE下需要promise ployfill
|
|
|
if (!window.Promise) {
|
|
|
window.Promise = Promise;
|
|
|
}
|
...
|
...
|
|