#I4MKKW api接口调试支持文件上传,全局参数控制优化

This commit is contained in:
暮光:城中城
2021-12-15 23:20:17 +08:00
parent c176bd7577
commit e2a8c46afb
16 changed files with 206 additions and 61 deletions

View File

@@ -41,7 +41,7 @@
<a-select-option value="true">TRUE</a-select-option>
<a-select-option value="false">FALSE</a-select-option>
</a-select>
<a-upload v-else-if="isFileType(record.type)"
<a-upload v-else-if="isFileType(record)"
:file-list="record.value" name="file" :multiple="record.type === 'array'"
:before-upload="file=>{return beforeUpload(file, record)}"
:remove="file=>{return handleRemove(file, record)}"
@@ -121,11 +121,11 @@
paramListColumns.value.push({title: '参数值', dataIndex: 'value'});
paramListColumns.value.push({title: '', dataIndex: 'action', width: 40});
const beforeUpload = (file, record) => {
if (record.type !== 'array') {
record.value = [file];
} else {
record.value = [...record.value, file];
}
if (record.type !== 'array' || !(record.value instanceof Array) || record.value.length <= 0) {
record.value = [file];
} else {
record.value = [...record.value, file];
}
return false;
};
const handleRemove = (file, record) => {