- 博客(4)
- 收藏
- 关注
原创 uniapp踩坑记录#1
在uniapp使用自定义组件时,忘记在components中引用,虽然在h5页面也能运行,但是在微信小程序中报错,最终找了半天才解决。微信报 pages/info/index.json: [“usingComponents”][“xxxxxx"] 未找到或者报Component is not found in path 类似这样的错误...
2020-07-17 16:54:49 1693 1
原创 在生命周期完成监听和销毁
export default { mounted() { // 操作... // 监听 window.addEventListener('resize', this.handle) // 通过hook监听生命周期并销毁事件 this.$once('hook:beforeDestroy', () => { window.removeEventListener('resize', this.handle) }) }, met
2020-07-17 09:53:28 293
原创 vue的踩坑记录#1 背景图片不要写在内联样式中
<div class="bg" style="background: pink url(assets/logo.png);width: 200px;height: 100px;"> </div>这样写是不会加载图片的,只能写在style中。.bg { height: 100px; width: 200px; background: pink url(assets/logo.png);}
2020-07-12 15:33:19 316
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人