08 2020 档案
摘要:信息弹出层: Taro.showModal({ title: '提示', content: '这是一个模态弹窗', success: function (res) { if (res.confirm) { console.log('用户点击确定') } else if (res.cancel) {
阅读全文
摘要:配置文件tsconfig.json的path属性: { "compilerOptions": { "target": "es2017", "module": "commonjs", "removeComments": false, "preserveConstEnums": true, "modul
阅读全文
摘要:创建模块: (function () { /** * FCZX.foo.bar */ let FCZX = {}; FCZX.globalNamespace = function (ns) { var nsParts = ns.split("."); var root = window; for (
阅读全文
摘要:数据结构: { "house_id": "1001", "house_name": "襄阳恒大翡翠珑庭", "house_album": [ { "id": "album_01", "name": "视频", "type": "video", "images": [ { "id": "img_000
阅读全文
摘要:安装: npm install redux react-redux redux-thunk redux-logger 创建文件: src/store/index.ts: import { createStore, applyMiddleware } from 'redux' import thunk
阅读全文
摘要:返回页面有tabbar时报错, 使用switchTab,其他页面样式都出现问题, 使用reLauch,页面需要重新加载,刷新. 没有压栈问题所以找不到第一个页面。 const handleBackClick = () => { if (Taro.getCurrentPages().length <=
阅读全文
摘要:hooks代码如下,useNavInfo.tsx: import React, {useState, useEffect} from 'react' import Taro from '@tarojs/taro' interface INavInfo { statusBarHeight: numbe
阅读全文
摘要:(function (win, doc, $) { function CustomScrollBar(options) { this._init(options); } $.extend(CustomScrollBar.prototype, { // this -> CustomScrollBar
阅读全文
摘要:使用HTML: <input type="text" name="" oninput="value=value.replace(/[^\d]/g,'')"> 使用JS: /* html */ <input type="text"; style="ime-mode:disabled"/* 禁止切换输入
阅读全文
摘要:global var: (function () { /** * FCZX.foo.bar */ let FCZX = {}; FCZX.globalNamespace = function (ns) { var nsParts = ns.split("."); var root = window;
阅读全文
摘要:下拉框点击显示,离开隐藏 /** * 下拉框点击显示与隐藏 */ $(document).click(function (event) { let $target = $(event.target).parents('.select-content'); let allSelectList = $(
阅读全文
摘要:html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>地图找
阅读全文
摘要:http://maponline1.bdimg.com/js/?qt=vtileQuest&styles=pl&x=380&y=113&z=11&v=056&fn=MPC_Mgr.TANGRAM__1.getPoiData 添加{ enableMapClick: false } new BMap.M
阅读全文
摘要:# 使用 npm 安装 CLI: $ npm install -g @tarojs/cli 解决安装过程出现sass相关的安装错误: $ npm install -g mirror-config-china 使用命令创建模板项目: $ taro init myApp $ npm run dev:we
阅读全文