LeftContent.vue 812 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template lang="html">
  2. <div
  3. :id="id"
  4. :class="{opened: isopened}"
  5. >
  6. <FlagCollection v-if='openedCollid' :collection='flagcolls[openedCollid]'/>
  7. </div>
  8. </template>
  9. <script>
  10. import { mapState, mapActions } from 'vuex'
  11. import { MA } from 'vuejs/api/ma-axios'
  12. import router from 'vuejs/route'
  13. import FlagCollection from 'vuejs/components/User/FlagCollection'
  14. export default {
  15. router,
  16. props:['id'],
  17. data() {
  18. return {
  19. // isOpened: false
  20. }
  21. },
  22. computed: {
  23. ...mapState({
  24. flagcolls: state => state.User.flagcolls,
  25. openedCollid: state => state.User.openedCollid
  26. }),
  27. isopened () {
  28. return this.openedCollid
  29. }
  30. },
  31. beforeMount() {
  32. },
  33. methods: {
  34. },
  35. components: {
  36. FlagCollection
  37. }
  38. }
  39. </script>
  40. <style lang="scss" scoped>
  41. </style>