From 7eb4b1a6ba5c774836c112657708f46bd2763807 Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 11 Aug 2022 12:09:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E8=A7=86=E5=9B=BE):=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=AD=97=E6=AE=B5=E7=AE=A1=E7=90=86=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=85=A8=E9=80=89/=E5=85=A8=E4=B8=8D=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/dataset/data/utils.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 frontend/src/views/dataset/data/utils.js diff --git a/frontend/src/views/dataset/data/utils.js b/frontend/src/views/dataset/data/utils.js new file mode 100644 index 0000000000..ec89d30931 --- /dev/null +++ b/frontend/src/views/dataset/data/utils.js @@ -0,0 +1,11 @@ +export function getFieldName(fields, name) { + let n = name + n = n + '_copy' + for (let i = 0; i < fields.length; i++) { + const field = fields[i] + if (field.name === n) { + n = getFieldName(fields, n) + } + } + return n +}