区别一module.exports和exports 是CommonJs的规范,被使用于Node.js中export、export default 是ES6的规范,被用于React、Vue中 区别二通过export方式导出时,导入要加上 { }通过export default导出时,不需要 区别三module代表一个模块,exports是module的属性,表示对外的接口。加载某个模块,其实就是加载该模块的module.exports属性。 区别四CommonJs(require)运行时加...
img加载失败Vue中如何监听
vue中img标签加载失败 使用默认图片template中这么写,如果src中的图片加载失败就会加载defaultImg中的路径 1234<img:src="https://hl-blog.oss-cn-shanghai.aliyuncs.com/%E5%A4%B4%E5%83%8F.jpg"alt="加载失败咯":onerror="defaultImg"/> js中这么写 123456789export defau...
hexo+github pages部署博客
一、hexo环境配置 a. 安装Node.js环境 b. 安装Git环境 c. 安装Hexo npm install -g hexo-cli d. hexo init 项目名 e. npm intsall f. hexo generator 生成静态文件 g. hexo server 启动 h. npm install hexo-deployer-git --save 安装hexo-deployer-git i. deploy type: git reposito...
markdown常见书写规范
首行缩进 第一种:半方大的空白 或 全方大的空白 或 不断行的空白格 或  第二种:markdown语法支持html语法所以可以用这个,本人倾向这种方式,看起来比较干净。1<p style="text-indent:2em">xxxx</p>