语法
{@tutorial tutorialID} [链接文本]{@tutorial tutorialID}
概述
{@tutorial}
内联标记会创建指向您指定的教程标识符的链接。使用 {@tutorial}
标记时,您还可以使用多种不同格式提供链接文本。如果您未提供任何链接文本,JSDoc 会使用教程的标题作为链接文本。
如果您需要链接到名称路径或 URL,请使用 {@link}
内联标记,而不是 {@tutorial}
标记。
示例
以下示例展示了为 {@tutorial}
标记提供链接文本的所有方式
/**
* 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
教程的标题为“入门”,则上述示例会生成类似于以下内容的输出
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>.