From 2987a25871c9c3d0580158d5a96b2aa02fbe0346 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 23 Jul 2024 15:05:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=A5=BD=E5=83=8F=E8=83=BD?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ec_api/BasicConfig.vue | 10 +-- src/components/ec_api/TabArea.vue | 118 +++++++++++++++----------- src/store/index.js | 31 +++---- src/views/ec_api/index.vue | 2 +- 4 files changed, 84 insertions(+), 77 deletions(-) diff --git a/src/components/ec_api/BasicConfig.vue b/src/components/ec_api/BasicConfig.vue index a007e4d..ef74244 100644 --- a/src/components/ec_api/BasicConfig.vue +++ b/src/components/ec_api/BasicConfig.vue @@ -125,6 +125,7 @@ function api_on_change() { function handle_api_data() { // 生成被选择的api的数组 + SelectApi.value = [] SelectApiId.value.forEach(api_id => { Api.value.forEach(api => { if (api.id === api_id) { @@ -138,13 +139,6 @@ function handle_api_data() { SelectApiParams.value[api_id] = ApiParams.value[api_id] } }) - - - console.log('Api.value', Api.value) - console.log('SelectApiId.value', SelectApiId.value) - console.log('SelectApi.value', SelectApi.value) - console.log('ApiParams.value', ApiParams.value) - console.log('SelectApiParams.value', SelectApiParams.value) } // 生成共享数据 @@ -159,8 +153,8 @@ function store_data() { }) console.log('select_data.value', select_data.value) // 写入store - store.commit('ecApiModule/change_ec_select_api', SelectApiId.value) store.commit('ecApiModule/add_ec_api_data', select_data.value) + store.commit('ecApiModule/change_ec_select_api', SelectApi.value) console.log('store.state.ecApiModule.ec_api_data', store.state.ecApiModule.ec_api_data) } diff --git a/src/components/ec_api/TabArea.vue b/src/components/ec_api/TabArea.vue index 3415fcf..925c9dd 100644 --- a/src/components/ec_api/TabArea.vue +++ b/src/components/ec_api/TabArea.vue @@ -1,5 +1,5 @@