main.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 ElProgress from 'element-ui/lib/progress';
  37. import 'element-ui/lib/theme-chalk/progress.css';
  38. import ElDialog from 'element-ui/lib/dialog';
  39. import 'element-ui/lib/theme-chalk/dialog.css';
  40. import directive from './directive'; // directive
  41. // import wx from 'weixin-js-sdk';
  42. // jenkins 测试打包前先合并
  43. Vue.use(ElTable);
  44. Vue.use(ElTableColumn);
  45. Vue.use(ElPopover);
  46. Vue.use(ElProgress);
  47. Vue.use(ElDialog);
  48. Vue.config.productionTip = false;
  49. Vue.prototype.parseTime = parseTime;
  50. Vue.prototype.selectDictLabel = selectDictLabel;
  51. Vue.prototype.selectDictLabels = selectDictLabels;
  52. Vue.prototype.selectDictLabelu = selectDictLabelu;
  53. Vue.prototype.weeklyTimeDivision = weeklyTimeDivision;
  54. Vue.prototype.toastLoading = toastLoading;
  55. Vue.prototype.CJ02BD = CJ02BD;
  56. Vue.prototype.gcj02BD = gcj02BD;
  57. Vue.prototype.twoPointSum = twoPointSum;
  58. Vue.prototype.wx = wx;
  59. Vue.prototype.parseTimeParagraph = parseTimeParagraph;
  60. Vue.prototype.Micrometer = Micrometer;
  61. Vue.prototype.verifyStoreType = verifyStoreType;
  62. Vue.prototype.Toast = Toast;
  63. Vue.prototype.notify = Notify;
  64. var clipboard = new ClipboardJS('.btn');
  65. clipboard.on('success', function (e) {
  66. Toast('编码复制成功!');
  67. });
  68. clipboard.on('error', function (e) {
  69. Toast('编码复制失败!');
  70. });
  71. const isProd = process.env.NODE_ENV !== 'production';
  72. if (isProd) {
  73. const vConsole = new Vconsole();
  74. Vue.use(vConsole);
  75. }
  76. Vue.use(directive);
  77. new Vue({
  78. router,
  79. store,
  80. render: (h) => h(App),
  81. }).$mount('#app');