会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
猕猴桃姑娘
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2023年8月17日
vue项目在360浏览器兼容模式下SCRIPT1002: 语法错误以及“fetch”未定义问题解决
摘要: 使用360浏览器的兼容模式,vue项目页面空白,打开控制台,发现如下报错:SCRIPT1002: 语法错误 解决方法如下: 1、安装依赖 npm install --save core-js regenerator-runtime 2、在main.js引入 import 'core-js/stabl
阅读全文
posted @ 2023-08-17 14:01 猕猴桃姑娘
阅读(1411)
评论(0)
推荐(0)
2023年7月19日
HTTP/2 stream 1 was not closed cleanly before end of the underlying stream解决
摘要: 通过git clone 文件时报错 HTTP/2 stream 1 was not closed cleanly before end of the underlying stream 解决: git config --global http.versioin HTTP/1.1 重新git clon
阅读全文
posted @ 2023-07-19 17:05 猕猴桃姑娘
阅读(1190)
评论(0)
推荐(0)
2023年6月28日
nextjs项目引入vconsole报错处理:ReferenceError: window is not defined
摘要: 引入文件(nextjs项目): import Vconsole from 'vconsole' 报错: 处理: let Vconsole if (typeof window !== 'undefined') { Vconsole = require('vconsole') } 打开调试: if (t
阅读全文
posted @ 2023-06-28 15:29 猕猴桃姑娘
阅读(1200)
评论(0)
推荐(0)
nextjs项目引入jweixin文件报错处理:ReferenceError: window is not defined
摘要: 引入文件(nextjs项目): import wx from './jweixin-1.6.0.js' 报错: 处理: let wx if (typeof window !== 'undefined') { wx = require('./jweixin-1.6.0.js') } 接下来正常处理wx
阅读全文
posted @ 2023-06-28 15:21 猕猴桃姑娘
阅读(456)
评论(0)
推荐(0)
2023年6月27日
插件qrcode生成二维码
摘要: 1、安装依赖 npm install --save qrcode@1.0.0 2、引入 import QrCode from 'qrcode' 3、使用 const content = window.location?.href || '' QrCode.toDataURL( content, {
阅读全文
posted @ 2023-06-27 10:18 猕猴桃姑娘
阅读(77)
评论(0)
推荐(0)
插件copy-to-clipboard实现复制
摘要: 1、安装依赖 npm install --save copy-to-clipboard 2、引用 import copy from 'copy-to-clipboard' 3、使用 const txt = '测试复制' copy(txt) 其他: 自己写复制到剪贴板需要兼容不同的浏览器,这个插件内部
阅读全文
posted @ 2023-06-27 10:09 猕猴桃姑娘
阅读(680)
评论(0)
推荐(0)
2023年5月29日
React中redux报错处理(A non-serializable value was detected in an action...)
摘要: 原因:数据无法序列化,报错了 方法:在store.ts中,关闭序列化检测 middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }) 有问题欢迎交流,谢谢!
阅读全文
posted @ 2023-05-29 17:17 猕猴桃姑娘
阅读(741)
评论(0)
推荐(0)
2023年4月17日
mac查看端口占用以及释放端口
摘要: 有时候启动项目时,启动起来不是默认端口,说明默认端口被占用了 查看端口占用(lsof -i tcp:port,端口8000为例): lsof -i tcp:8000 如果被占用,可以看到占用的PID; 释放端口(kill -9 PID,上图为例子,PID为64373): kill -9 64373
阅读全文
posted @ 2023-04-17 10:26 猕猴桃姑娘
阅读(446)
评论(0)
推荐(0)
2023年4月14日
nginx使用windows
摘要: 1、下载nginx包文件 https://nginx.org/en/download.html 2、解压 3、运行 nginx.exe 4、输入localhost:80启动成功 自己的项目在nginx中运行 1、本地dist文件内容粘贴到nginx文件下的html目录中 2、更改配置 添加重定向,避
阅读全文
posted @ 2023-04-14 16:36 猕猴桃姑娘
阅读(33)
评论(0)
推荐(0)
2023年3月24日
前端压缩文件、下载
摘要: 使用插件:file-saver、jszip 安装插件: npm install file-saver --save npm install jszip --save 压缩文件(压缩的内容需要是blob流,可以是后端接口返回的blob流,如果是远程文件地址,可以参看第3条) 1、一个文件压缩: imp
阅读全文
posted @ 2023-03-24 11:59 猕猴桃姑娘
阅读(266)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告