From 3f119b4d6a9f607317d56094189b35ed4927a864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Tue, 28 Feb 2023 14:28:34 +0300 Subject: [PATCH] DocApiSection updated for group components --- layouts/doc/DocApiSection.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layouts/doc/DocApiSection.vue b/layouts/doc/DocApiSection.vue index f9f1a3f62..9db3479fd 100644 --- a/layouts/doc/DocApiSection.vue +++ b/layouts/doc/DocApiSection.vue @@ -48,11 +48,13 @@ export default { }; const values = APIDocs[moduleName].interfaces.values; + const componentValues = APIDocs[moduleName]?.components; const props = values[`${docName}Props`]; const emits = values[`${docName}Emits`]; const slots = values[`${docName}Slots`]; - const methods = values[docName]; + const methods = componentValues ? componentValues[docName].methods : null; + const types = APIDocs[moduleName]['types']; let events = this.findEvents(values); const interfaces = this.findOtherInterfaces(values, docName); @@ -77,7 +79,7 @@ export default { }); } - if (slots && slots.methods.length) { + if (slots && slots.methods.length > 0) { newDoc.children.push({ id: `api.${moduleName}.slots`, label: 'Slots', @@ -87,12 +89,12 @@ export default { }); } - if (methods && methods.methods.length) { + if (methods && methods.values.length > 0) { newDoc.children.push({ id: `api.${moduleName}.methods`, label: 'Methods', component: DocApiTable, - data: this.setEmitData(methods.methods), + data: this.setEmitData(methods.values), description: APIDocs[moduleName].interfaces.methodDescription }); }