|
|
|
@ -98,6 +98,8 @@ function initApiData() { |
|
|
|
|
if (param_item['param'] === 'pid') { |
|
|
|
|
param_item['value'] = UserApiData.value['base_info']['channel'] |
|
|
|
|
} |
|
|
|
|
// 写入默认值 |
|
|
|
|
param_item['default'] = param_item['value'] |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
}) |
|
|
|
@ -120,6 +122,16 @@ function addNewParams() { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 读取参数默认值 |
|
|
|
|
function loadDefault(param) { |
|
|
|
|
console.log(param) |
|
|
|
|
UserApiData.value.api[activeTab.value]['params'].forEach( p => { |
|
|
|
|
if (p['param'] === param) { |
|
|
|
|
p['value'] = p['default'] |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 准备获取url和发送请求需要的参数 |
|
|
|
|
function handle_request_data() { |
|
|
|
|
let data = {} |
|
|
|
@ -254,7 +266,7 @@ onMounted(() => { |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="重置" width="80"> |
|
|
|
|
<template v-slot="scope"> |
|
|
|
|
<el-button @click="test"> |
|
|
|
|
<el-button @click="loadDefault(scope.row.param)"> |
|
|
|
|
<el-icon> |
|
|
|
|
<Refresh/> |
|
|
|
|
</el-icon> |
|
|
|
|