diff --git a/api-generator/build-apidoc.js b/api-generator/build-apidoc.js index 6264801b6..f56c48531 100644 --- a/api-generator/build-apidoc.js +++ b/api-generator/build-apidoc.js @@ -324,11 +324,11 @@ if (project) { const childSinature = child.signatures[0]; const parameters = childSinature.parameters.reduce((acc, { name, type }, index) => (index === 0 ? `${name}: ${type.name}` : `${acc}, ${name}: ${type.name}`), ''); - type += ` \t ${childSinature.name}(${parameters}): ${childSinature.type?.name}, // ${childSinature.comment?.summary[0]?.text}\n `; + type += ` \t ${childSinature.name}(${parameters}): ${childSinature.type?.name}, // ${childSinature.comment?.summary[0]?.text}\n `; } else { const childType = child.type.elementType ? child.type.elementType.name : child.type.name; - type += ` \t ${child.name}: ${childType}, // ${child.comment?.summary[0]?.text}\n `; + type += ` \t ${child.name}: ${childType}, // ${child.comment?.summary[0]?.text}\n `; } }); } diff --git a/layouts/doc/DocApiTable.vue b/layouts/doc/DocApiTable.vue index aa6d9e796..8e585c354 100644 --- a/layouts/doc/DocApiTable.vue +++ b/layouts/doc/DocApiTable.vue @@ -29,18 +29,16 @@ @@ -86,22 +84,13 @@ export default { }, methods: { getType(value) { - const newValue = value?.split('|').map((item) => { + if (this.label === 'Slots') { + return value?.split('|'); + } + + return value?.split('|').map((item) => { return item.replace(/(\[|\]|<|>).*$/gm, '').trim(); }); - - return newValue; - }, - - getParameters(value) { - const newValue = value.split(':').map((item) => { - return item - .replace(/"/g, '') - .replace(/(\[|\]|<|>).*$/gm, '') - .trim(); - }); - - return this.getType(newValue[1]); }, isLinkType(value) { if (this.label === 'Slots') return false; @@ -161,3 +150,9 @@ export default { } }; + +