会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
天官赐福
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
下一页
2021年12月2日
使用 qrcode.react 绘制二维码,并下载二维码
摘要: 如果是要生成svg格式的二维码,可以使用以下方法进行下载 /** * 将svg导出成图片 * @param node svg节点 => document.querySelector('svg') * @param name 生成的图片名称 * @param width 生成的图片宽度 * @para
阅读全文
posted @ 2021-12-02 12:59 天官赐福·
阅读(1734)
评论(0)
推荐(0)
2021年12月1日
Redux Toolkit的使用
摘要: 1.使用推荐命令创建项目: npx create-react-app AppName --template redux 2.分析项目代码: 2.1 store.js import { configureStore } from '@reduxjs/toolkit';//可以融合多个reducer,并
阅读全文
posted @ 2021-12-01 17:44 天官赐福·
阅读(943)
评论(0)
推荐(0)
2021年11月29日
URLSearchParams:解析链接参数的利器
摘要: 参考地址:https://developer.mozilla.org/zh-CN/docs/Web/API/URLSearchParams#%E7%A4%BA%E4%BE%8B https://xiaozhuanlan.com/topic/3258479016
阅读全文
posted @ 2021-11-29 19:33 天官赐福·
阅读(72)
评论(0)
推荐(0)
2021年11月18日
文字一行或几行显示不下
摘要: 一行显示不下: white-space: nowrap; text-overflow: ellipsis; overflow: hidden; word-break: break-all; 两行显示不下: overflow: hidden; text-overflow: ellipsis; disp
阅读全文
posted @ 2021-11-18 10:50 天官赐福·
阅读(51)
评论(0)
推荐(0)
2021年11月16日
qiankun框架的使用-Vue基座
摘要: 1.安装qiankun yarn add qiankun 或者 npm i qiankun -S 2.创建应用 .创建主应用 vue create qiankun-base .创建React子应用 create-react-app qiankun-react .创建Vue子应用 vue create
阅读全文
posted @ 2021-11-16 17:12 天官赐福·
阅读(1595)
评论(0)
推荐(0)
benz-amr-recorder插件(播放音频,录音)
摘要: https://www.jianshu.com/p/93cef831025c https://blog.csdn.net/huanhuan03/article/details/108049793
阅读全文
posted @ 2021-11-16 14:38 天官赐福·
阅读(641)
评论(0)
推荐(0)
2021年11月11日
利用‘clipboard’插件实现拷贝功能
摘要: 1.安装 npm install clipboard --save 2.引入 import Clipboard from "clipboard"; 3.使用 const [copyInfo, setCopyInfo] = useState(''); // 复制的信息 useEffect(() =>
阅读全文
posted @ 2021-11-11 14:40 天官赐福·
阅读(118)
评论(0)
推荐(0)
2021年11月3日
正则
摘要: let regexp = new RegExp(/^\+?[0-9]\d*$/); console.log(regexp.test(xxx)); //手机号码验证 export function telReg(value) { if (!value) return false; const telR
阅读全文
posted @ 2021-11-03 19:37 天官赐福·
阅读(22)
评论(0)
推荐(0)
发送验证码后,显示倒计时10s后重新获取
摘要: <input type="text"> <button>获取验证码</button> <script> var btn = document.querySelector('button'); var t = 10; //设置监听事件,按下按钮后禁用按钮 btn.addEventListener('c
阅读全文
posted @ 2021-11-03 15:46 天官赐福·
阅读(267)
评论(0)
推荐(0)
2021年10月20日
封装倒计时方法
摘要: /** * @description: 倒计时开始时间点targetTime 参数 * @return 格式时间 */ export const cutDownTime = (targetTime) => { const currentSecond = parseInt(new Date().get
阅读全文
posted @ 2021-10-20 10:39 天官赐福·
阅读(59)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
下一页
公告
返回顶端