03 2020 档案

摘要:// 初始值设置为不是移动端 const [isMobile, setIsMobile] = useState<boolean>(false); const ua = navigator.userAgent.toLowerCase(); const agents = ['iphone', 'ipad 阅读全文
posted @ 2020-03-26 10:08 贝子涵夕 阅读(1309) 评论(0) 推荐(0) 编辑
摘要:生成二维码图片 1,第三方库:qrcode npm install qrcode --save 2,使用方法: import QRCode from 'qrcode'(ts项目中import方式需要处理tslint错误) const resCode = '后端返回的二维码code' const co 阅读全文
posted @ 2020-03-25 16:20 贝子涵夕 阅读(1828) 评论(0) 推荐(0) 编辑
摘要:// 项目中上传图片组件 and其它功能 import React, { useState, useRef } from 'react'; import { QrcodeOutlined } from '@ant-design/icons'; import '@ant-design/compatib 阅读全文
posted @ 2020-03-23 14:21 贝子涵夕 阅读(425) 评论(0) 推荐(0) 编辑
摘要:样例3: // img.onload = () => { // const originWidth = img.width; // const originHeight = img.height; // const maxWidth = 1600; // const maxHeight = 1200 阅读全文
posted @ 2020-03-20 20:46 贝子涵夕 阅读(13967) 评论(0) 推荐(0) 编辑
摘要:import React, { useState, useRef } from 'react'; import { QrcodeOutlined } from '@ant-design/icons'; import '@ant-design/compatible/assets/index.css'; 阅读全文
posted @ 2020-03-19 19:01 贝子涵夕 阅读(322) 评论(0) 推荐(0) 编辑
摘要:Tslint配置主要配置文件如下: // tsconfig.json { "compilerOptions": { "target": "esnext", "module": "esnext", "strict": true, "jsx": "preserve", "importHelpers": 阅读全文
posted @ 2020-03-07 16:52 贝子涵夕 阅读(11240) 评论(0) 推荐(0) 编辑

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