main.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import Vue from 'vue'
  2. import App from './App'
  3. import cuCustom from './colorui/components/cu-custom.vue'
  4. Vue.component('cu-custom',cuCustom)
  5. import sunUiPassword from './sunui-password/sunui-password.vue'
  6. Vue.component('sunui-password',sunUiPassword);
  7. Vue.config.productionTip = false
  8. import store from './common/store.js';
  9. App.mpType = 'app'
  10. import Dataprocessing from './common/dataprocessing.js';
  11. Vue.prototype.dataprocessing=Dataprocessing;
  12. import Common from './common/common.js';
  13. Vue.prototype.common = Common;
  14. import initial from './components/mine/addressBook/InitializeThe.vue'
  15. Vue.component('initial',initial)
  16. Vue.prototype.getTimeFormat = function(){
  17. Date.prototype.Format = function(fmt) {
  18. var o = {
  19. 'y+': this.getYear() + 1, //年
  20. 'M+': this.getMonth() + 1, //月份
  21. 'd+': this.getDate(), //日
  22. 'h+': this.getHours(), //小时
  23. 'm+': this.getMinutes(), //分
  24. 's+': this.getSeconds(), //秒
  25. 'q+': Math.floor((this.getMonth() + 3) / 3), //季度
  26. S: this.getMilliseconds() //毫秒
  27. };
  28. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
  29. for (var k in o)
  30. if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[
  31. k]).substr(('' + o[k]).length));
  32. return fmt;
  33. };
  34. }
  35. const app = new Vue({
  36. store,
  37. ...App
  38. })
  39. app.$mount()