123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <template>
- <div class="video-list">
- <nuxt-link class="video-list-title" :to="link">
- <div class="video-list-title-text">{{ videoCategory.category.name }}</div>
- <div class="video-list-title-link">
- <div class="button button_video-transparent">
- <BaseIcon name="play" />
- </div>
- </div>
- </nuxt-link>
- <div class="video-list-items">
- <VueSlickCarousel v-bind="settings" v-if="videoCategory.news.length">
- <div
- class="video-list-item-wrapper"
- v-for="item in this.videoCategory.news.slice(0, 15)"
- :key="item.id"
- >
- <VideoItem :item="item"></VideoItem>
- </div>
- <template #prevArrow="arrowOption">
- <button
- class="
- video-slider-control
- button_video-slider button_video-slider-prev
- "
- >
- <BaseIcon name="h-slider-prev" clear />
- </button>
- </template>
- <template #nextArrow="arrowOption">
- <button
- class="
- video-slider-control
- button_video-slider button_video-slider-next
- "
- >
- <BaseIcon name="h-slider-next" clear />
- </button>
- </template>
- </VueSlickCarousel>
- </div>
- </div>
- </template>
- <script>
- import VueSlickCarousel from "vue-slick-carousel";
- export default {
- components: {
- VueSlickCarousel,
- },
- props: {
- videoCategory: {
- type: Object,
- required: true,
- },
- },
- data: () => ({
- settings: {
- draggable: true,
- dots: true,
- arrows: true,
- slidesToShow: 3,
- slidesToScroll: 3,
- responsive: [
- {
- breakpoint: 900,
- settings: {
- slidesToShow: 2,
- },
- },
- {
- breakpoint: 768,
- settings: {
- slidesToShow: 1,
- },
- },
- ],
- },
- }),
- computed: {
- link() {
- return {
- name: "video-category",
- params: {
- category: this.videoCategory.category.alias,
- },
- };
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .video-list {
- &-title {
- display: flex;
- align-items: center;
- cursor: pointer;
- position: relative;
- &-text {
- color: #fff;
- font-size: 24px;
- font-weight: bold;
- }
- &-link {
- margin-left: 15px;
- }
- }
- &-items {
- margin-top: 28px;
- padding-bottom: 28px;
- }
- }
- ::v-deep .slick {
- &-slide {
- padding: 0 12px;
- }
- &-list {
- margin: 0 -12px;
- }
- &-dots {
- width: 100%;
- position: absolute;
- bottom: -28px;
- }
- }
- </style>
|