From 86fce41b0d759ce0ebf664c885da2da1bcf223eb Mon Sep 17 00:00:00 2001 From: sunhao Date: Wed, 13 Nov 2024 09:13:21 +0800 Subject: [PATCH] * [story #69184, doing] add commands to select api and show modules in DocApp. --- lib/zin/wg/docapp/js/v1.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/zin/wg/docapp/js/v1.js b/lib/zin/wg/docapp/js/v1.js index e4f3b626da..b609188a16 100644 --- a/lib/zin/wg/docapp/js/v1.js +++ b/lib/zin/wg/docapp/js/v1.js @@ -1048,6 +1048,16 @@ const commands = }); }, + /** + * 选择 API 文档。 + * Select the specified API doc. + */ + selectApi: function(_, args) + { + const apiID = args[0]; + console.log('> selectApi', apiID, `api.${getApiID(apiID)}`); + getDocApp().selectDoc(`api.${getApiID(apiID)}`); + }, /** * 显示结构列表。 @@ -1078,6 +1088,21 @@ const commands = listType: 'releases', }); }, + + /** + * 显示API 目录。 + * Show the api catalog. + */ + showModules: function() + { + getDocApp().changeState( + { + mode: 'list', + moduleID: 0, + docID: 0, + listType: '', + }); + }, /** * 加载懒加载内容。 * Load the lazy content.