From c6f69602c1eba53ec5b80c2efd5408e56dce51e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Wed, 8 Mar 2023 01:49:05 +0300 Subject: [PATCH] Docapitable options link changed --- components/menuitem/MenuItem.d.ts | 3 ++- doc/common/apidoc/index.json | 23 ++++++++--------------- layouts/doc/DocApiTable.vue | 6 ++++-- pages/confirmpopup/index.vue | 2 +- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/components/menuitem/MenuItem.d.ts b/components/menuitem/MenuItem.d.ts index b0d97c06d..85fb0a88e 100644 --- a/components/menuitem/MenuItem.d.ts +++ b/components/menuitem/MenuItem.d.ts @@ -45,8 +45,9 @@ export interface MenuItem { /** * Callback to execute when item is clicked. * @param {MenuItemCommandEvent} event - Custom command event. + * @todo next release should be able to change */ - command?(event: MenuItemCommandEvent): void; + command?: (event: MenuItemCommandEvent) => void; /** * External link to navigate when item is clicked. */ diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index 80f0fea1d..bf3c11411 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -15356,6 +15356,13 @@ "default": "", "description": "Style class of the menuitem." }, + { + "name": "command", + "optional": true, + "readonly": false, + "type": "Function", + "default": "" + }, { "name": "disabled", "optional": true, @@ -15451,21 +15458,7 @@ "type": "any" } ], - "methods": [ - { - "name": "command", - "parameters": [ - { - "name": "event", - "optional": false, - "type": "MenuItemCommandEvent", - "description": "Custom command event." - } - ], - "returnType": "void", - "description": "Callback to execute when item is clicked." - } - ] + "methods": [] }, "MenuItemCommandEvent": { "description": "Custom command event.", diff --git a/layouts/doc/DocApiTable.vue b/layouts/doc/DocApiTable.vue index 4fe5f960a..502986205 100644 --- a/layouts/doc/DocApiTable.vue +++ b/layouts/doc/DocApiTable.vue @@ -99,9 +99,11 @@ export default { }, setLinkPath(value, type) { const currentRoute = this.$router.currentRoute.value.name; - const componentName = this.$route.hash.replace('#api.', '').split('.')[0]; + const componentName = this.id.split('.')[1]; - const definationType = type ? type : value.includes('Type') ? 'types' : value.includes('Event') ? 'events' : 'interfaces'; + let definationType = type ? type : value.includes('Type') ? 'types' : value.includes('Event') ? 'events' : value.includes('MenuItem') ? 'options' : 'interfaces'; + + definationType = definationType === 'menuitem' ? 'options' : definationType; // This for the menuitem. @todo: need to update return `/${currentRoute}/#api.${componentName}.${definationType}.${value}`; }, diff --git a/pages/confirmpopup/index.vue b/pages/confirmpopup/index.vue index 6bac0b766..da6ce48f1 100644 --- a/pages/confirmpopup/index.vue +++ b/pages/confirmpopup/index.vue @@ -4,7 +4,7 @@ header="ConfirmPopup" description="ConfirmPopup displays a confirmation overlay displayed relatively to its target." :componentDocs="docs" - :apiDocs="['ConfirmPopup', 'ConfirmationService', 'ConfirmationOptions']" + :apiDocs="['ConfirmPopup', 'ConfirmationService-UseConfirm', 'ConfirmationOptions']" />