From adbe61b2e9eef8ee6fcc97ab64a206bc5a73e6f9 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Thu, 25 Jul 2024 11:30:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E9=A1=B5=E9=9D=A2=E5=B7=AE?= =?UTF-8?q?=E4=B8=8D=E5=A4=9A=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ec_api/TabArea.vue | 97 ++++++++++++++----------------- src/store/index.js | 7 +-- 2 files changed, 47 insertions(+), 57 deletions(-) diff --git a/src/components/ec_api/TabArea.vue b/src/components/ec_api/TabArea.vue index 3cd0b0f..b431b40 100644 --- a/src/components/ec_api/TabArea.vue +++ b/src/components/ec_api/TabArea.vue @@ -1,5 +1,5 @@ @@ -224,4 +216,5 @@ function test() { .editor { margin-top: 20px; } + diff --git a/src/store/index.js b/src/store/index.js index b57298a..88d0eae 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -71,11 +71,8 @@ const ecApiModule = { // console.log('state.ec_api_data.api', state.ec_api_data.api) }, handle_sort_ec_select_api: (state, payload) => { - // console.log(state.ec_api_data.api) - const movedTab = state.ec_api_data.api.splice(payload.oldIndex - 1, 1)[0]; - // console.log(state.ec_api_data.api) - // console.log('movedTab', movedTab) - state.ec_api_data.api.splice(payload.newIndex - 1, 0, toValue(movedTab)); + const movedTab = state.ec_api_data.api.splice(payload.oldIndex-1, 1)[0]; + state.ec_api_data.api.splice(payload.newIndex-1, 0, movedTab); }, add_ec_api_data: (state, payload) => { // console.log('payload', payload)