You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0 KiB

1 year ago
  1. import App from './App.vue'
  2. import router from './router'
  3. import store from './store'
  4. import i18n from './lang';
  5. import http from "@/api/axios";
  6. import VueClipBoard from 'vue-clipboard2'
  7. import JsonExcel from 'vue-json-excel'
  8. import '@/style/index.less'
  9. Vue.component('downloadExcel', JsonExcel)
  10. import md5 from 'js-md5';
  11. import moment from 'moment';
  12. import myModal from '@/components/myModal.vue';
  13. Vue.component('my-modal', myModal);
  14. Vue.prototype.$moment = moment;
  15. Vue.prototype.$md5 = md5;
  16. Vue.use(VueClipBoard)
  17. Vue.config.productionTip = false;
  18. Vue.prototype.$http = http;
  19. Vue.prototype.ellipsisByLength = function (str, length = 4, flag = true) {
  20. return str.length > 2 * length && flag
  21. ? `${str.slice(0, length)}...${str.slice(-length)}`
  22. : str;
  23. }
  24. Vue.prototype.ellipsisByLength12 = function (str, length = 10, flag = true) {
  25. return str.length > 2 * length && flag
  26. ? `${str.slice(0, length)}...${str.slice(-length)}`
  27. : str;
  28. }
  29. new Vue({
  30. router,
  31. store,
  32. i18n,
  33. render: h => h(App)
  34. }).$mount('#app')