当前位置: 首页 > wzjs >正文

wordpress 雄欲圣殿seo技术有哪些

wordpress 雄欲圣殿,seo技术有哪些,软件编程毕业设计代做网站,在线做的网站介绍 SlideTo: 使用swiper时, 可通过slideTo 方法跳转到指定的索引页;一般常用的参数有两个 index----索引speed—速度 分析 在 vue3 中, 实现 swiper 控制器的响应式控制,大概分为以下几步: 创建一个…

介绍

SlideTo: 使用swiper时, 可通过slideTo 方法跳转到指定的索引页;一般常用的参数有两个

  1. index----索引
  2. speed—速度

分析

vue3 中, 实现 swiper 控制器的响应式控制,大概分为以下几步:

  1. 创建一个响应式引用,用于存储Swiper实例
  2. 将创建的实例传递给SwipersetControlledSwiper方法。

代码

这里直接使用上篇文章的代码,具体代码解释可参考上几篇文章;这里只针对轮播图的指定跳转等做解释。

<template><div class="index"><swiper:modules="modules":loop="true":slides-per-view="1":space-between="50":autoplay="true":navigation="navigation":pagination="{ clickable: true }":scrollbar="{ draggable: false }"class="swiperBox"@slideChange="onSlideChange"@swiper="setControlledSwiper":controller="{controlledSwiper }"><swiper-slidev-for="(item,index) in state.swiperList":key="index"><div class="swiper-content"><img :src="item.img" alt="" class="swiper-img"></div></swiper-slide><div class="swiper-button-prev" @click.stop="prevEl()" /><!--左箭头。如果放置在swiper外面,需要自定义样式。--><div class="swiper-button-next" @click.stop="nextEl()" /><!--右箭头。如果放置在swiper外面,需要自定义样式。--><!-- 如果需要滚动条 --><!-- <div class="swiper-scrollbar"></div> --></swiper></div>
</template>
<script setup>import { ref, reactive, onMounted, onUnmounted, nextTick } from 'vue';import { Swiper, SwiperSlide } from 'swiper/vue'import 'swiper/css/navigation' // 轮播图两边的左右箭头import { Autoplay, Pagination, Navigation, Scrollbar } from 'swiper/modules'const navigation = ref({nextEl: ".swiper-button-next",prevEl: ".swiper-button-prev",});// 在modules加入要使用的模块const modules = [Autoplay, Pagination, Navigation, Scrollbar]const state = reactive({swiperList:[{id:0,img:'/img1.png'},{id:1,img:'/img2.png'}]})// 核心代码 // 创建响应式实例const controlledSwiper = ref(null);// 将实例传递给方法;const setControlledSwiper = (swiper) => {controlledSwiper.value = swiper;console.log(controlledSwiper.value);};//  例如: 点击上箭头的时候默认跳转到第一页;// 实例存在的时候,调用slideTo方法,传递参数; 默认跳转到第一页,所以索引传递0,const prevEl = (e) => {controlledSwiper.value?.slideTo(0,500);}// 更改当前活动swiperconst onSlideChange = (swiper) => {// swiper是当前轮播的对象,里面可以获取到当前swiper的所有信息,当前索引是activeIndexconsole.log(swiper.activeIndex)}</script>
http://www.dtcms.com/wzjs/162423.html

相关文章:

  • 怎么做整蛊网站百度关键词推广一年多少钱
  • 国家标准化建设管理委员会官方网站app注册推广平台
  • 网站建设需要参考哪些文献谷歌推广怎么开户
  • asp动态网页制作成都网站优化seo
  • 沧州市网站建设电话seo计费系统
  • 公司怎么做网页网站域名交易域名出售
  • 阿里云ecs 怎么做网站做推广
  • 潍坊外贸网站优化优化大师的使用方法
  • 怎样建设传奇网站空间互联网运营
  • 网站自助授权系统优化模型
  • 卫计局网站建设工作总结郑州网
  • 度娘网站桃花怎么做南宁今日头条最新消息
  • 网站建设费用请示网络推广seo公司
  • 怎么查询在建工程郑州seo方案
  • 淄博做网站建设windows优化大师是哪个公司的
  • wordpress 在线联系成都网站seo
  • 2019年做网站还有前景吗b2b有哪些电商平台
  • 网站做任务 炸金花免费广告发布平台
  • 介绍网站ppt该怎么做百度seo排名主要看啥
  • flv网站建设兰州seo网站建设
  • 能用二级域名做网站吗软文写作技巧及范文
  • 做外汇的官方网站搜索引擎优化方法包括
  • 千锋教育的真实性青岛seo软件
  • 长沙制作网站公司网站推广软件免费版
  • 手机网站一键开发武汉新闻最新消息
  • 计算机网络 网站百度搜索网址大全
  • saas 平台架构做网站友情链接的概念
  • 知己知彼网站短视频营销策划方案
  • 品牌建设成效有待提升荆门网站seo
  • 闵行做网站公司铝棒易站公司网站seo专员