main.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import Vue from 'vue';
  2. import App from './App.vue';
  3. import store from './store';
  4. import router from './router';
  5. import permission from './permission';
  6. import '@/assets/styles/index.css';
  7. import {
  8. parseTime,
  9. selectDictLabelu,
  10. selectDictLabel,
  11. selectDictLabels,
  12. CJ02BD,
  13. twoPointSum,
  14. parseTimeParagraph,
  15. Micrometer,
  16. weeklyTimeDivision,
  17. gcj02BD,
  18. verifyStoreType,
  19. } from '@/utils/index';
  20. import { toastLoading } from '@/utils/commonVant';
  21. import '@vant/touch-emulator';
  22. Vue.config.productionTip = false;
  23. import Vant from 'vant';
  24. import { Toast, Notify } from 'vant';
  25. import 'vant/lib/index.css';
  26. import ClipboardJS from 'clipboard';
  27. Vue.use(Vant);
  28. import ElTable from 'element-ui/lib/table';
  29. import 'element-ui/lib/theme-chalk/table.css';
  30. import 'element-ui/lib/theme-chalk/icon.css';
  31. import ElTableColumn from 'element-ui/lib/table-column';
  32. import ElPopover from 'element-ui/lib/popover';
  33. import 'element-ui/lib/theme-chalk/table-column.css';
  34. import 'element-ui/lib/theme-chalk/popover.css';
  35. import Vconsole from 'vconsole';
  36. // import wx from 'weixin-js-sdk';
  37. Vue.use(ElTable);
  38. Vue.use(ElTableColumn);
  39. Vue.use(ElPopover);
  40. Vue.config.productionTip = false;
  41. Vue.prototype.parseTime = parseTime;
  42. Vue.prototype.selectDictLabel = selectDictLabel;
  43. Vue.prototype.selectDictLabels = selectDictLabels;
  44. Vue.prototype.selectDictLabelu = selectDictLabelu;
  45. Vue.prototype.weeklyTimeDivision = weeklyTimeDivision;
  46. Vue.prototype.toastLoading = toastLoading;
  47. Vue.prototype.CJ02BD = CJ02BD;
  48. Vue.prototype.gcj02BD = gcj02BD;
  49. Vue.prototype.twoPointSum = twoPointSum;
  50. Vue.prototype.wx = wx;
  51. Vue.prototype.parseTimeParagraph = parseTimeParagraph;
  52. Vue.prototype.Micrometer = Micrometer;
  53. Vue.prototype.verifyStoreType = verifyStoreType;
  54. Vue.prototype.Toast = Toast;
  55. Vue.prototype.notify = Notify;
  56. var clipboard = new ClipboardJS('.btn');
  57. clipboard.on('success', function (e) {
  58. Toast('编码复制成功!');
  59. });
  60. clipboard.on('error', function (e) {
  61. Toast('编码复制失败!');
  62. });
  63. const isProd = process.env.NODE_ENV !== 'production';
  64. if (isProd) {
  65. const vConsole = new Vconsole();
  66. Vue.use(vConsole);
  67. }
  68. new Vue({
  69. router,
  70. store,
  71. render: (h) => h(App),
  72. }).$mount('#app');