上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 52 下一页
摘要: 定义单个Picker选项组件: import React, { useEffect, useState } from 'react' import { View, PickerView, PickerViewColumn } from '@tarojs/components' import clas 阅读全文
posted @ 2020-11-20 10:48 Nyan 阅读(1501) 评论(0) 推荐(0) 编辑
摘要: 封装单个picker: import React, { useState } from 'react' import { View, PickerView, PickerViewColumn } from '@tarojs/components' import classnames from 'cl 阅读全文
posted @ 2020-11-12 17:38 Nyan 阅读(1915) 评论(0) 推荐(0) 编辑
摘要: // 列表整块轮播 (function ($) { FCZX.globalNamespace('FCZX.Switch'); FCZX.Switch = function (opt) { this._init(opt) } $.extend(FCZX.Switch.prototype, { isMo 阅读全文
posted @ 2020-11-06 17:44 Nyan 阅读(480) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 时间显示处理方法: // 格式化时间段 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 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 百度静态地图链接: 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 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 微信小程序的image标签中有个mode属性,使用aspectFill即可 注:image组件默认宽度300px、高度225px mode 有效值: mode 有 13 种模式,其中 4 种是缩放模式,9 种是裁剪模式 mode: 'aspectFit' 的处理模式: const handleLoa 阅读全文
posted @ 2020-10-28 17:45 Nyan 阅读(1659) 评论(0) 推荐(0) 编辑
摘要: 使用方法: useRef && useImperativeHandle && forwardRef lodash -> isEqual 父组件: import React, { useCallback, useEffect, useMemo, useRef, useState } from 'rea 阅读全文
posted @ 2020-10-24 11:18 Nyan 阅读(1658) 评论(0) 推荐(0) 编辑
摘要: 父组件调用子组件方法:实现父组件滚动下拉更新分页 子组件注册方法传给父组件: useImperativeHandle(ref, () => ({ innerFn: handleScrollToLower }), [page.totalPage, param.currentPage]) const h 阅读全文
posted @ 2020-10-22 18:01 Nyan 阅读(544) 评论(0) 推荐(0) 编辑
摘要: toggleFolder 里面设置setVideos(videos)不更新,单独设置setFolder更新页面 import React, { useEffect, useState } from 'react' import { useShareAppMessage } from '@tarojs 阅读全文
posted @ 2020-10-22 10:16 Nyan 阅读(349) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 52 下一页