DocApiSection updated for group components
parent
a7a06dc92f
commit
3f119b4d6a
|
@ -48,11 +48,13 @@ export default {
|
||||||
};
|
};
|
||||||
|
|
||||||
const values = APIDocs[moduleName].interfaces.values;
|
const values = APIDocs[moduleName].interfaces.values;
|
||||||
|
const componentValues = APIDocs[moduleName]?.components;
|
||||||
|
|
||||||
const props = values[`${docName}Props`];
|
const props = values[`${docName}Props`];
|
||||||
const emits = values[`${docName}Emits`];
|
const emits = values[`${docName}Emits`];
|
||||||
const slots = values[`${docName}Slots`];
|
const slots = values[`${docName}Slots`];
|
||||||
const methods = values[docName];
|
const methods = componentValues ? componentValues[docName].methods : null;
|
||||||
|
|
||||||
const types = APIDocs[moduleName]['types'];
|
const types = APIDocs[moduleName]['types'];
|
||||||
let events = this.findEvents(values);
|
let events = this.findEvents(values);
|
||||||
const interfaces = this.findOtherInterfaces(values, docName);
|
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({
|
newDoc.children.push({
|
||||||
id: `api.${moduleName}.slots`,
|
id: `api.${moduleName}.slots`,
|
||||||
label: 'Slots',
|
label: 'Slots',
|
||||||
|
@ -87,12 +89,12 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (methods && methods.methods.length) {
|
if (methods && methods.values.length > 0) {
|
||||||
newDoc.children.push({
|
newDoc.children.push({
|
||||||
id: `api.${moduleName}.methods`,
|
id: `api.${moduleName}.methods`,
|
||||||
label: 'Methods',
|
label: 'Methods',
|
||||||
component: DocApiTable,
|
component: DocApiTable,
|
||||||
data: this.setEmitData(methods.methods),
|
data: this.setEmitData(methods.values),
|
||||||
description: APIDocs[moduleName].interfaces.methodDescription
|
description: APIDocs[moduleName].interfaces.methodDescription
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue