main.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. import store from '@/store'
  4. import VueClipboard from 'vue-clipboard2'
  5. import Avatar from '@/components/popup/avatar'
  6. import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
  7. import VueVirtualScroller from 'vue-virtual-scroller'
  8. import imgPreview from '@/components/popup/imgPreview'
  9. import packetGet from '@/components/popup/packetGet'
  10. import packetSend from '@/components/popup/packetSend'
  11. import otherInfo from '@/components/popup/otherInfo'
  12. import Info from '@/components/popup/userInfo'
  13. import TWEEN from '@tweenjs/tween.js'
  14. import Toast from '@/components/popup/toast'
  15. import i18n from '@/util/lang/lang'
  16. import { Loading } from 'element-ui'
  17. // 全局自定义插件
  18. import '@/plugins/directive'
  19. Vue.use(Avatar, store)
  20. Vue.use(VueClipboard)
  21. Vue.use(VueVirtualScroller)
  22. Vue.use(imgPreview)
  23. Vue.use(Info, store)
  24. Vue.use(otherInfo, store)
  25. Vue.use(packetGet, store)
  26. Vue.use(packetSend, store)
  27. Vue.use(Toast)
  28. Vue.use(Loading)
  29. Vue.config.productionTip = false
  30. new Vue({
  31. render: h => h(App),
  32. i18n,
  33. store
  34. }).$mount('#app')
  35. // Setup the animation loop.
  36. function animate (time) {
  37. requestAnimationFrame(animate)
  38. TWEEN.update(time)
  39. }
  40. requestAnimationFrame(animate)