11 2021 档案

摘要:配置全局事件总线 在mian.js 内 new Vue({ beforeCreate(){ Vue.prototype.$bus = this // this 是当前Vue的实例对象 } }) A组件 和 B组件 实现组件通讯 在A组件中使用 mounted(){ this.$bus.$on('xx 阅读全文
posted @ 2021-11-12 10:48 想上天与太阳并肩 阅读(177) 评论(0) 推荐(0) 编辑
摘要:npm view xxxx versions 阅读全文
posted @ 2021-11-11 17:46 想上天与太阳并肩 阅读(33) 评论(0) 推荐(0) 编辑
摘要:react 没有配置 alias(别名) 引入文件的时候 只能通过 ../../ 的方式引入,项目大了 这样操作就比较繁琐麻烦 运行 npm eject 将配置暴露出来 找到 webpack.config.js 文件修改如下 const path = require('path'); const r 阅读全文
posted @ 2021-11-04 09:58 想上天与太阳并肩 阅读(227) 评论(0) 推荐(0) 编辑
摘要:postcss-px-to-viewport 安装 npm install --save-dev postcss-px-to-viewport 运行 npm eject 将react配置暴露出来 在 webpack.config.js 中配置 require("postcss-px-to-viewp 阅读全文
posted @ 2021-11-04 09:48 想上天与太阳并肩 阅读(1000) 评论(0) 推荐(0) 编辑
摘要:新建一个文件 fontSize.js (function() { if (typeof WeixinJSBridge == 'object' && typeof WeixinJSBridge.invoke == 'function') { handleFontSize() } else { docu 阅读全文
posted @ 2021-11-03 13:58 想上天与太阳并肩 阅读(409) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示