上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 52 下一页
摘要: 查看远程origin地址: git remote -v 删除现有的origin地址 或 更新名称: git remote remove origingit remote rename origin 新名称 添加新的origin地址(新建的代码托管地址): git remote add origin 阅读全文
posted @ 2021-02-27 09:32 Nyan 阅读(4131) 评论(0) 推荐(0) 编辑
摘要: taro Map组件不兼容H5 地图父组件: import React, { useEffect, useMemo, useRef, useState } from 'react' import Taro, { getCurrentInstance, useReady } from '@tarojs 阅读全文
posted @ 2021-02-26 11:30 Nyan 阅读(699) 评论(0) 推荐(1) 编辑
摘要: 首先在index.html文件引入: <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=kM1RFA6AzOnv6lmlc7qyOMhqBILu1pgk"></script> 简单实现地图显示: useReady 阅读全文
posted @ 2021-02-25 15:57 Nyan 阅读(296) 评论(0) 推荐(0) 编辑
摘要: h5使用useRouter导致返回报错TypeError: Cannot read property 'options' of undefined at onUnload 使用taro的getCurrentInstance().router获取参数 / 目标页面获取数据,Class组件: const 阅读全文
posted @ 2021-02-25 11:07 Nyan 阅读(666) 评论(0) 推荐(0) 编辑
摘要: npm install tarojs-router 简单实现: github: https://github.com/lblblong/tarojs-router 创建router配置目录src/router src/router/middleware/author-check.ts import 阅读全文
posted @ 2021-02-23 09:33 Nyan 阅读(776) 评论(0) 推荐(0) 编辑
摘要: MovableView不支持h5,使用onTouchMove实现拖拽 main.tsx import React, { useEffect, useState } from 'react' import Taro from '@tarojs/taro' import { View, Image, T 阅读全文
posted @ 2021-02-22 16:16 Nyan 阅读(669) 评论(0) 推荐(0) 编辑
摘要: 方法1:那就按照字符串来配置 方法2:http-proxy-middleware 插件。 npm install http-proxy-middleware --save 然后在src目录下创建一个setupProxy.js文件。内容如下: const { createProxyMiddleware 阅读全文
posted @ 2021-02-18 09:42 Nyan 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 在项目根目录新建.env文件(环境变量) //关闭source map GENERATE_SOURCEMAP=false //关闭自动打开浏览器 //BROWSER=none //本地host HOST=m.loubei.com //本地端口 PORT=80 本地hosts文件添加 127.0.0. 阅读全文
posted @ 2021-02-08 14:47 Nyan 阅读(502) 评论(0) 推荐(0) 编辑
摘要: tsconfig.json添加: "baseUrl": ".", "paths": { "@/*": ["src/*"], "@assets/*": ["src/assets/*"], // css, html中需要 `~@assets/*` } config/webpack.config.js f 阅读全文
posted @ 2021-02-08 10:37 Nyan 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 调整图片组件封装: import './index.scss' const ZoomImage = (props) => { const imageStyle = { backgroundImage: `url(${props.url})` } return ( <> <div className= 阅读全文
posted @ 2021-02-05 16:06 Nyan 阅读(189) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 52 下一页