随身笔记
随身笔记

随身笔记

随身笔记
Hello => MDx!

解决:ReferenceError: primordials is not defined

原因是gulp 3.x不能在node.js 10以上的版本运行 解决方法一:安装nvm把node.js切换到10.x   方法二:编辑package.json "scripts": { . . "preinstall": "npx npm-force-resolutions" }, "resolutions": { "graceful-fs": "^4.2.4" }, …

   1,486   2021-07-06   去围观

推荐:node.js微信H5页面jssdk签名配置

公众号,小程序里面使用H5页面基本都会有分享H5的功能,这时候使用JS-SDK签名 https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html   html: axios.get('https://gzh.jskoa.com/getjsapi_ticket?url='+window.location.href).the…

   593   2021-07-05   去围观

vue多层级组件嵌套传参v-bind="$attrs" v-on="$listeners"

Vue v2.4新增$attrs $listeners 直接上案例: html: <div id="app"> <child1 :p-child1="child1" :p-child2="child2" :p-child-attrs="1231" v-on:test1="onTest1" v-on:test…

   551   2021-07-01   去围观

js处理heic(heif)格式的图片

import heic2any from 'heic2any'; const fileReader = new FileReader(); const fileReaderBuffer = new FileReader(); const file // 图片文件 // 加载图片 function loadImg(img) { return new Promise((resolve, reject) => { img.onload =…

   1,292   2021-06-18   去围观

this.$router.go(-1) 传参

前提:要支持keep-alive 编辑App.vue <keep-alive> <router-view v-if="$route.meta.keepAlive" /> </keep-alive> <router-view v-if="!$route.meta.keepAlive" />   页面路由设置keepAlive:true: { path: 'task-list…

   2,505   2021-06-18   去围观
加载更多