left.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <div class="help-list">
  3. <h2>帮助中心</h2>
  4. <ul class="list-unstyled" style="margin-top: 10px;">
  5. <li v-for="nav01 in helps">
  6. <a :class="{'cur': nav01.isHide}" @click="toggleNav(nav01)"><span>{{nav01.item}}</span></a>
  7. <ul class="list-unstyled list-body" v-if="!nav01.isHide">
  8. <li v-for="nav02 in nav01.children">
  9. <nuxt-link :to="`/help/helpList/${nav02.id}`"><span v-text="nav02.item"></span></nuxt-link>
  10. </li>
  11. </ul>
  12. </li>
  13. </ul>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'left',
  19. data () {
  20. return {
  21. navShow: { 122: false }
  22. }
  23. },
  24. computed: {
  25. helps () {
  26. return this.$store.state.help.snapsho.data
  27. }
  28. },
  29. methods: {
  30. toggleNav (nav) {
  31. nav.isHide = !nav.isHide
  32. }
  33. }
  34. }
  35. </script>
  36. <style>
  37. .help-list{
  38. width: 200px;
  39. background: #fff;
  40. border: #e8e8e8 1px solid;
  41. }
  42. .help-list h2{
  43. background: #5078cb;
  44. line-height: 34px;
  45. height: 34px;
  46. color: #fff;
  47. font-size: 14px;
  48. text-align: center;
  49. margin: 0;
  50. }
  51. .help-list ul{
  52. width: 200px;
  53. display: inline-block;
  54. }
  55. .help-list li {
  56. position: relative;
  57. line-height: 33px;
  58. font-size: 14px;
  59. color: #333;
  60. float: left;
  61. width: 100%;
  62. padding-left: 10px;
  63. }
  64. .help-list li a {
  65. display: block;
  66. padding-left: 15px;
  67. text-decoration: none;
  68. color: #333;
  69. }
  70. .help-list li a:hover{
  71. color: #5078cb;
  72. cursor: pointer;
  73. }
  74. .help-list ul.list-body {
  75. /*display: none;*/
  76. color: #666;
  77. }
  78. .help-list ul.list-body.active {
  79. display: block;
  80. }
  81. .help-list ul.list-body li {
  82. float: none;
  83. background-image: none;
  84. min-height: 26px;
  85. line-height: 26px;
  86. font-size: 12px;
  87. }
  88. .help-list ul.list-body li a {
  89. padding-left: 15px;
  90. display: block;
  91. color: rgb(50,50,50);
  92. background: none;
  93. }
  94. .help-list ul.list-body li a:hover {
  95. color: #5078cb;
  96. cursor: pointer;
  97. }
  98. .help-list ul.list-body li a.cur,.help-list ul li a.cur{
  99. text-decoration: none;
  100. font-size: 14px;
  101. }
  102. .help-list .operate-icon {
  103. position: absolute;
  104. right: 20px;
  105. top: 1px;
  106. }
  107. .help-list li>ul>li>ul>li {
  108. padding-left: 30px;
  109. }
  110. </style>