微信小程序(二)


前言

添加一些微信小程序常用到的功能

一、UI框架

一般我用VantUI
  1. VantUI
    VantUI官网
  2. WeUI
    WeUI官网

二、Vant使用步骤

1.安装

  1. 通过 npm 安装
    1 npm i @vant/weapp -S --production
    2 修改 app.json,将"style": "v2"删掉
    3 小程序中在‘‘详情’ -使用npm勾选
  2. 在文件夹中的json文件中引入所需要的配置文件
    . 在这里插入图片描述

2.轮播图

代码如下(示例):

<view class="search_img">
  <swiper autoplay="true" interval="2000" indicatorDots="true" duration="500" circular="true">
    <swiper-item>
      <image src="http://img.guyongrensheng.com/uploads/other/20210609/90c32bff451914ef267ee5bd7554bd9a.png"></image>
    </swiper-item>
    <swiper-item>
      <image src="http://img.guyongrensheng.com/uploads/other/20210605/f3200b019d731fcff47d05e4366a8d8a.png"></image>
    </swiper-item>
    <swiper-item>
      <image src="http://img.guyongrensheng.com/uploads/other/20210609/d8c4d5039e4cdcb9792e84b76f0150d3.png"></image>
    </swiper-item>
    <swiper-item>
      <image src="http://img.guyongrensheng.com/uploads/other/20210609/8ea3f815f64af9dd31b3f638cde5b10e.png"></image>
    </swiper-item>
  </swiper>
</view>

总结

记录一下在项目中用到的一些功能

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

QH_染

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值