filter方法去重

551 阅读1分钟

filter方法去重:

1, r = arr.filter(function (element, index, self) { 

 return self.indexOf(element) === index; 8 }); 

2,:visible.sync='show'简写为:visible='show' @update:visible="val => show = val"