diff --git a/src/views/Summery.vue b/src/views/Summery.vue
index 7a100dc358ed8e6020f285ccfc3eae1433bb1fc9..fb39ffb5637b9e8f9387bf47829d497c4ae33ff6 100644
--- a/src/views/Summery.vue
+++ b/src/views/Summery.vue
@@ -14,13 +14,15 @@ export default {
// 파ì´í”„ë¼ì¸ 리스트 호출한 ê²°ê³¼ê°’ì„ data 파ì¼ì— ì €ìž¥
this.pipelineList = (await pipeline()).data.data;
- // ìœ ì•„ì´ ì¶”ì¶œí• ë•Œ ì‚¬ìš©í• ì½”ë“œ
+ // í•„í„° ìœ ì•„ì´ ì¶”ì¶œí• ë•Œ ì‚¬ìš©í• ì½”ë“œ
// ë°ì´í„° íŒŒì¼ list ì— map ì„ ëŒë ¤ì„œ ê·¸ ì•ˆì— key ê°’ì„ ì¶”ì¶œ
// map object 형으로 í•œë²ˆì— ì¶”ì¶œí•˜ê¸°
- const getName = this.pipelineList.map((item)=>item.name);
- console.log(getName);
- const getKey = this.pipelineList.map((item)=>item.key);
- console.log(getKey)
+ // const getName = this.pipelineList.map((item)=>item.name);
+ // console.log(getName);
+ // const getKey = this.pipelineList.map((item)=>item.key);
+ // console.log(getKey)
+ const [names, keys] = this.pipelineList.map(item => [item.name, item.key]);
+ console.log(names, keys)
@@ -28,15 +30,14 @@ export default {
},
async getTable(){
// pipelineList ì—서 key ê°’ì„ ë½‘ì•„ë‚´ì„œ
- this.pipelineList.map((item)=>item.key)
- // key 를 넣어 매치시켜 불러온 table data 를 response ì— ë°›ìŒ
- .forEach(async (pipelineKey) => {
- const response = (await table(pipelineKey)).data.data
- // í…Œì´ë¸” ë°°ì—´ì„ 1ì°¨ì›ìœ¼ë¡œ ì •ë ¬í•´ì¤€ë‹¤.
- response.forEach(item => this.tableList.push(item))
- // í…Œì´ë¸” ë°°ì—´ì„ 2ì°¨ì›ìœ¼ë¡œ ì •ë ¬í•œë‹¤.
- // this.tableList.push(response)
- })
+ // ì´í„°ë ˆì´í„° 문법 for ... of 사용
+ for (const pipelineKey of this.pipelineList.map((item) => item.key)) {
+ const response = (await table(pipelineKey)).data.data
+ // í…Œì´ë¸” ë°°ì—´ì„ 1ì°¨ì›ìœ¼ë¡œ ì •ë ¬í•´ì¤€ë‹¤.
+ response.forEach(item => this.tableList.push(item))
+ // í…Œì´ë¸” ë°°ì—´ì„ 2ì°¨ì›ìœ¼ë¡œ ì •ë ¬í•œë‹¤.
+ // this.tableList.push(response)
+ }
}
},