摘要: this.$refs.refName.$el.style.opacity = '0.5' 阅读全文
posted @ 2020-09-02 17:18 baixinL 阅读(2547) 评论(0) 推荐(0)
摘要: 加载字体的方法 uni.loadFontFace({ family: '中英文都可', source: `url('${host}/static/xxx/xxx.ttf')`, success() { console.log('success') }, fail(res) { console.log 阅读全文
posted @ 2020-09-02 17:14 baixinL 阅读(1561) 评论(0) 推荐(0)
摘要: forEach forEach遍历完整,不会中断,在其内部使用return也只是起到continue的作用,仅跳过当前这条 arr.forEach((item, index, arr1) => { ... }) map map 遍历完整,不中断,返回新数组 const map1 = arr.map( 阅读全文
posted @ 2020-09-02 17:01 baixinL 阅读(353) 评论(0) 推荐(0)
摘要: const request = uni.request({....}) request .abort() 对于并行请求,如出现登录过期等, 可以把未响应的请求取消掉。 阅读全文
posted @ 2020-09-02 15:54 baixinL 阅读(1979) 评论(0) 推荐(0)
摘要: 详情参考:https://uniapp.dcloud.io/api/router?id=relaunch uni.navigateTo(OBJECT) 保留当前页面,跳转到应用内的某个页面,使用uni.navigateBack可以返回到原页面。 使用场景:需要返回不刷新原页面数据时使用。 注意: 页 阅读全文
posted @ 2020-09-02 10:41 baixinL 阅读(619) 评论(0) 推荐(0)