开发遇到的一些问题

edge浏览器多次点击图片会出现阴影,这是用户选择的问题 

解决办法:

user-select: none;  
-ms-user-select: none;
 
 
es6 
数组去重 Array.from(new Set(arr))    [...new Set(arr)]
数组对象去重  
let hash = {}; //数组对象去重
list 原数组 去重name重复的
newArrr = list.reduceRight((item, next) => {
hash[next.name] ? '' : hash[next.name] = true && item.push(next);
return item
}, []);
 
element  框架
select 可以用 :hidden=""来判断是否隐藏选择项
 
 

猜你喜欢

转载自www.cnblogs.com/s-quan/p/9189229.html