| | |
| | | |
| | | <template> |
| | | <view :class="['c-home-nav', 'col-'+layout]"> |
| | | <view |
| | | class="c-home-nav-title" |
| | | v-if="title" |
| | | >{{title}}</view> |
| | | <view class="c-home-nav-content"> |
| | | <slot /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | type: String, |
| | | default: 'two', |
| | | }, |
| | | // 群组标题 |
| | | title: String, |
| | | }, |
| | | methods: {}, |
| | | }; |
| | |
| | | @import "../../common/sassMixin"; |
| | | |
| | | .c-home-nav { |
| | | width: 100%; |
| | | margin-bottom: 20px; |
| | | .c-home-nav-title { |
| | | width: 100%; |
| | | color: #666; |
| | | text-align: center; |
| | | background-color: #fff; |
| | | border-top: #e2e2e2 1PX solid; |
| | | } |
| | | .c-home-nav-content { |
| | | width: 100%; |
| | | } |
| | | &.col-two { |
| | | .c-home-nav-content { |
| | | @include clearfix; |
| | | } |
| | | .c-home-item { |
| | | float: left; |
| | | width: 50%; |
| | |
| | | } |
| | | } |
| | | &.col-three { |
| | | width: 100%; |
| | | .c-home-nav-content { |
| | | @include flexbox(flex, flex-start center, n wrap); |
| | | } |
| | | .c-home-item { |
| | | width: 33.3%; |
| | | height: 246px; |
| | |
| | | &:active { |
| | | background-color: #f2f2f2; |
| | | } |
| | | &:nth-child(1) { |
| | | border-top: #e2e2e2 1PX solid; |
| | | } |
| | | &:nth-child(2) { |
| | | border-top: #e2e2e2 1PX solid; |
| | | } |
| | | &:nth-child(3) { |
| | | border-top: #e2e2e2 1PX solid; |
| | | } |
| | | &:nth-child(3n+3) { |
| | | border-right: none; |
| | | } |