automation实现inspect元素

This commit is contained in:
fofolee
2025-01-15 01:33:28 +08:00
parent 021cce5947
commit a3dc6479f2
11 changed files with 933 additions and 263 deletions

View File

@@ -85,7 +85,9 @@ export default {
},
// 判断是否是转为表格的结果,表格结果不需要换行,第二行一般包含分隔符---
isTable() {
return this.runResult?.[0]?.split("\n")?.[1]?.includes("---");
const result = this.runResult?.[0];
if (typeof result !== "string") return false;
return result.split("\n")?.[1]?.includes("---");
},
},
mounted() {

View File

@@ -37,13 +37,7 @@ export default defineComponent({
},
// 通用参数配置
commonConfig() {
return (
// 过滤掉特定函数排除的参数, excludeConfig格式为[要排除的参数索引]
this.modelValue.config?.filter(
(_, index) =>
!this.getSelectSubCommand()?.excludeConfig?.includes(index)
) || []
);
return this.modelValue.config || [];
},
// 特定函数独有参数配置config格式和通用的config一致
subCommandConfig() {