diff --git a/components/menuitem/MenuItem.d.ts b/components/menuitem/MenuItem.d.ts index 85fb0a88e..ec51456ac 100644 --- a/components/menuitem/MenuItem.d.ts +++ b/components/menuitem/MenuItem.d.ts @@ -9,7 +9,7 @@ import { RouteLocationRaw } from 'vue-router'; /** * Custom command event. - * @see {@link MenuItem.command} + * @todo next release should be able to change see menuItem.command */ export interface MenuItemCommandEvent { /** diff --git a/layouts/doc/DocApiSection.vue b/layouts/doc/DocApiSection.vue index 429fdcfda..52ffbde50 100644 --- a/layouts/doc/DocApiSection.vue +++ b/layouts/doc/DocApiSection.vue @@ -147,7 +147,7 @@ export default { if (options) { newDoc.children.push({ - id: `api.${moduleName}.options`, + id: `api.options.${options[0].key}`, label: 'Options', component: DocApiTable, data: this.setPropsData(options[0].values.props) diff --git a/layouts/doc/DocApiTable.vue b/layouts/doc/DocApiTable.vue index 502986205..43d4c8c8f 100644 --- a/layouts/doc/DocApiTable.vue +++ b/layouts/doc/DocApiTable.vue @@ -42,7 +42,7 @@ - + {{ v }} @@ -94,18 +94,22 @@ export default { }, isLinkType(value) { if (this.label === 'Slots') return false; + const validValues = ['confirmationoptions', 'toastmessageoptions']; - return value.toLowerCase().includes(this.id.split('.')[1]); + return value.toLowerCase().includes(this.id.split('.')[1]) || validValues.includes(value.toLowerCase()); }, setLinkPath(value, type) { const currentRoute = this.$router.currentRoute.value.name; - const componentName = this.id.split('.')[1]; + let componentName = this.id.split('.')[1]; - let definationType = type ? type : value.includes('Type') ? 'types' : value.includes('Event') ? 'events' : value.includes('MenuItem') ? 'options' : 'interfaces'; + const validValues = ['menuitem', 'confirmationoptions']; + let definationType = type ? type : value.includes('Type') ? 'types' : value.includes('Event') ? 'events' : validValues.includes(value.toLowerCase()) ? 'options' : 'interfaces'; - definationType = definationType === 'menuitem' ? 'options' : definationType; // This for the menuitem. @todo: need to update + if (componentName.includes('toast')) { + componentName = 'toast'; + } - return `/${currentRoute}/#api.${componentName}.${definationType}.${value}`; + return definationType === 'options' ? `/${currentRoute}/#api.${definationType}.${value}` : `/${currentRoute}/#api.${componentName}.${definationType}.${value}`; }, relatedPropValue(value) { return this.findRelatedProps(value).secondPart;