// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' import router from './router' import 'leaflet/dist/leaflet.css' import 'leaflet-velocity/dist/leaflet-velocity.css' import L from 'leaflet' import 'leaflet-velocity/dist/leaflet-velocity' // import $ from 'jquery' import icon from 'leaflet/dist/images/marker-icon.png' import iconShadow from 'leaflet/dist/images/marker-shadow.png' // import VueWebsocket from 'vue-websocket' // Vue.use(VueWebsocket) let DefaultIcon = L.icon({ iconUrl: icon, shadowUrl: iconShadow }) L.Marker.prototype.options.icon = DefaultIcon Vue.config.productionTip = false // IE 兼容方法 if (typeof Object.assign !== 'function') { Object.assign = function (target) { 'use strict' if (target == null) { throw new TypeError('Cannot convert undefined or null to object') } target = Object(target) for (var index = 1; index < arguments.length; index++) { var source = arguments[index] if (source != null) { for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key] } } } } return target } } /* eslint-disable no-new */ new Vue({ el: '#app', router, components: { App }, template: '' })