|
@@ -2,25 +2,25 @@
|
|
|
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
|
|
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
|
|
|
//import 'core-js/stable'
|
|
//import 'core-js/stable'
|
|
|
//import 'regenerator-runtime/runtime'
|
|
//import 'regenerator-runtime/runtime'
|
|
|
-require("@/assets/css/index.scss")
|
|
|
|
|
|
|
+require('@/assets/css/index.scss')
|
|
|
import Vue from 'vue'
|
|
import Vue from 'vue'
|
|
|
import App from './App.vue'
|
|
import App from './App.vue'
|
|
|
-import Vant from 'vant';
|
|
|
|
|
-import 'vant/lib/index.css';
|
|
|
|
|
|
|
+import Vant from 'vant'
|
|
|
|
|
+import 'vant/lib/index.css'
|
|
|
import router from './router'
|
|
import router from './router'
|
|
|
import store from './store'
|
|
import store from './store'
|
|
|
// 引入样式
|
|
// 引入样式
|
|
|
-import "vue-easytable/libs/theme-default/index.css";
|
|
|
|
|
|
|
+import 'vue-easytable/libs/theme-default/index.css'
|
|
|
// 引入组件库
|
|
// 引入组件库
|
|
|
-import VueEasytable from "vue-easytable";
|
|
|
|
|
-import dayjs from "dayjs";
|
|
|
|
|
-import {imgUrl} from "@/utils";
|
|
|
|
|
|
|
+import VueEasytable from 'vue-easytable'
|
|
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
+import { imgUrl } from '@/utils'
|
|
|
// 设置 js中可以访问 $cdn
|
|
// 设置 js中可以访问 $cdn
|
|
|
import config, { $cdn } from '@/config'
|
|
import config, { $cdn } from '@/config'
|
|
|
import EmptyBox from '@/components/EmptyBox'
|
|
import EmptyBox from '@/components/EmptyBox'
|
|
|
Vue.prototype.$cdn = $cdn
|
|
Vue.prototype.$cdn = $cdn
|
|
|
Vue.prototype.dayjs = dayjs
|
|
Vue.prototype.dayjs = dayjs
|
|
|
-Vue.prototype.imgUrl = imgUrl;
|
|
|
|
|
|
|
+Vue.prototype.imgUrl = imgUrl
|
|
|
|
|
|
|
|
// 移动端适配
|
|
// 移动端适配
|
|
|
import 'amfe-flexible'
|
|
import 'amfe-flexible'
|
|
@@ -28,16 +28,37 @@ import 'amfe-flexible'
|
|
|
// filters
|
|
// filters
|
|
|
import './filters'
|
|
import './filters'
|
|
|
Vue.config.productionTip = false
|
|
Vue.config.productionTip = false
|
|
|
-import VCalendar from 'v-calendar';
|
|
|
|
|
-import globals from "@/utils/global.js"//全局混入
|
|
|
|
|
|
|
+import VCalendar from 'v-calendar'
|
|
|
|
|
+import globals from '@/utils/global.js' //全局混入
|
|
|
import '@vant/touch-emulator'
|
|
import '@vant/touch-emulator'
|
|
|
import './components/index.js'
|
|
import './components/index.js'
|
|
|
-Vue.use(Vant);
|
|
|
|
|
-Vue.use(VueEasytable);
|
|
|
|
|
-Vue.use(globals);
|
|
|
|
|
-Vue.use(VCalendar,{
|
|
|
|
|
- componentPrefix: 'vc', // Use <vc-calendar /> instead of <v-calendar />
|
|
|
|
|
-});
|
|
|
|
|
|
|
+import watercom from '@/components/waterCom.vue'
|
|
|
|
|
+Vue.component('watercom', watercom)
|
|
|
|
|
+/*实时获取 sessionStorage 的值*/
|
|
|
|
|
+Vue.prototype.resetSetItem = function (key, newVal) {
|
|
|
|
|
+ //注意categoryNum为要监听的属性,实际开发中请自行修改
|
|
|
|
|
+ if (key === 'userName') {
|
|
|
|
|
+ // 创建一个StorageEvent事件
|
|
|
|
|
+ var newStorageEvent = document.createEvent('StorageEvent')
|
|
|
|
|
+ const storage = {
|
|
|
|
|
+ setItem: function (k, val) {
|
|
|
|
|
+ sessionStorage.setItem(k, val)
|
|
|
|
|
+ // 初始化创建的事件
|
|
|
|
|
+ newStorageEvent.initStorageEvent('setItem', false, false, k, null, val, null, null)
|
|
|
|
|
+ // 派发对象
|
|
|
|
|
+ window.dispatchEvent(newStorageEvent)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return storage.setItem(key, newVal)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+Vue.use(Vant)
|
|
|
|
|
+// Vue.use(watercom);
|
|
|
|
|
+Vue.use(VueEasytable)
|
|
|
|
|
+Vue.use(globals)
|
|
|
|
|
+Vue.use(VCalendar, {
|
|
|
|
|
+ componentPrefix: 'vc' // Use <vc-calendar /> instead of <v-calendar />
|
|
|
|
|
+})
|
|
|
new Vue({
|
|
new Vue({
|
|
|
el: '#app',
|
|
el: '#app',
|
|
|
router,
|
|
router,
|