|
|
@ -98,6 +98,8 @@ function initApiData() { |
|
|
|
if (param_item['param'] === 'pid') { |
|
|
|
if (param_item['param'] === 'pid') { |
|
|
|
param_item['value'] = UserApiData.value['base_info']['channel'] |
|
|
|
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和发送请求需要的参数 |
|
|
|
// 准备获取url和发送请求需要的参数 |
|
|
|
function handle_request_data() { |
|
|
|
function handle_request_data() { |
|
|
|
let data = {} |
|
|
|
let data = {} |
|
|
@ -254,7 +266,7 @@ onMounted(() => { |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="重置" width="80"> |
|
|
|
<el-table-column label="重置" width="80"> |
|
|
|
<template v-slot="scope"> |
|
|
|
<template v-slot="scope"> |
|
|
|
<el-button @click="test"> |
|
|
|
<el-button @click="loadDefault(scope.row.param)"> |
|
|
|
<el-icon> |
|
|
|
<el-icon> |
|
|
|
<Refresh/> |
|
|
|
<Refresh/> |
|
|
|
</el-icon> |
|
|
|
</el-icon> |
|
|
|