| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597 |
- <template>
- <div>
- <!--样式1-->
- <div class="bannerSwiperStyle1" v-if="this.$store.state.template.editWebsiteClass==1">
- <el-carousel :interval="3333" height="405px" indicator-position="none" arrow="always" @change="change_fun">
- <el-carousel-item v-for="item in imagelist" :key="item.id">
- <img src="https://img.bjzxtw.org.cn/master/image/jpeg/20251218/1766035561390591.jpg">
- <span class="swiper_dot1 dot1">
- {{ item.title }}
- </span>
- </el-carousel-item>
- <div class="roll_num_box">
- <span class="roll_num_box_new">{{ roll_num_this + 1 }}</span>/{{ roll_num_lang }}
- </div>
- </el-carousel>
- </div>
- <!--样式2-->
- <div class="bannerSwiperStyle2" v-if="this.$store.state.template.editWebsiteClass==2">
- <el-carousel :interval="3333" height="405px" indicator-class="custom-indicator" @change="change_fun" trigger="click">
- <el-carousel-item v-for="item in imagelist" :key="item.id">
- <img src="https://img.bjzxtw.org.cn/master/image/jpeg/20251218/1766035561390591.jpg">
- <span class="swiper_dot1 dot1">
- {{ item.title }}
- </span>
- </el-carousel-item>
- </el-carousel>
- </div>
- <!--样式3-->
- <div class="bannerSwiperStyle3" v-if="this.$store.state.template.editWebsiteClass==3">
- <el-carousel :interval="3333" height="405px" indicator-class="custom-indicator" @change="change_fun" trigger="click">
- <el-carousel-item v-for="item in imagelist" :key="item.id">
- <img src="https://img.bjzxtw.org.cn/master/image/jpeg/20251218/1766035561390591.jpg">
- <span class="swiper_dot1 dot1">
- {{ item.title }}
- </span>
- </el-carousel-item>
- </el-carousel>
- </div>
- <!--样式4-->
- <div class="bannerSwiperStyle4" v-if="this.$store.state.template.editWebsiteClass==4">
- <el-carousel :interval="3333" height="405px" indicator-class="custom-indicator" @change="change_fun" trigger="click">
- <el-carousel-item v-for="item in imagelist" :key="item.id">
- <img src="https://img.bjzxtw.org.cn/master/image/jpeg/20251218/1766035561390591.jpg">
- <span class="swiper_dot1 dot1">
- {{ item.title }}
- </span>
- </el-carousel-item>
- </el-carousel>
- </div>
- <!--样式5-->
- <div class="bannerSwiperStyle5" v-if="this.$store.state.template.editWebsiteClass==5">
- <el-carousel :interval="3333" height="405px" indicator-position="none" arrow="always" @change="change_fun">
- <el-carousel-item v-for="item in imagelist" :key="item.id">
- <img src="https://img.bjzxtw.org.cn/master/image/jpeg/20251218/1766035561390591.jpg">
- <span class="swiper_dot1 dot1">
- {{ item.title }}
- </span>
- </el-carousel-item>
- <div class="roll_num_box">
- <span class="roll_num_box_new">{{ roll_num_this + 1 }}</span>/{{ roll_num_lang }}
- </div>
- </el-carousel>
- </div>
- </div>
- </template>
- <script>
- import '@/styles/theme/body/index/banner/style1.less';
- export default {
- props: {
- dataSort: {
- type: Number,
- default: 0
- }
- },
- data() {
- return {
- roll_num_this: 0,
- roll_num_lang: 3,
- imagelist: [
- {
- id: 1,
- title: '香港海洋公园为大熊猫“盈盈”“家姐”“细佬”搬新居迎宾客'
- },
- {
- id: 2,
- title: '香港海洋公园为大熊猫“盈盈”“家姐”“细佬”搬新居迎宾客'
- },
- {
- id: 3,
- title: '香港海洋公园为大熊猫“盈盈”“家姐”“细佬”搬新居迎宾客'
- },
- ]
- };
- },
- methods: {
- change_fun(the_1) {
- this.roll_num_this = the_1
- }
- },
- mounted() {
- },
- };
- </script>
- <style scoped lang="less">
- //基本样式
- .bannerSwiperStyle1 {
- position: relative;
- .roll_num_box {
- position: absolute;
- z-index: 2;
- left: 60px;
- bottom: 5px;
- 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_dot1 {
- display: block;
- width: 100%;
- line-height: 60px;
- height: 60px;
- color: #fff;
- 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%);
- }
- .el-carousel {
- /deep/.el-carousel__arrow i {
- font-size: 33px !important;
- }
- .roll_1_box {
- position: relative;
- }
- /deep/.el-carousel__arrow--left {
- position: absolute;
- width: 35px;
- height: 57px;
- color: #fff;
- background: rgba(0, 0, 0, 0);
- left: 9px;
- border: none;
- border-radius: 0;
- top: 100%;
- margin-top: -36px;
- }
- /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: -36px;
- }
- /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: #fff;
- opacity: 1;
- }
- /deep/ .is-active .el-carousel__button {
- // 指示器激活按钮
- background: #255590;
- width: 25px;
- 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: #c82200;
- width: 58px;
- opacity: 1;
- }
- }
- //样式2
- .bannerSwiperStyle2 {
- width: 100%;
- height: 405px;
- position: relative;
- img {
- width: 100%;
- height: 405px;
- }
- .swiper_dot1 {
- display: block;
- width: 100%;
- line-height: 60px;
- height: 60px;
- color: #fff;
- font-size: 24px;
- text-indent: 20px;
- position: absolute;
- bottom: 0;
- left: 0;
- z-index: 10;
- box-sizing: border-box;
- padding-right: 244px;
- background:linear-gradient(0deg,rgba(0,0,0,0.5) 33%,rgba(0,0,0,0) 100%);
- }
- .el-carousel {
- /deep/.el-carousel__arrow i {
- font-size: 16px !important;
- }
- /deep/.el-carousel__arrow--left {
- left: 20px;
- width: 36px;
- height: 36px;
- color: #eee;
- background: rgba(0,0,0,0.5);
- border-radius: 50%;
- position: absolute;
- border: none;
- border-radius: 50%;
- }
- /deep/.el-carousel__arrow--right {
- right: 20px;
- width: 36px;
- height: 36px;
- color: #eee;
- background: rgba(0,0,0,0.5);
- position: absolute;
- border: none;
- border-radius: 50%;
- }
- /deep/ .el-carousel__indicators {
- // 指示器
- left: unset;
- transform: unset;
- right: 10px;
- bottom: 11px;
- }
- /deep/ .el-carousel__button {
- // 指示器按钮
- width: 10px;
- height: 10px;
- border: none;
- background: #fff;
- opacity: 1;
- }
- /deep/ .is-active .el-carousel__button {
- // 指示器激活按钮
- background: #A91B33;
- width: 10px;
- height: 10px;
- 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;
- }
- }
- //样式3
- .bannerSwiperStyle3 {
- width: 100%;
- height: 405px;
- position: relative;
- img {
- width: 100%;
- height: 405px;
- }
- .swiper_dot1 {
- display: block;
- width: 100%;
- line-height: 60px;
- height: 60px;
- color: #fff;
- font-size: 24px;
- text-indent: 20px;
- position: absolute;
- bottom: 0;
- left: 0;
- z-index: 10;
- box-sizing: border-box;
- padding-right: 244px;
- background:linear-gradient(0deg,rgba(0,0,0,0.5) 33%,rgba(0,0,0,0) 100%);
- }
- .el-carousel {
- /deep/.el-carousel__arrow i {
- font-size: 16px !important;
- }
- /deep/.el-carousel__arrow--left {
- left: 20px;
- width: 36px;
- height: 36px;
- color: #eee;
- background: rgba(0,0,0,0.5);
- border-radius: 50%;
- position: absolute;
- border: none;
- border-radius: 50%;
- }
- /deep/.el-carousel__arrow--right {
- right: 20px;
- width: 36px;
- height: 36px;
- color: #eee;
- background: rgba(0,0,0,0.5);
- position: absolute;
- border: none;
- border-radius: 50%;
- }
- /deep/ .el-carousel__indicators {
- // 指示器
- left: unset;
- transform: unset;
- right: 10px;
- bottom: 11px;
- }
- /deep/ .el-carousel__button {
- // 指示器按钮
- width: 10px;
- height: 10px;
- border: none;
- background: #fff;
- opacity: 1;
- }
- /deep/ .is-active .el-carousel__button {
- // 指示器激活按钮
- background: #c82200;
- width: 10px;
- height: 10px;
- 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;
- }
- }
- //样式4
- .bannerSwiperStyle4 {
- width: 100%;
- height: 405px;
- position: relative;
- img {
- width: 100%;
- height: 405px;
- }
- .swiper_dot1 {
- display: block;
- width: 100%;
- line-height: 60px;
- height: 60px;
- color: #fff;
- font-size: 24px;
- text-indent: 20px;
- position: absolute;
- bottom: 0;
- left: 0;
- z-index: 10;
- box-sizing: border-box;
- padding-right: 244px;
- background:linear-gradient(0deg,rgba(0,0,0,0.5) 33%,rgba(0,0,0,0) 100%);
- }
- .el-carousel {
- /deep/.el-carousel__arrow i {
- font-size: 16px !important;
- }
- /deep/.el-carousel__arrow--left {
- left: 20px;
- width: 36px;
- height: 36px;
- color: #eee;
- background: rgba(0,0,0,0.5);
- border-radius: 50%;
- position: absolute;
- border: none;
- border-radius: 50%;
- }
- /deep/.el-carousel__arrow--right {
- right: 20px;
- width: 36px;
- height: 36px;
- color: #eee;
- background: rgba(0,0,0,0.5);
- position: absolute;
- border: none;
- border-radius: 50%;
- }
- /deep/ .el-carousel__indicators {
- // 指示器
- left: unset;
- transform: unset;
- right: 10px;
- bottom: 11px;
- }
- /deep/ .el-carousel__button {
- // 指示器按钮
- width: 10px;
- height: 10px;
- border: none;
- background: #fff;
- opacity: 1;
- }
- /deep/ .is-active .el-carousel__button {
- // 指示器激活按钮
- background: #fe8f00;
- width: 10px;
- height: 10px;
- 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;
- }
- }
- //样式5
- .bannerSwiperStyle5 {
- position: relative;
- .roll_num_box {
- position: absolute;
- z-index: 2;
- right: 35px;
- bottom: 5px;
- height: 60px;
- line-height: 60px;
- color: #fff;
- font-size: 20px;
- .roll_num_box_new {
- font-size: 20px;
- }
- }
- .dot1 {
- display: block;
- word-break: keep-all;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .swiper_dot1 {
- display: block;
- width: 100%;
- line-height: 60px;
- height: 60px;
- color: #fff;
- font-size: 18px;
- text-indent: 20px;
- position: absolute;
- bottom: 0;
- left: 0;
- z-index: 10;
- box-sizing: border-box;
- background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 33%, rgba(0, 0, 0, 0) 100%);
- }
- .el-carousel {
- /deep/.el-carousel__arrow i {
- font-size: 33px !important;
- }
- .roll_1_box {
- position: relative;
- }
- /deep/.el-carousel__arrow--left {
- left: 20px;
- width: 30px;
- height: 56px;
- color: #eee;
- background: rgba(0,0,0,0.5);
- border-radius: 50%;
- position: absolute;
- border: none;
- border-radius: 4px;
- }
- /deep/.el-icon-arrow-left:before {
- font-size: 24px;
- line-height: 56px;
- }
- /deep/.el-carousel__arrow--right {
- right: 20px;
- width: 30px;
- height: 56px;
- color: #eee;
- background: rgba(0,0,0,0.5);
- position: absolute;
- border: none;
- border-radius: 4px;
- }
- /deep/.el-icon-arrow-right:before {
- font-size: 24px;
- line-height: 56px;
- }
- /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: #fff;
- opacity: 1;
- }
- /deep/ .is-active .el-carousel__button {
- // 指示器激活按钮
- background: #255590;
- width: 25px;
- 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: #c82200;
- width: 58px;
- opacity: 1;
- }
- }
- </style>
|