语法
🌐 Syntax
{@tutorial tutorialID} [链接文本]{@tutorial tutorialID}
概述
🌐 Overview
{@tutorial} 内联标签创建一个指向你指定的教程标识符的链接。当你使用 {@tutorial} 标签时,你还可以提供链接文本,使用几种不同的格式之一。如果你没有提供任何链接文本,JSDoc 会使用教程的标题作为链接文本。
🌐 The {@tutorial} inline tag creates a link to the tutorial identifier that you specify. When you
use the {@tutorial} tag, you can also provide link text, using one of several different formats.
If you don't provide any link text, JSDoc uses the tutorial's title as the link text.
如果你需要链接到一个名称路径或 URL,请使用 {@link} 行内标签 而不是 {@tutorial} 标签。
🌐 If you need to link to a namepath or a URL, use the {@link} inline tag instead
of the {@tutorial} tag.
示例
🌐 Examples
以下示例展示了为 {@tutorial} 标签提供链接文本的所有方法:
🌐 The following example shows all of the ways to provide link text for the {@tutorial} tag:
/**
* See {@tutorial gettingstarted} and [Configuring the Dashboard]{@tutorial dashboard}.
* For more information, see {@tutorial create|Creating a Widget} and
* {@tutorial destroy Destroying a Widget}.
*/
function myFunction() {}
如果所有这些教程都已定义,并且 gettingstarted 教程的标题是“入门”,上述示例将产生类似以下的输出:
🌐 If all of these tutorials are defined, and the title of the gettingstarted tutorial is "Getting
Started," the example above produces output similar to the following:
See <a href="tutorial-gettingstarted.html">Getting Started</a> and
<a href="tutorial-dashboard.html">Configuring the Dashboard</a>.
For more information, see <a href="tutorial-create.html">Creating a Widget</a> and
<a href="tutorial-destroy.html">Destroying a Widget</a>.