Skip to content

Commit 5b7d703

Browse files
committed
【 fix 】文档 deprecated 标签的样式保持和 static 一致; review by xiongjj
1 parent 88bbde4 commit 5b7d703

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

build/jsdocs/template/publish.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,12 @@ exports.publish = function (taffyData, opts, tutorials) {
530530
addSignatureTypes(doclet);
531531
}
532532
var docMemberParent = find({ longname: doclet.memberof})[0];
533-
if (doclet.kind === 'constant' || (docMemberParent && docMemberParent.kind === 'class' && doclet.scope === 'static')) {
533+
if (doclet.kind === 'constant' || (docMemberParent && docMemberParent.kind === 'class' && doclet.scope === 'static') || doclet.deprecated) {
534534
doclet.kind === 'constant' && addSignatureTypes(doclet);
535535
var attribs = helper.getAttribs(doclet);
536+
if(doclet.deprecated) {
537+
attribs.unshift('deprecated');
538+
}
536539
var attribsString = buildAttribsString(attribs);
537540
if(!attribs.length) {
538541
return;

build/jsdocs/template/tmpl/details.tmpl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ var self = this;
2424
<dd class="tag-since"><ul class="dummy"><li><?js= since ?></dd>
2525
<?js } ?>
2626

27-
<?js if (data.deprecated) { ?>
28-
<dt class="important tag-deprecated">Deprecated</dt><?js
29-
if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
30-
else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li><ul></dd><?js }
31-
?>
32-
<?js } ?>
33-
3427
<?js if (data.author && author.length) {?>
3528
<dt class="tag-author">Author:</dt>
3629
<dd class="tag-author">

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy