From 08ffcf9d7ffafaa82d8de7f9b5fcfdb49e9c3688 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 05 十一月 2025 17:33:54 +0800
Subject: [PATCH] 动态溯源 1. 修复CO因子文本没有正常显示的问题;

---
 src/utils/expand/expand.js |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/utils/expand/expand.js b/src/utils/expand/expand.js
index 49eb52f..cda8235 100644
--- a/src/utils/expand/expand.js
+++ b/src/utils/expand/expand.js
@@ -30,3 +30,18 @@
   const s = size > this.length ? 0 : this.length - size;
   return this.slice(s, l);
 };
+
+Array.prototype.groupBy = function (func) {
+  const groups = {};
+  this.forEach((item) => {
+    const key = func(item);
+    if (!groups[key]) {
+      groups[key] = [];
+    }
+    groups[key].push(item);
+  });
+  return Object.keys(groups).map((key) => ({
+    key,
+    values: groups[key]
+  }));
+};

--
Gitblit v1.9.3