天波h5前端应用
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

main.js 1.9KB

3 lat temu
3 lat temu
3 lat temu
3 lat temu
3 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /*
  2. * @Date: 2022-01-19 10:08:26
  3. * @LastEditors: JinxChen
  4. * @LastEditTime: 2023-02-26 14:40:46
  5. * @FilePath: \TelpoH5FrontendWeb\src\main.js
  6. * @description:
  7. */
  8. import Vue from "vue";
  9. import 'amfe-flexible/index.js';
  10. import App from "./App.vue";
  11. import router from "./router";
  12. import store from "./store";
  13. import '@/assets/css/reset.scss';
  14. import dayjs from 'dayjs';
  15. // ui库按需引入
  16. import 'vant/lib/index.css';
  17. import {
  18. Button,
  19. Calendar,
  20. Cell,
  21. CellGroup,
  22. Checkbox,
  23. CheckboxGroup,
  24. Col,
  25. DatetimePicker,
  26. Dialog,
  27. Divider,
  28. Empty,
  29. Field,
  30. Form,
  31. Icon,
  32. Image,
  33. Lazyload,
  34. List,
  35. Loading,
  36. NavBar,
  37. NoticeBar,
  38. Notify,
  39. Overlay,
  40. Picker,
  41. Popup,
  42. PullRefresh,
  43. Radio,
  44. RadioGroup,
  45. Row,
  46. Slider,
  47. Swipe,
  48. SwipeCell,
  49. SwipeItem,
  50. Switch,
  51. Tab,
  52. Tabbar,
  53. TabbarItem,
  54. Tabs,
  55. Toast,
  56. } from 'vant'; //按需加载vant组件
  57. Vue
  58. .use(Button)
  59. .use(Calendar)
  60. .use(Checkbox)
  61. .use(CheckboxGroup)
  62. .use(Cell)
  63. .use(CellGroup)
  64. .use(Col)
  65. .use(DatetimePicker)
  66. .use(Dialog)
  67. .use(Divider)
  68. .use(Empty)
  69. .use(Icon)
  70. .use(Image)
  71. .use(Form)
  72. .use(Field)
  73. .use(Lazyload)
  74. .use(List)
  75. .use(Loading)
  76. .use(NavBar)
  77. .use(NoticeBar)
  78. .use(Notify)
  79. .use(Overlay)
  80. .use(Picker)
  81. .use(Popup)
  82. .use(PullRefresh)
  83. .use(Radio)
  84. .use(RadioGroup)
  85. .use(Row)
  86. .use(Slider)
  87. .use(Swipe)
  88. .use(SwipeCell)
  89. .use(SwipeItem)
  90. .use(Switch)
  91. .use(Tab)
  92. .use(Tabbar)
  93. .use(TabbarItem)
  94. .use(Tabs)
  95. .use(Toast)
  96. Vue.config.productionTip = false;
  97. Vue.config.devtools = true;
  98. // 全局配置 loading
  99. Toast.setDefaultOptions('success', {
  100. duration: 1500,
  101. forbidClick: true,
  102. });
  103. Toast.setDefaultOptions('loading', {
  104. duration: 0,
  105. forbidClick: true,
  106. });
  107. Dialog.setDefaultOptions({
  108. confirmButtonColor: "#3296fa",
  109. showCancelButton: false,
  110. });
  111. Vue.config.productionTip = false;
  112. Vue.prototype.$dayjs = dayjs;
  113. Vue.prototype.$bus = new Vue();
  114. new Vue({
  115. router,
  116. store,
  117. render: (h) => h(App),
  118. }).$mount("#app");