上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 52 下一页
摘要: 信息弹出层: Taro.showModal({ title: '提示', content: '这是一个模态弹窗', success: function (res) { if (res.confirm) { console.log('用户点击确定') } else if (res.cancel) { 阅读全文
posted @ 2020-08-31 09:02 Nyan 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 配置文件tsconfig.json的path属性: { "compilerOptions": { "target": "es2017", "module": "commonjs", "removeComments": false, "preserveConstEnums": true, "modul 阅读全文
posted @ 2020-08-28 16:27 Nyan 阅读(965) 评论(0) 推荐(0) 编辑
摘要: 创建模块: (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 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 数据结构: { "house_id": "1001", "house_name": "襄阳恒大翡翠珑庭", "house_album": [ { "id": "album_01", "name": "视频", "type": "video", "images": [ { "id": "img_000 阅读全文
posted @ 2020-08-22 11:37 Nyan 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 安装: 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 阅读(811) 评论(0) 推荐(0) 编辑
摘要: 返回页面有tabbar时报错, 使用switchTab,其他页面样式都出现问题, 使用reLauch,页面需要重新加载,刷新. 没有压栈问题所以找不到第一个页面。 const handleBackClick = () => { if (Taro.getCurrentPages().length <= 阅读全文
posted @ 2020-08-18 18:24 Nyan 阅读(818) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(1949) 评论(0) 推荐(0) 编辑
摘要: (function (win, doc, $) { function CustomScrollBar(options) { this._init(options); } $.extend(CustomScrollBar.prototype, { // this -> CustomScrollBar 阅读全文
posted @ 2020-08-17 16:14 Nyan 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 使用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 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(249) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 52 下一页