123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- <template>
- <div class="swiper">
- <el-carousel :interval="933993" height="300px" indicator-position="outside" @change="change_fun">
- <el-carousel-item>
- <div
- class="shop_li_img_1 clearfix"
- :class="per_index == 2 ? 'shop_li_img_1_hot' : ''"
- v-for="item in props.data"
- >
- <nuxtLink
- :to="getShopPathDetail1(item)"
- class="shop_li_img_1_a"
- :title="item.name"
- >
- <img class="shop_li_img_1_img" :src="item.imgurl" alt="item.name">
- <div class="shop_li_img_1_dot2 dot2">
- {{ item.name }}
- </div>
- <div class="shop_li_img_1_price">{{getShopType(item)}}</div>
- </nuxtLink>
- </div>
- </el-carousel-item>
- <el-carousel-item>
- <div
- class="shop_li_img_1 clearfix"
- :class="per_index == 2 ? 'shop_li_img_1_hot' : ''"
- v-for="item in props.data2"
- >
- <nuxtLink
- :to="getShopPathDetail1(item)"
- class="shop_li_img_1_a"
- :title="item.name"
- >
- <img class="shop_li_img_1_img" :src="item.imgurl" alt="item.name">
- <div class="shop_li_img_1_dot2 dot2">
- {{ item.name }}
- </div>
- <div class="shop_li_img_1_price">{{getShopType(item)}}</div>
- </nuxtLink>
- </div>
- </el-carousel-item>
- <el-carousel-item>
- <div
- class="shop_li_img_1 clearfix"
- :class="per_index == 2 ? 'shop_li_img_1_hot' : ''"
- v-for="item in props.data3"
- >
- <nuxtLink
- :to="getShopPathDetail1(item)"
- class="shop_li_img_1_a"
- :title="item.name"
- >
- <img class="shop_li_img_1_img" :src="item.imgurl" alt="item.name">
- <div class="shop_li_img_1_dot2 dot2">
- {{ item.name }}
- </div>
- <div class="shop_li_img_1_price">{{getShopType(item)}}</div>
- </nuxtLink>
- </div>
- </el-carousel-item>
- </el-carousel>
- </div>
- </template>
- <script setup>
- //1.页面必备方法 start ---------------------------------------->
- import { ElCarousel, ElCarouselItem } from 'element-plus'
- import { ref } from 'vue'
- const roll_num_lang = ref(3);
- const roll_num_this = ref(0);
- const change_fun = (the_1) => {
- roll_num_this.value = the_1
- }
- //1.页面必备方法 end ---------------------------------------->
- //2.组件数据 start ---------------------------------------->
- const props = defineProps({
- data: {
- type: Array,
- default: () => []
- },
- data2: {
- type: Array,
- default: () => []
- },
- data3: {
- type: Array,
- default: () => []
- }
- })
- //2.组件数据 end ---------------------------------------->
- </script>
- <style lang="less" scoped>
- .dot2 {
- overflow: hidden;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- }
- .shop_li_img_1 {
- float: left;
- width: 150px;
- position: relative;
- margin: 45px 14px 8px;
- }
- .shop_li_img_1_img {
- display: block;
- width: 100%;
- height: 150px !important;
- }
- .shop_li_img_1_dot2 {
- height: 36px !important;
- line-height: 18px;
- color: #333;
- font-size: 14px;
- margin: 7px auto 6px;
- width: 140px;
- }
- .shop_li_img_1_price {
- text-align: center;
- height: 21px;
- line-height: 21px;
- color: #A01C0E;
- font-size: 18px;
- width: 140px;
- margin: 0px auto 0px;
- font-weight: bold;
- }
- .shop_li_img_1_hot::after {
- content: '';
- display: block;
- position: absolute;
- width: 35px;
- height: 25px;
- left: 10px;
- top: 0px;
- z-index: 11;
- background: url(../../public/img/11.png) no-repeat left 0px;
- background-size: 100% 100%;
- }
- .shop_li_img_1:hover .shop_li_img_1_dot2 {
- color: #A01C0E;
- }
- .roll_num_box {
- position: absolute;
- z-index: 2;
- left: 60px;
- bottom: 0px;
- height: 60px;
- line-height: 60px;
- color: #fff;
- font-size: 16px;
- .roll_num_box_new {
- font-size: 20px;
- }
- }
- .dot1 {
- display: block;
- word-break: keep-all;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .swiper {
- width: 100%;
- height: 405px;
- position: relative;
- img {
- width: 100%;
- height: 405px;
- }
- .swiper_dot1 {
- display: block;
- width: 100%;
- line-height: 60px;
- height: 60px;
- color: red;
- font-size: 18px;
- text-indent: 20px;
- position: absolute;
- bottom: 0;
- left: 0;
- z-index: 10;
- box-sizing: border-box;
- padding: 0 144px;
- background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 33%, rgba(0, 0, 0, 0) 100%);
- }
- }
- .swiper {
- height: 300px;
- }
- .el-carousel {
- /deep/.el-carousel__indicators--outside {
- margin-top: -35px;
- }
- /deep/.el-carousel__arrow--right {
- width: 35px;
- height: 57px;
- color: #fff;
- background: rgba(0, 0, 0, 0);
- position: absolute;
- right: 9;
- border: none;
- border-radius: 0;
- top: 100%;
- margin-top: -28px;
- }
- /deep/ .el-carousel__indicators {
- // 指示器
- left: unset;
- transform: unset;
- right: 10px;
- bottom: 11px;
- }
- /deep/ .el-carousel__button {
- // 指示器按钮
- width: 10px;
- height: 10px;
- border: none;
- border-radius: 5px;
- background: #EDCEA2;
- opacity: .5;
- }
- /deep/ .is-active .el-carousel__button {
- // 指示器激活按钮
- background: #EDCEA2;
- opacity: 1;
- }
- /deep/ .el-carousel__container {
- height: 100%;
- }
- }
- .custom-indicator button {
- background-color: #fff;
- opacity: 1;
- width: 8px;
- height: 8px;
- }
- .custom-indicator button.is-active {
- background-color: #DD7D18;
- width: 58px;
- opacity: 1;
- }
- </style>
|