08 2020 档案

摘要:信息弹出层: Taro.showModal({ title: '提示', content: '这是一个模态弹窗', success: function (res) { if (res.confirm) { console.log('用户点击确定') } else if (res.cancel) { 阅读全文
posted @ 2020-08-31 09:02 Nyan 阅读(170) 评论(0) 推荐(0) 编辑
摘要:配置文件tsconfig.json的path属性: { "compilerOptions": { "target": "es2017", "module": "commonjs", "removeComments": false, "preserveConstEnums": true, "modul 阅读全文
posted @ 2020-08-28 16:27 Nyan 阅读(1003) 评论(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 阅读(196) 评论(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 阅读(336) 评论(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 阅读(821) 评论(0) 推荐(0) 编辑
摘要:返回页面有tabbar时报错, 使用switchTab,其他页面样式都出现问题, 使用reLauch,页面需要重新加载,刷新. 没有压栈问题所以找不到第一个页面。 const handleBackClick = () => { if (Taro.getCurrentPages().length <= 阅读全文
posted @ 2020-08-18 18:24 Nyan 阅读(846) 评论(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 阅读(2026) 评论(0) 推荐(0) 编辑
摘要:(function (win, doc, $) { function CustomScrollBar(options) { this._init(options); } $.extend(CustomScrollBar.prototype, { // this -> CustomScrollBar 阅读全文
posted @ 2020-08-17 16:14 Nyan 阅读(214) 评论(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 阅读(392) 评论(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 阅读(256) 评论(0) 推荐(0) 编辑
摘要:下拉框点击显示,离开隐藏 /** * 下拉框点击显示与隐藏 */ $(document).click(function (event) { let $target = $(event.target).parents('.select-content'); let allSelectList = $( 阅读全文
posted @ 2020-08-14 16:12 Nyan 阅读(495) 评论(0) 推荐(0) 编辑
摘要:html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>地图找 阅读全文
posted @ 2020-08-13 18:02 Nyan 阅读(160) 评论(0) 推荐(1) 编辑
摘要: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 阅读全文
posted @ 2020-08-12 11:05 Nyan 阅读(862) 评论(0) 推荐(0) 编辑
摘要:# 使用 npm 安装 CLI: $ npm install -g @tarojs/cli 解决安装过程出现sass相关的安装错误: $ npm install -g mirror-config-china 使用命令创建模板项目: $ taro init myApp $ npm run dev:we 阅读全文
posted @ 2020-08-06 17:56 Nyan 阅读(584) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示