Guest User

Untitled

a guest
Jan 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <template>
  2. <div class="external">
  3. <div @click="sendMyProps" class="internal">
  4. ...
  5. </div>
  6. </div>
  7. </template>
  8.  
  9. methods: {
  10. sendMyProps () {
  11. this.$router.push({ name: 'destiny', params: { menu: 'destiny' }})
  12. },
  13.  
  14. <template>
  15. <div>
  16. <External></External>
  17. <AnotherOne></AnotherOne>
  18. <AnotherTwo></AnotherTwo>
  19. </div>
  20. </template>
  21.  
  22. <script>
  23. import External from '@/components/External'
  24. import AnotherOne from '@/components/AnotherOne'
  25. import AnotherTwo from '@/components/AnotherTwo'
  26.  
  27.  
  28. export default {
  29. name: 'Main',
  30. components: {
  31. External ,
  32. AnotherOne,
  33. AnotherTwo,
  34. }
  35. }
  36. </script>
  37.  
  38. {
  39. path: '/destiny',
  40. name: 'destiny',
  41. components: {
  42. default: Destiny,
  43. header: Header,
  44. footer: Footer
  45. },
  46. props: true
  47. }
  48.  
  49. <template>
  50.  
  51. <div class="finalComponent">
  52. <span @click="active = 'destiny'" :class="{ active: active ==='destiny' }">destiny</span>
  53. <span @click="active = 'blabla'" :class="{ active: active ==='blabla' }">ASpan</span>
  54. ...
  55. </template>
  56.  
  57. <script>
  58. import { mapGetters, mapActions } from 'vuex'
  59. ...
  60.  
  61. export default {
  62. created () {
  63. this.aMethod()
  64.  
  65. },
  66. mounted () {
  67. this.active = this.$props.menu
  68. },
  69. ...
  70. props: {
  71. menu: {
  72. type: String,
  73. required: true,
  74. default: 'house'
  75. }
  76. }
  77. }
  78. </script>
Add Comment
Please, Sign In to add comment