- 博客(5)
- 收藏
- 关注
转载 【实用js技巧】
实用JS技巧1.多个if条件if(x=='a'||x=='b'||x=='c'){}better:if(['a','b','...'].includes(x)){}2.假值(undefined、null、0、false、NaN、空字符串)检查if (test1 !== null || test1 !== undefined || test1 !== "") {let test2 = test1;}better:let test2 = test1 || ""if(test1 ===
2022-05-09 14:28:18 103
原创 【css基础】
CSS基础1、提高页面性能优化1.数据懒加载2.小图标使用精灵图3.字库使用bg2312 而不是utf-8, 一个汉字少一个字节4.路由懒加载:/组件不使用不加载函数 或者promise示例:const login =()=>(import ‘./login’)promise :方法const detail =()=>Promise.resolve(import ‘./detail’)5.使用gulp 、webpack /grunt 等工具压缩html/js/css2、什
2021-09-21 21:44:30 78
原创 canvas | 使用canvas画图表,层级太高超过弹层
使用canvas画图表,层级太高超过弹层方法一:用wx.canvasToTempFilePath将canvas转成图片<html>:<canvas style="width:100%" canvas-id="lineCanvas" disable-scroll="true" class="canvas" wx:if="{{!radarImg}}" /> <image wx:else src="{{radarImg}}" c
2021-09-10 14:59:04 1041
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人