Apidoc fixes for services-menuitem
parent
b26d072d2b
commit
8f6129447d
|
@ -9,7 +9,7 @@ import { RouteLocationRaw } from 'vue-router';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom command event.
|
* Custom command event.
|
||||||
* @see {@link MenuItem.command}
|
* @todo next release should be able to change see menuItem.command
|
||||||
*/
|
*/
|
||||||
export interface MenuItemCommandEvent {
|
export interface MenuItemCommandEvent {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -147,7 +147,7 @@ export default {
|
||||||
|
|
||||||
if (options) {
|
if (options) {
|
||||||
newDoc.children.push({
|
newDoc.children.push({
|
||||||
id: `api.${moduleName}.options`,
|
id: `api.options.${options[0].key}`,
|
||||||
label: 'Options',
|
label: 'Options',
|
||||||
component: DocApiTable,
|
component: DocApiTable,
|
||||||
data: this.setPropsData(options[0].values.props)
|
data: this.setPropsData(options[0].values.props)
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span v-else :id="id + '.' + v">
|
<span v-else :id="id + '.' + k">
|
||||||
{{ v }}
|
{{ v }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -94,18 +94,22 @@ export default {
|
||||||
},
|
},
|
||||||
isLinkType(value) {
|
isLinkType(value) {
|
||||||
if (this.label === 'Slots') return false;
|
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) {
|
setLinkPath(value, type) {
|
||||||
const currentRoute = this.$router.currentRoute.value.name;
|
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) {
|
relatedPropValue(value) {
|
||||||
return this.findRelatedProps(value).secondPart;
|
return this.findRelatedProps(value).secondPart;
|
||||||
|
|
Loading…
Reference in New Issue