From 1d939e714f59cac0922798ffa9584a1fea1811d8 Mon Sep 17 00:00:00 2001 From: Li Date: Tue, 14 Mar 2023 10:50:18 +0800 Subject: [PATCH] docs: add target attribute documentation for menu item (#191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加主题开发 - 导航菜单中关于 `target` 属性的文档 /kind documentation Fixes #190 ```release-note None ``` --- docs/developer-guide/theme/finder-apis/menu.md | 18 ++++++++++++++---- docs/developer-guide/theme/vo/MenuItemVo.md | 12 +++++++++++- .../developer-guide/theme/finder-apis/menu.md | 18 ++++++++++++++---- .../developer-guide/theme/vo/MenuItemVo.md | 10 ++++++++++ .../developer-guide/theme/finder-apis/menu.md | 18 ++++++++++++++---- .../developer-guide/theme/vo/MenuItemVo.md | 10 ++++++++++ .../developer-guide/theme/finder-apis/menu.md | 18 ++++++++++++++---- .../developer-guide/theme/vo/MenuItemVo.md | 10 ++++++++++ 8 files changed, 97 insertions(+), 17 deletions(-) diff --git a/docs/developer-guide/theme/finder-apis/menu.md b/docs/developer-guide/theme/finder-apis/menu.md index d8e8801..f440f81 100644 --- a/docs/developer-guide/theme/finder-apis/menu.md +++ b/docs/developer-guide/theme/finder-apis/menu.md @@ -30,9 +30,14 @@ menuFinder.getByName(name)
+
``` @@ -60,9 +65,14 @@ menuFinder.getPrimary()
+
``` diff --git a/docs/developer-guide/theme/vo/MenuItemVo.md b/docs/developer-guide/theme/vo/MenuItemVo.md index 21bcfe9..6f2bf02 100644 --- a/docs/developer-guide/theme/vo/MenuItemVo.md +++ b/docs/developer-guide/theme/vo/MenuItemVo.md @@ -17,12 +17,13 @@ "children": [ // 下级菜单项,菜单项的 metadata.name 集合 "string" ], + "target": "#Target", // 菜单页面打开方式,枚举类型 "targetRef": { // 与其他资源比如文章的关联,一般无需直接使用 "group": "string", "version": "string", "kind": "string", "name": "string" - } + }, }, "status": { "displayName": "string", // 显示名称 @@ -32,3 +33,12 @@ "parentName": "string", } ``` + +```java title="Target" +enum Target { + BLANK("_blank"), // 在新窗口打开 + SELF("_self"), // 在当前窗口打开 + PARENT("_parent"), // 在父窗口打开 + TOP("_top"); // 在顶级窗口打开 +} +``` diff --git a/versioned_docs/version-2.1/developer-guide/theme/finder-apis/menu.md b/versioned_docs/version-2.1/developer-guide/theme/finder-apis/menu.md index d8e8801..f440f81 100644 --- a/versioned_docs/version-2.1/developer-guide/theme/finder-apis/menu.md +++ b/versioned_docs/version-2.1/developer-guide/theme/finder-apis/menu.md @@ -30,9 +30,14 @@ menuFinder.getByName(name)
+
``` @@ -60,9 +65,14 @@ menuFinder.getPrimary()
+
``` diff --git a/versioned_docs/version-2.1/developer-guide/theme/vo/MenuItemVo.md b/versioned_docs/version-2.1/developer-guide/theme/vo/MenuItemVo.md index 21bcfe9..1e22e5c 100644 --- a/versioned_docs/version-2.1/developer-guide/theme/vo/MenuItemVo.md +++ b/versioned_docs/version-2.1/developer-guide/theme/vo/MenuItemVo.md @@ -17,6 +17,7 @@ "children": [ // 下级菜单项,菜单项的 metadata.name 集合 "string" ], + "target": "#Target", // 菜单页面打开方式,枚举类型 "targetRef": { // 与其他资源比如文章的关联,一般无需直接使用 "group": "string", "version": "string", @@ -32,3 +33,12 @@ "parentName": "string", } ``` + +```java title="Target" +enum Target { + BLANK("_blank"), // 在新窗口打开 + SELF("_self"), // 在当前窗口打开 + PARENT("_parent"), // 在父窗口打开 + TOP("_top"); // 在顶级窗口打开 +} +``` diff --git a/versioned_docs/version-2.2/developer-guide/theme/finder-apis/menu.md b/versioned_docs/version-2.2/developer-guide/theme/finder-apis/menu.md index d8e8801..f440f81 100644 --- a/versioned_docs/version-2.2/developer-guide/theme/finder-apis/menu.md +++ b/versioned_docs/version-2.2/developer-guide/theme/finder-apis/menu.md @@ -30,9 +30,14 @@ menuFinder.getByName(name)
+
``` @@ -60,9 +65,14 @@ menuFinder.getPrimary()
+
``` diff --git a/versioned_docs/version-2.2/developer-guide/theme/vo/MenuItemVo.md b/versioned_docs/version-2.2/developer-guide/theme/vo/MenuItemVo.md index 21bcfe9..1e22e5c 100644 --- a/versioned_docs/version-2.2/developer-guide/theme/vo/MenuItemVo.md +++ b/versioned_docs/version-2.2/developer-guide/theme/vo/MenuItemVo.md @@ -17,6 +17,7 @@ "children": [ // 下级菜单项,菜单项的 metadata.name 集合 "string" ], + "target": "#Target", // 菜单页面打开方式,枚举类型 "targetRef": { // 与其他资源比如文章的关联,一般无需直接使用 "group": "string", "version": "string", @@ -32,3 +33,12 @@ "parentName": "string", } ``` + +```java title="Target" +enum Target { + BLANK("_blank"), // 在新窗口打开 + SELF("_self"), // 在当前窗口打开 + PARENT("_parent"), // 在父窗口打开 + TOP("_top"); // 在顶级窗口打开 +} +``` diff --git a/versioned_docs/version-2.3/developer-guide/theme/finder-apis/menu.md b/versioned_docs/version-2.3/developer-guide/theme/finder-apis/menu.md index d8e8801..f440f81 100644 --- a/versioned_docs/version-2.3/developer-guide/theme/finder-apis/menu.md +++ b/versioned_docs/version-2.3/developer-guide/theme/finder-apis/menu.md @@ -30,9 +30,14 @@ menuFinder.getByName(name)
+
``` @@ -60,9 +65,14 @@ menuFinder.getPrimary()
+
``` diff --git a/versioned_docs/version-2.3/developer-guide/theme/vo/MenuItemVo.md b/versioned_docs/version-2.3/developer-guide/theme/vo/MenuItemVo.md index 21bcfe9..1e22e5c 100644 --- a/versioned_docs/version-2.3/developer-guide/theme/vo/MenuItemVo.md +++ b/versioned_docs/version-2.3/developer-guide/theme/vo/MenuItemVo.md @@ -17,6 +17,7 @@ "children": [ // 下级菜单项,菜单项的 metadata.name 集合 "string" ], + "target": "#Target", // 菜单页面打开方式,枚举类型 "targetRef": { // 与其他资源比如文章的关联,一般无需直接使用 "group": "string", "version": "string", @@ -32,3 +33,12 @@ "parentName": "string", } ``` + +```java title="Target" +enum Target { + BLANK("_blank"), // 在新窗口打开 + SELF("_self"), // 在当前窗口打开 + PARENT("_parent"), // 在父窗口打开 + TOP("_top"); // 在顶级窗口打开 +} +```