Guest User

Untitled

a guest
Aug 18th, 2019
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sidebar:
  2. option1.title
  3. option2.title(if "options" exists, b-collapse is rendered here)
  4. option2.title(lack of "options", b-collapse doesn't render here )
  5. option2.title(same logic as above)
  6. option1.title
  7. option2.title(if "options" exists, b-collapse is rendered here)
  8. option2.title(lack of "options", b-collapse doesn't render here )
  9. option2.title(same logic as above)
  10.  
  11. <b-list-group :key="option1.id" v-for="option1 in category">
  12. FIRST LEVEL
  13. <b-list-group-item ><span>{{ option1.title }}</span></b-list-group-item>
  14. SECOND LEVEL
  15. <b-list-group-item v-b-toggle.collapse-1 @click.stop="toShow" class="subCategory" role="button" :key="option2.id" v-for="option2 in option1.subCategory">
  16. <!-- Подкатегории -->
  17. <a>{{ option2.title }}</a>
  18. <b-collapse id="collapse-1" v-if="typeof option2.options !=
  19. 'undefined'">
  20. <b-list-group class="d-md-none d-lg-none d-sm-block" >
  21. <ul class="list-group">
  22. THIRD LEVEL
  23. <router-link class="list-group-item" to="formProperty"
  24. :key="option3.id" v-for="option3 in option2.options">
  25. <!-- Опций -->
  26. {{ option3.title }}
  27. </router-link>
  28. </ul>
  29. </b-list-group>
  30. </b-collapse>
  31. </b-list-group-item>
  32. </b-list-group>
  33.  
  34. data(){
  35. return {
  36. category : [
  37. {
  38. "title" : "ФИЗ.ЛИЦАМ",
  39. subCategory: [
  40. {
  41. "title" : "НАЛОГИ",
  42. "options": [
  43. { "title" : 'НАЛОГ НА ИМУЩЕСТВО' },
  44. { "title" : 'НАЛОГ НА ИМУЩЕСТВО(ПЕНИ)' },
  45. { "title" : 'ЗЕМЕЛЬНЫЙ НАЛОГ' },
  46. { "title" : 'ЗЕМЕЛЬНЫЙ НАЛОГ(ПЕНИ)' },
  47. { "title" : 'СОЦИАЛЬНЫЙ НАЛОГ' },
  48. { "title" : 'СОЦИАЛЬНЫЙ НАЛОГ(ПЕНИ)' },
  49. { "title" : 'ИПН НЕОБЛАГАЕМЫЙ' },
  50. { "title" : 'ИПН НЕОБЛАГАЕМЫЙ(ПЕНИ)' },
  51. { "title" : 'ИПН ОБЛАГАЕМЫЙ' },
  52. { "title" : 'ИПН ОБЛАГАЕМЫЙ(ПЕНИ)' }
  53. ]
  54. },
  55. {
  56. "title": "ШТРАФЫ",
  57. "id": 19,
  58. "url": "/form/19"
  59. }
  60. ]
  61. }
  62. }
RAW Paste Data