VUE 前端分组

 let groupList = this.dataListSelections.reduce(
        (all, next) => (all.some(item => item.agentName == next.agentName) ? all : [...all, next]),
        []
      );
      if(groupList.length>1) {
         this.$message.error("不同代理商,不能提现申请");
         return false;
      }
原文地址:https://www.cnblogs.com/lvqianqian/p/12978887.html