GlobCoolLightBox.vue 973 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template lang="html">
  2. <CoolLightBox
  3. :items="coolLightBoxItems"
  4. :index="coolLightBoxIndex"
  5. srcName="url"
  6. :loop="true"
  7. :fullscreen="true"
  8. @close="setcoolLightBoxIndex(null)">
  9. </CoolLightBox>
  10. </template>
  11. <script>
  12. import { mapState, mapActions } from 'vuex'
  13. // import MA from 'vuejs/api/ma-axios'
  14. import router from 'vuejs/route'
  15. import CoolLightBox from 'vue-cool-lightbox'
  16. import 'vue-cool-lightbox/dist/vue-cool-lightbox.min.css'
  17. export default {
  18. router,
  19. // props:[],
  20. data() {
  21. return {
  22. // isOpened: false
  23. }
  24. },
  25. computed: {
  26. ...mapState({
  27. coolLightBoxItems: state => state.Common.coolLightBoxItems,
  28. coolLightBoxIndex: state => state.Common.coolLightBoxIndex,
  29. })
  30. },
  31. beforeMount() {
  32. },
  33. methods: {
  34. ...mapActions({
  35. setcoolLightBoxIndex: 'Common/setcoolLightBoxIndex'
  36. }),
  37. },
  38. components: {
  39. CoolLightBox
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. </style>