![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
微信小程序
lanyu96
有些事不是因为看到了希望才去坚持
而是因为坚持了才能看到希望
展开
-
微信小程序自定义日期选择器(已封装成控件,可直接使用)
由于原生的picker页面只能使用默认的无法自定义,在开发中有特殊需求时就需要自定义日期选择器先看效果,页面可以在css文件中自定义代码:datePicker.jsconst dateUtils = require('../../../../utils/util.js')// 初始化日期模态框数据let date = new Date();let years = [];let months = [];let days = [];let hours = [];let mi原创 2020-07-09 19:04:23 · 14228 阅读 · 2 评论 -
微信小程序 图标的角标实现
先上效果图原创 2020-03-24 18:01:57 · 15483 阅读 · 0 评论 -
微信小程序swiper控件高度自适应
在小程序开发文档中,swiper控件默认高度为150,高度必须设置具体的值,所以为了适应不同分辨率的设备,通过动态的获取屏幕空白部分高度在设置swiper控件的高度主要用到两个API:1、getSystemInfo(获取当前设备的屏幕信息)2、createSelectorQuery(这里的作用是获取其他控件的高度)在wxml文件中用一个view控件将表头包裹起来,然后设置class...原创 2019-08-10 10:04:22 · 21822 阅读 · 1 评论 -
微信小程序swiper组件禁用手动滑动
给swiper-item添加属性catchtouchmove="stopTouchMove"然后在js中定义stopTouchMove方法 //禁用swiper滑动功能 stopTouchMove: function() { return false; },原创 2019-08-10 10:42:50 · 1365 阅读 · 0 评论 -
微信小程序自定义组件之多功能按钮
效果如图,已经封装好了,直接可以使用,其中有路径的地方需要根据情况改为自己项目中的文件所在路径,文章最后会介绍使用方法iconClick.wxml<view> <image src="{{iconA}}" class="img-style" animation="{{animCollect}}" bindtap="_clickA"></imag...原创 2019-08-23 17:30:39 · 7600 阅读 · 0 评论 -
微信小程序表格封装(可以直接用)
先上效果图table.wxml<template name="tableTemp"> <scroll-view class="table-wrap" scroll-x="{{true}}"><view> <view class="table"> <view class="tr"> ...原创 2019-08-21 19:27:47 · 9585 阅读 · 0 评论 -
微信小程序 按钮点击动态展开收起(开发记录)
wxml代码<view> <image src="/pages/icon/daikaifa.png" class="img-style" animation="{{animCollect}}" bindtap="collect"></image> <image src="/pages/icon/daikaifa.png" class=...原创 2019-08-18 09:59:48 · 5506 阅读 · 0 评论