会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Nyan
博客园
首页
新随笔
管理
上一页
1
···
5
6
7
8
9
10
11
12
13
···
52
下一页
2020年11月20日
taro3.x: Picker优化使用
摘要: 定义单个Picker选项组件: import React, { useEffect, useState } from 'react' import { View, PickerView, PickerViewColumn } from '@tarojs/components' import clas
阅读全文
posted @ 2020-11-20 10:48 Nyan
阅读(1644)
评论(0)
推荐(0)
2020年11月12日
taro3.x: Picker简单使用
摘要: 封装单个picker: import React, { useState } from 'react' import { View, PickerView, PickerViewColumn } from '@tarojs/components' import classnames from 'cl
阅读全文
posted @ 2020-11-12 17:38 Nyan
阅读(2012)
评论(0)
推荐(0)
2020年11月6日
jquery: 列表轮播完善(整块轮播&单个轮播)
摘要: // 列表整块轮播 (function ($) { FCZX.globalNamespace('FCZX.Switch'); FCZX.Switch = function (opt) { this._init(opt) } $.extend(FCZX.Switch.prototype, { isMo
阅读全文
posted @ 2020-11-06 17:44 Nyan
阅读(501)
评论(0)
推荐(0)
jquery: 自动轮播(hover)
摘要: html: <!-- 自动轮播 start --> <div class="home-show"> <ul class="show-list"> <li class="show-item"> <a href="" style="background: url(http://pics-house.xy
阅读全文
posted @ 2020-11-06 14:55 Nyan
阅读(274)
评论(0)
推荐(0)
2020年11月3日
taro3.x: 微聊简单实现
摘要: 时间显示处理方法: // 格式化时间段 const toTimeSolt = (h: number) => { let bt = ''; if (0 <= h && h <= 3) bt = '凌晨'; if (4 <= h && h <= 8) bt = '早上'; if (9 <= h && h
阅读全文
posted @ 2020-11-03 19:12 Nyan
阅读(399)
评论(0)
推荐(0)
2020年10月28日
taro3.x: 地图相关
摘要: 百度静态地图链接: export const getStaticMap = (lng: number, lat: number, zoom: number = 16) => { return `http://api.map.baidu.com/staticimage?center=${lng},${
阅读全文
posted @ 2020-10-28 18:04 Nyan
阅读(400)
评论(0)
推荐(0)
taro3.x: 图片自适应处理(mode属性)
摘要: 微信小程序的image标签中有个mode属性,使用aspectFill即可 注:image组件默认宽度300px、高度225px mode 有效值: mode 有 13 种模式,其中 4 种是缩放模式,9 种是裁剪模式 mode: 'aspectFit' 的处理模式: const handleLoa
阅读全文
posted @ 2020-10-28 17:45 Nyan
阅读(1985)
评论(0)
推荐(0)
2020年10月24日
taro3.x: 父组件调用子组件方法,相互更新优化(案例集)
摘要: 使用方法: useRef && useImperativeHandle && forwardRef lodash -> isEqual 父组件: import React, { useCallback, useEffect, useMemo, useRef, useState } from 'rea
阅读全文
posted @ 2020-10-24 11:18 Nyan
阅读(1881)
评论(0)
推荐(0)
2020年10月22日
taro3.x: 父组件传子组件,组件之间相互更新问题
摘要: 父组件调用子组件方法:实现父组件滚动下拉更新分页 子组件注册方法传给父组件: useImperativeHandle(ref, () => ({ innerFn: handleScrollToLower }), [page.totalPage, param.currentPage]) const h
阅读全文
posted @ 2020-10-22 18:01 Nyan
阅读(656)
评论(0)
推荐(0)
taro3.x: 列表item折叠folder实现
摘要: toggleFolder 里面设置setVideos(videos)不更新,单独设置setFolder更新页面 import React, { useEffect, useState } from 'react' import { useShareAppMessage } from '@tarojs
阅读全文
posted @ 2020-10-22 10:16 Nyan
阅读(376)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
10
11
12
13
···
52
下一页
公告