自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 小程序获得元素的宽度、高度

小程序使图片宽高一致,显示为正方形// An highlighted block<image bindload="imageLoad" class="gridimg" style="width:100%;height:{{ imagesHeight }}px;" src="....." ></image>wx.cre

2019-03-07 15:24:50 1969

原创 小程序循环和嵌套循环遍历数据

data:{ reports:[ { id:1, failure_types:[ id:1, name:'xxx' ….. ] }, ],}<view wx:for-ite...

2019-01-07 18:08:53 874

原创 微信小程序使用计时器

data: { setInter: '',},//开始订单计时器startSetInter: function () { var that = this; that.data.setInter = setInterval( function () { //函数 }, 1000);},//清除计时器 即清除setInterendSetIn...

2019-01-07 18:05:56 5752

原创 小程序页面跳转传参参数值为url时参数丢失

错误类型:当参数的值为url的时候,在options中的值没有参数“?”之后字符串被截取。可以使用encodeURIComponent():函数可把字符串作为 URI 组件进行编码。let url=encodeURIComponent("http://baidu.com/?a=1&b=2")wx.navigateTo({ url: `detail?url=${url}`})...

2019-01-07 18:03:47 4305

原创 判断是否在微信小程序环境中

if (ua.indexof('MicroMessage') == -1) {//说明不在微信中 // 走其他的逻辑} else { wx.miniProgram.getEnv(function(res) { if (res.miniProgram) { // 走在小程序的逻辑 } else { ...

2019-01-07 18:01:53 697

原创 @2x@3x图片使用

@media (-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio: 2){ .imgTest{ background: url(../images/2x.png) no-repeat; } } @media (-webkit-min-device-pixel-ratio: 3),(min-device-...

2019-01-07 17:59:57 754

原创 小程序获取设备像素比

//获取设备像素比const getPixelRatio = () => { let pixelRatio = 0 wx.getSystemInfo({ success: function (res) { pixelRatio = res.pixelRatio }, fail: function () { pixelRatio = 0...

2019-01-07 17:58:52 5455 3

原创 记录一下react 全选功能

import React from 'react';import { render } from 'react-dom';import { Select, Checkbox,Row, Col } from 'antd'import 'antd/dist/antd.css'const data = [{ id: 1, value: '1', text: '图片1' },{ id: 2,...

2019-01-07 17:53:50 1049

原创 覆盖浏览器样式——input autofill

1/ 较大的内阴影{-webkit-box-shadow: 0 0 0px 1000px white inset }2/ 不显示输入过的列表<input type=“text” autocomplete="off”>

2019-01-07 17:50:25 375

原创 小程序页面间传值

1、URL传值这种方式最常用,比如:wx.navigateTo({ url: '../detail/detail?cid='+cid+'&token='+token})这里面直接通过跳转页面的URL进行传值,然后在另一个页面进行接收:onLoad: function (opt) { console.log('cid =' + opt.cid); console.lo...

2019-01-07 16:56:17 3119 1

原创 小程序使用moment.js格式化时间

小程序使用moment1、下载http://momentjs.com/选moment.min.js版本2、集成将moment.min.js放在小程序工程的utils目录下强调文本 强调文本3、设置格式const moment = require('moment.min.js');function timestampToString(timestamp){ moment.local...

2019-01-07 16:39:10 5568 2

原创 自己学习整理的一些实用vim命令集合

基础操作命令 w 后一个单词 b 前一个单词 gg 跳到第一行 G 跳到最后一行 18G跳到第18行 或 :18 回车 5j 下移5行 0 移到行首 $ 移到行末 u撤销 ctrl+r 反撤销 a添加 c更改 cw更改单词 r 更改一个字符 R 用新字符覆盖现有的字符 dd删除一行 shift+d 删除光标后的一行所有 dw删除一个单词 yy复制一行...

2018-08-07 09:53:44 193

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除