From b43fe843266582231dcddb2b3adfb525682b3b73 Mon Sep 17 00:00:00 2001 From: roger_mac Date: Thu, 28 Dec 2023 20:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mock/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/mock/index.vue b/src/views/mock/index.vue index 89f6201..061cccf 100644 --- a/src/views/mock/index.vue +++ b/src/views/mock/index.vue @@ -306,6 +306,7 @@ const json_data = computed( // 处理开始和停止按键的逻辑 const running = ref(false) +const disableAll= ref(false) const startBtn_disable = ref(false) const startBtn_loading = ref(false) @@ -328,17 +329,20 @@ const handleStart = () => { mock_config[item]= checkedMockConfig.value.indexOf(item) >= 0 }) console.log(mock_config) - const data = JSON.stringify({mock_config: mock_config}) + const data = JSON.stringify({mock_config: mock_config, json_data: allJsonData.value}) console.log(data) start_mock(params, data).then(res => { }).catch(err => { }) + // 处理置灰逻辑 + disableAll.value = true } const handleEnd = () => { running.value = false startBtn_disable.value = false startBtn_loading.value = false + disableAll.value = false const params = {ip: selectIp.value} end_mock(params).then(res => { }).catch(err => { @@ -362,7 +366,7 @@ onMounted( > - + 全选 @@ -403,6 +408,7 @@ onMounted(