会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
donglt
博客园
首页
新随笔
联系
管理
订阅
2022年3月22日
小程序长按识别二维码
摘要: 上代码 show-menu-by-longpress="1" <view class="cash-pop-qcode"> <image mode="aspectFit" show-menu-by-longpress="1" src="https://mmbiz.qpic.cn/sz_mmbiz_jp
阅读全文
posted @ 2022-03-22 21:05 donglt
阅读(472)
评论(0)
推荐(0)
2021年12月16日
uniapp中,小程序跳转h5不生效,使用 【jweixin】
摘要: 项目使用uniapp开发,但是从小程序中,跳转h5没有反应,使用 jweixin,即可解决,代码 第一步,公共方法中声明 // eslint-disable-next-line const jweixin = require('jweixin-module'); // 判断是否是小程序环境 expo
阅读全文
posted @ 2021-12-16 16:57 donglt
阅读(1931)
评论(0)
推荐(0)
2021年12月15日
从0到1,创建react项目,并启动成功
摘要: 第一步:创建项目文件夹, cd react mkdir HarryPotter cd HarryPotter mkdir src 第二步:安装各种依赖包,依次执行如下命令行 npm init -y npm install webpack webpack-cli --save-dev npm inst
阅读全文
posted @ 2021-12-15 18:52 donglt
阅读(174)
评论(0)
推荐(0)
2021年2月19日
安装 yarn 报错 Missing write access to /usr/local/lib/node_modules
摘要: 报错的原因,没有权限写入 Missing write access to /usr/local/lib/node_modules 报错后:sudo npm i -g yarn
阅读全文
posted @ 2021-02-19 14:33 donglt
阅读(265)
评论(0)
推荐(0)
2020年8月19日
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/overview/serve"
摘要: 报错的截图 原因:解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题 解决办法:
阅读全文
posted @ 2020-08-19 14:49 donglt
阅读(6495)
评论(1)
推荐(0)
2020年4月8日
VUEX中的dispatch()和commit()
摘要: commit: 同步操作存储 this.$store.commit('changeValue',name) 取值 this.$store.state.changeValue dispatch: 异步操作存储 this.$store.dispatch('getlists',name) 取值 this.
阅读全文
posted @ 2020-04-08 18:31 donglt
阅读(26202)
评论(0)
推荐(1)
2020年1月13日
LeetCode#88,合并有序数组,JavaScript解法
摘要: 题目如图所示: 思路分析: splice(),在这题的解法中,主要使用删除功能, Object.assign() 方法用于将所有可枚举属性的值从一个或多个源对象复制到目标对象。它将返回目标对象。
阅读全文
posted @ 2020-01-13 10:21 donglt
阅读(210)
评论(0)
推荐(0)
2020年1月10日
LeetCode#27,移除元素 ,JavaScript解法
摘要: 题目如图所示: 解题思路: 原地修改数组 不能创建新数组,放值进入 重新定义数组下标和数值, 1、定义新参数 2、遍历数组,找出 != val的, 3、新参数下标,写入数组, 4、参数自增,返回的参数,即是数组的长度
阅读全文
posted @ 2020-01-10 10:58 donglt
阅读(230)
评论(0)
推荐(0)
2020年1月9日
LeetCode#66,加一 ,JavaScript解法
摘要: 题目如图所示 先说思路,下面是代码 思路:数字“加一”,第一考虑进位问题,于是在遍历数组时,等于9,不等于9,两种情况做区分。 看题目示例,最后一位数字“加一”,倒序遍历。 于是代码 var plusone = function(digits) { let size = digits.length;
阅读全文
posted @ 2020-01-09 17:24 donglt
阅读(212)
评论(0)
推荐(0)
git 清空commit记录的方法
摘要: 缘由:clone其他的代码,中间有commit记录,需清除 操作: 按照这个在代码命令行中操作即可成功,不用更改任何东西 1、建立‘孤立’的分支 git checkout --orphan latest_branch 2.添加所有文件 git add -A 3.提交更改 git commit -m
阅读全文
posted @ 2020-01-09 11:18 donglt
阅读(7827)
评论(0)
推荐(1)
下一页
公告