bhd-components 0.7.27 → 0.7.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1427,10 +1427,13 @@ const CustomerService = (props)=>{
1427
1427
  }).then((res)=>{
1428
1428
  if (res.data.questions) {
1429
1429
  setQuestionsList((questionList)=>{
1430
- return [
1430
+ let newList = [
1431
1431
  ...questionList,
1432
1432
  ...res.data.questions
1433
1433
  ];
1434
+ // 数组去重
1435
+ newList = newList.filter((item, index, self)=>index === self.findIndex((t)=>t.id === item.id));
1436
+ return newList;
1434
1437
  });
1435
1438
  }
1436
1439
  });
@@ -1467,7 +1467,14 @@ var CustomerService = function(props) {
1467
1467
  }).then(function(res) {
1468
1468
  if (res.data.questions) {
1469
1469
  setQuestionsList(function(questionList) {
1470
- return _to_consumable_array(questionList).concat(_to_consumable_array(res.data.questions));
1470
+ var newList = _to_consumable_array(questionList).concat(_to_consumable_array(res.data.questions));
1471
+ // 数组去重
1472
+ newList = newList.filter(function(item, index, self) {
1473
+ return index === self.findIndex(function(t) {
1474
+ return t.id === item.id;
1475
+ });
1476
+ });
1477
+ return newList;
1471
1478
  });
1472
1479
  }
1473
1480
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.7.27",
3
+ "version": "0.7.28",
4
4
  "description": "组件功能描述",
5
5
  "files": [
6
6
  "esm",