会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Nyan
博客园
首页
新随笔
管理
上一页
1
···
8
9
10
11
12
13
14
15
16
···
52
下一页
2020年8月31日
taro: document vs picture
摘要: 信息弹出层: Taro.showModal({ title: '提示', content: '这是一个模态弹窗', success: function (res) { if (res.confirm) { console.log('用户点击确定') } else if (res.cancel) {
阅读全文
posted @ 2020-08-31 09:02 Nyan
阅读(181)
评论(0)
推荐(0)
2020年8月28日
taro3.x: typeScript配置alias
摘要: 配置文件tsconfig.json的path属性: { "compilerOptions": { "target": "es2017", "module": "commonjs", "removeComments": false, "preserveConstEnums": true, "modul
阅读全文
posted @ 2020-08-28 16:27 Nyan
阅读(1032)
评论(0)
推荐(0)
存储:cookie,localstorage
摘要: 创建模块: (function () { /** * FCZX.foo.bar */ let FCZX = {}; FCZX.globalNamespace = function (ns) { var nsParts = ns.split("."); var root = window; for (
阅读全文
posted @ 2020-08-28 14:32 Nyan
阅读(196)
评论(0)
推荐(0)
2020年8月22日
taro3.0 Swiper album example
摘要: 数据结构: { "house_id": "1001", "house_name": "襄阳恒大翡翠珑庭", "house_album": [ { "id": "album_01", "name": "视频", "type": "video", "images": [ { "id": "img_000
阅读全文
posted @ 2020-08-22 11:37 Nyan
阅读(345)
评论(0)
推荐(0)
2020年8月19日
taro3.x: 搭建redux环境
摘要: 安装: npm install redux react-redux redux-thunk redux-logger 创建文件: src/store/index.ts: import { createStore, applyMiddleware } from 'redux' import thunk
阅读全文
posted @ 2020-08-19 14:17 Nyan
阅读(826)
评论(0)
推荐(0)
2020年8月18日
taro: fial cannot navigate back at first page
摘要: 返回页面有tabbar时报错, 使用switchTab,其他页面样式都出现问题, 使用reLauch,页面需要重新加载,刷新. 没有压栈问题所以找不到第一个页面。 const handleBackClick = () => { if (Taro.getCurrentPages().length <=
阅读全文
posted @ 2020-08-18 18:24 Nyan
阅读(879)
评论(0)
推荐(0)
2020年8月17日
Taro 3.x 小程序导航栏高度等精确数据的hooks
摘要: hooks代码如下,useNavInfo.tsx: import React, {useState, useEffect} from 'react' import Taro from '@tarojs/taro' interface INavInfo { statusBarHeight: numbe
阅读全文
posted @ 2020-08-17 18:32 Nyan
阅读(2101)
评论(0)
推荐(0)
jquery: 自定义滚动优化
摘要: (function (win, doc, $) { function CustomScrollBar(options) { this._init(options); } $.extend(CustomScrollBar.prototype, { // this -> CustomScrollBar
阅读全文
posted @ 2020-08-17 16:14 Nyan
阅读(219)
评论(0)
推荐(0)
2020年8月15日
限制input 输入框只能输入纯数字
摘要: 使用HTML: <input type="text" name="" oninput="value=value.replace(/[^\d]/g,'')"> 使用JS: /* html */ <input type="text"; style="ime-mode:disabled"/* 禁止切换输入
阅读全文
posted @ 2020-08-15 11:55 Nyan
阅读(399)
评论(0)
推荐(0)
2020年8月14日
自定义下拉框逻辑封装
摘要: global var: (function () { /** * FCZX.foo.bar */ let FCZX = {}; FCZX.globalNamespace = function (ns) { var nsParts = ns.split("."); var root = window;
阅读全文
posted @ 2020-08-14 17:09 Nyan
阅读(261)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
13
14
15
16
···
52
下一页
公告