main.js 2.0 KB

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