前端常用的知识(持续更新)
- 
//数组中,去除空白的内容 如 
 let a=['1',' ','3','4']
 方法 a.filter(i=>i)
 得到a=['1','3','4']
- 
//遮罩层 <div class="mask" @tap="hideView"></div> <!-- 弹框 --> <div class="termBox"> 内容 </div> <!--csss==============--> .mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); } .termBox { width: 80%; height: 80%; border: 2rpx solid #999; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #f8f5f5; font-size: 18rpx; } 

 
                
             浙公网安备 33010602011771号
浙公网安备 33010602011771号