123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <template>
- <div class="video-list">
- <nuxt-link class="video-list-title" :to="link">
- <div class="video-list-title-text">{{ podcast.category.name }}</div>
- <div class="video-list-title-link">
- <div class="button button_podcast-transparent">
- <BaseIcon name="play" />
- </div>
- </div>
- </nuxt-link>
- <div class="video-list-items">
- <VueSlickCarousel v-bind="settings" v-if="podcast.news.length">
- <div
- class="video-list-item-wrapper"
- v-for="item in this.podcast.news.slice(0, 15)"
- :key="item.id"
- >
- <PodcastItem :item="item"></PodcastItem>
- </div>
- <template #prevArrow="arrowOption">
- <button
- class="
- video-slider-control
- button_podcast-slider button_video-slider button_video-slider-prev
- "
- >
- <BaseIcon name="h-slider-prev" clear />
- </button>
- </template>
- <template #nextArrow="arrowOption">
- <button
- class="
- video-slider-control
- button_podcast-slider 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: {
- podcast: {
- 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: "podcasts-category",
- params: {
- category: this.podcast.category.alias,
- },
- };
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .video-list {
- &-title {
- display: flex;
- align-items: center;
- cursor: pointer;
- &-text {
- color: #000;
- font-size: 24px;
- font-weight: bold;
- }
- &-link {
- margin-left: 15px;
- }
- }
- &-items {
- margin-top: 28px;
- padding-bottom: 28px * 2;
- }
- }
- ::v-deep .slick {
- &-slide {
- padding: 0 12px;
- }
- &-list {
- margin: 0 -12px;
- }
- &-dots {
- width: 100%;
- position: absolute;
- bottom: -28px;
- button {
- background-color: #000;
- };
- .slick-active{
- button {
- background-color: #000;
- };
- }
- }
- }
- </style>
|