会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
stumpx
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2020年8月5日
vue项目统计src目录下代码行数
摘要: find ./src "(" -name "*.html" -or -name "*.vue" -or -name "*.js" -or -name "*.ts" -or -name "*.css" -or -name "*.styl" -or -name "*.less" -or -name "*
阅读全文
posted @ 2020-08-05 10:55 stumpx
阅读(1533)
评论(0)
推荐(0)
2020年8月1日
常用mobx响应新值变化函数autorun和observe
摘要: autorun响应式函数,常用与打印日志、持久化或者更新UI的代码 var numbers = observable([1,2,3]);var disposer = autorun(() => console.log(sum.get())); // 输出 '6' numbers.push(4); /
阅读全文
posted @ 2020-08-01 17:52 stumpx
阅读(1237)
评论(0)
推荐(0)
2020年7月31日
uni app使用mobx | uni app状态管理mobx
摘要: 测试中 使用mobx的响应函数autorun监听状态变化进行赋值和运行函数,页面onLoad时执行所有autorun,页面onUnload时销毁所有autorun observer.ts import {autorun, IReactionDisposer, IReactionPublic, rea
阅读全文
posted @ 2020-07-31 12:09 stumpx
阅读(833)
评论(0)
推荐(0)
2020年7月22日
File and Code Templates | webstorm代码文件模板 vue typescript
摘要: Typescript Class import _ from "lodash"; /**类 ${NAME}*/ export default class ${NAME} { /**v-for :key*/ forKey?: string = _.uniqueId() constructor(obj?
阅读全文
posted @ 2020-07-22 10:18 stumpx
阅读(808)
评论(0)
推荐(0)
2020年7月12日
uni-app平台判断 | uni app判断h5 小程序 app 等不同平台
摘要: 使用 // @/utils/Config.tsimport {EPlatform} from './EPlatform'; import {isH5, Platform} from '@/utils/Platform' /**配置信息*/ export default class Config {
阅读全文
posted @ 2020-07-12 17:46 stumpx
阅读(27814)
评论(0)
推荐(0)
2020年6月30日
小程序中使用lodash报错 | lodash小程序报错
摘要: 直接在小程序中使用lodash会报错,原因可参考 https://blog.xinshangshangxin.com/2016/11/30/mina-lodash/ 在 import {_} from 'lodash' 之前先 import 'fix' fix.js /*fix.js*//*修复lo
阅读全文
posted @ 2020-06-30 10:21 stumpx
阅读(2958)
评论(0)
推荐(0)
2020年6月23日
小程序相册授权后保存图片到相册
摘要: 小程序相册授权和保存图片到相册 //保存图片 saveImgToAlbum: function () { const _this = this; console.log('has.this.data.tempFilePath', _this.data.tempFilePath); if (!!_th
阅读全文
posted @ 2020-06-23 18:36 stumpx
阅读(689)
评论(0)
推荐(0)
2020年6月18日
在小程序中使用状态管理mobx
摘要: 在小程序中使用状态管理mobx 使用mobx后,进入二级页面修改数据返回一级页面显示的数据跟着变 先看效果 控制台打印的数据 以下是代码 store.js // js/store.js // 手动安装时引入的路径 import {configure, extendObservable} from "
阅读全文
posted @ 2020-06-18 19:40 stumpx
阅读(978)
评论(0)
推荐(0)
2019年6月26日
微信浏览器免授权获取用户ID
摘要: 微信浏览器中免授权获取用户ID, 在微信开发中,用户ID是通过用户授权后可以获取到用户的openid或unionid, 在没有授权时,也可以生成一个用户ID, 接下来介绍使用Fingerprintjs2生成用户ID,此方法只适合同一设备同一浏览器使用, 注:wifi和4g环境获取到的ID不一致,去掉
阅读全文
posted @ 2019-06-26 18:26 stumpx
阅读(2880)
评论(0)
推荐(0)
2018年8月22日
js对象数组深度去重和深度排序
摘要: 使用collect.js处理数组和对象 https://github.com/ecrmnn/collect.js/# 引入collect.js https://github.com/ecrmnn/collect.js/#installation 或 深度去重 https://github.com/e
阅读全文
posted @ 2018-08-22 09:39 stumpx
阅读(951)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告