河湖长app前端页面
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

4 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from './vuex/index'
  4. import router from './router'
  5. import 'element-ui/lib/theme-chalk/index.css'
  6. import ElementUI from 'element-ui';
  7. Vue.use(ElementUI);
  8. import VueWechatTitle from 'vue-wechat-title';
  9. Vue.use(VueWechatTitle)
  10. import 'babel-polyfill'
  11. import Es6Promise from 'es6-promise'
  12. require('es6-promise').polyfill()
  13. Es6Promise.polyfill()
  14. require('./assets/js/filter')
  15. import './assets/icons'
  16. Vue.config.productionTip = false
  17. import Viewer from 'v-viewer'
  18. import 'viewerjs/dist/viewer.css'
  19. import $ from 'jquery'
  20. Vue.use(Viewer, {
  21. defaultOptions: {
  22. zIndex: 9999,
  23. url: "data-source",
  24. title: true,
  25. view: function (e) {
  26. setTimeout(function () {
  27. $('.viewer-canvas img').css('height',(document.body.clientHeight-150)+'px')
  28. },100)
  29. if(e.detail.originalImage.title){
  30. $('.viewer-title').hide()
  31. $('.viewer-new-title').remove()
  32. $('.viewer-footer').prepend('<div class="viewer-new-title">'+e.detail.originalImage.title+'</div>')
  33. setTimeout(function () {
  34. $('.viewer-title').html(e.target.innerText)
  35. },100)
  36. }
  37. },
  38. }
  39. })
  40. import VueLazyload from 'vue-lazyload'
  41. Vue.use(VueLazyload, {
  42. preLoad: 1.3,
  43. error: require('./assets/img/404.jpg'),
  44. loading: require('./assets/img/loading.svg'),
  45. attempt: 1,
  46. listenEvents: ['scroll']
  47. })
  48. new Vue({
  49. el: '#app',
  50. store,
  51. router,
  52. render: h => h(App)
  53. })