ICode9

精准搜索请尝试: 精确搜索
  • Swiper5的使用2022-08-28 00:30:30

    Vue2中 Swiper5的使用 vue2 一般使用swiper5 安装 npm i swiper@5.0.1 在main.js中引入 import 'swiper/css/swiper.css' 在需要使用的组建里面引入 import Swiper from "swiper"; 组件上template使用 //banner轮播 <div class="swiper-container" id="mySwiper&quo

  • uniapp 卡片式轮播图2022-08-13 18:31:41

    html结构: uniapp自带的swiper 组件可以弄成寻常的轮播图   <swiper class="image-container" previous-margin="45rpx"   next-margin="45rpx" circular autoplay indicator-dots indicator-color="#9d9080"   indicator-active-colo

  • 前端2022-07-31 02:00:18

    Swiper

  • swiper滑动异常2022-07-26 14:34:41

    遇到这样的情况,一共5张slide,但是从第三个起再往右划就不动了。后来发现是已经初始化swiper后又追加了slide。(大概意思是这样。太久的程序了,也不想仔细捋了) 暂且用到的办法: 先定义好: var ifInitSwiper = false; var mySwiper; 在获取数据后: if($(".swiper-container").length>0){

  • 一个自适应切符合一般变换需求的swiper2022-07-25 00:32:11

    index.html <!-- * @Author: 作者 * @Date: 2022-06-29 17:24:35 * @LastEditors: Simoon.jia * @LastEditTime: 2022-07-24 22:59:49 * @Description: 描述 --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="

  • vue 使用 swiper vue-awesome-swiper2022-07-24 20:33:05

    文档地址 https://github.com/surmon-china/vue-awesome-swiper 演示地址 https://v1.github.surmon.me/vue-awesome-swiper/   npm install swiper vue-awesome-swiper@4.1.1 --save import SwiperCore, {Autoplay } from 'swiper'import { Swiper, SwiperSlide } from &#

  • 【Vue项目】尚品汇(三)Home模块+Floor模块+Swiper轮播图2022-07-23 14:34:00

    写在前面 今天是7.23,这一篇内容主要完成了Home模块和部分Search模块的开发,主要是使用了swiper轮播图插件获取vuex仓库数据展示组件以及其他信息。 1 Search模块 1.1 Search模块的全部商品分类的显示 需求分析 :在home模块中,需要显示商品分类的三级联动全局组件,而在search模块则不需

  • vue内使用Swiper轮播到最后一张停止解决方法2022-07-23 02:00:07

    template> <swiper ref="mySwiper" :options="swiperOptions" class="banner" v-if="banners.length>0"> <swiper-slide v-for="value in banners" :key="value.bannerId" class="ite

  • vue-awesome-swiper插件报错解决2022-07-23 01:00:44

    Error: Can‘t resolve ‘swiper/dist/css/swiper.css‘  Error: Can't resolve 'vue-awesome-swiper' 试了众多方法后发现 还是安装旧版本的swiper,其他版本根本就没有dist的目录   npm install vue-awesome-swiper@3.1.3 --save

  • 【桂工微拍小程序】商品详情页设计与功能实现2022-07-21 13:34:05

    1、商品轮播图 1-1、整体流程 1、swiper组件用来放置swiper-item组件 2、swiper-item组件用来放置图片 3、image组件显示轮播图图片 4、wx:for列表循环,设置每一个图片 5、云数据库请求数据完成动态响应 1-2、根据微信开发官方文档来设计商品轮播图 1、从官方文档的组件了找到试图

  • [flag]小程序-day52022-07-18 01:02:23

    想碎碎念,什么学得慢,要养成习惯这那的 什么工作太忙,我还太爱玩这那的 还包括学习过程中虽然老师经常说参照前端的某些知识,不用特意去学,也不用慌。 在学习小程序的过程中注意老师实现功能的思路,先搭好结构再去完善细节 自己写C#的时候也要应用上 多看官方文档,不能关依赖视频教程 还

  • Swiper更新参数2022-07-04 13:02:15

    swiperInstance.update({ slidesPerView: status == "pc" ? 1.354 : 1.253, coverflowEffect: status == "pc" ? { rotate: 0, stretch: "34%", depth

  • swiper基础设置2022-07-03 17:36:42

      new Swiper(".swiper", { initialSlide: 1, centeredSlidesBounds: true, slidesPerView: status == "pc" ? 1.354 : 1.253, //视图层显示的sild个数 centeredSlides: true, //居中幻灯片。设定为true时,当前的active slide 会居中

  • 使用swiper组件,轮播图在高分辨率情况下变形,图片拉高该如何解决?2022-06-25 18:00:43

    问题如下: 在1080p分辨率写的代码,在高分辨率情况下比例失调 通过查看代码发现: 找到轮播图样式,发现高度写死成容器高度了。所以出现图片拉高的情况 img { width: 100%; height: 550px; } 所以只需要将heigth提升与容器小百分比相等。并且按照原是比例裁切 object-fit 属性

  • 关于swiper插件在vue2的使用2022-06-25 09:31:07

    最近做项目用到了vue-awesome-swiper,总结一下使用方法 第一步:安装依赖 npm install swiper vue-awesome-swiper --save or npm install swiper vue-awesome-swiper@2.6.7 --save 第二步:引入组件 import { swiper, swiperSlide } from "vue-awesome-swiper"; import "swiper/dist

  • react18中使用swiper报错Cannot read properties of undefined (reading 'wrapperClass')2022-06-09 18:06:32

    react18中swiper导致的报错 在nextjs中使用swiperjs,当升级react版本到18.x后,报错: Cannot read properties of undefined (reading 'wrapperClass') 当前版本信息: "next": "^12.1.7-canary.30", "react": "^18.2.0-next-e531a4a62-20220505", &

  • swiper报错The requested module 'react' is expected to be of type CommonJS, which does not su2022-06-09 17:31:11

    低版本node与swiper版本导致的错误 最近在nextjs项目中使用swiper,版本信息如下: node版本12.9.1 "next": "11.1.0", "swiper": "7.4.1", 项目打包后报错: (node:159) ExperimentalWarning: The ESM module loader is experimental. > Build error occurred file:/

  • 数组拆分,多用于单个数组拆分多个数组,用处swiper里面2022-05-25 14:34:15

    group(array, subGroupLength) { let index = 0; let newArray = []; while(index < array.length) { newArray.push(array.slice(index, index += subGroupLength)); } return newArray; },    that.group(array,6)

  • 实现网易云项目轮播图滚动切换效果2022-05-10 21:34:15

    搭建主页面 (1)清空views文件夹内的VUE项目,并且新建HomeView.vue文件。 (2)在components内新建四个vue文件 分别是:swiperCom、topNav、musicList、iconList (3)在public 下建立js ,js内建立rem.js 将rem.js 文件内容粘贴进来 (4)topNav 对应发现页的顶部导航栏 分成左中右三个部分 使用vue

  • swiper使用2022-05-02 09:33:53

    swiper使用 初始化 var mySwiper = new Swiper ('容器区域类', { // 存放swiper属性 }) 属性 基本属性: 1.initialSlide 设定初始化时slide的索引,就是设置默认显示第几张图 2.direction swiper滑动方向 水平方向切换horizontal或垂直方向vertical 3.speed

  • swiper基本使用2022-04-26 11:35:56

    swiper基本使用 需求:轮播图两侧的前进后退按钮在轮播图之外,swiper官方看了一眼没找到,做个随笔记录一下 swiper版本为5 最终效果 原理 轮播图最外层容器 .swiper-wrapper 设置了 overflow:hidden;,直接将前进后退按钮和分页器定位到容器之外会隐藏。 所以在 .swiper-wrapper 外套

  • swiper在vue2中使用-案例篇2022-04-26 11:32:02

    案例 1.图片左右滚动 上图           效果描述    第一行向左滚动 第二行向右滚动 代码 ScrollImg组件 <template> <swiper :options="swiperOption" :dir="derection" class="companySP__srollImg"> <swiper-slide class="com

  • swiper加载动态加载网络数据后,不能正常轮播,循环;reacrNative中使用react-native-swiper2022-04-20 10:34:15

    reacrNative中使用react-native-swiperswiper加载本地的list数据时,没有问题;swiper加载动态加载网络数据后,不能正常轮播,循环;代码如下: //轮播图renderImageList() { let {indexHelpVideoList} = this.state; return ( <View style={styles.imageListView}>

  • 发现好歌单 (音乐app项目-第4步)2022-03-21 13:31:39

       在上一节Vue 图标列表组件 (音乐app项目-第3步)_Zhichao_97的博客-CSDN博客基础上实现发现好歌单,效果如下:   流程: 1.新建musicList.vue组件:  musicList.vue: <template> <div class="musicList"> <div class="musicList-top"> <div class=&q

  • swiper.js轮播在iOS下禁用上拉下拉回弹问题解决2022-03-07 23:34:25

    背景 移动端页面使用了 swiper,实现两屏轮播上下滚动,在 iOS 手机上用手滚动轮播图的时候,会发生下拉或上拉都有空白出现。 解决方案 初始化 swiper实例,传入以下参数。 resistanceRatio:抵抗率。边缘抵抗力的大小比例。值越小抵抗越大越难将slide拖离边缘,0时完全无法拖离。   resista

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有