main.js 2.1 KB

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