Skip to content

Commit 82fca36

Browse files
committed
修改api模板
1 parent fc366c6 commit 82fca36

File tree

5 files changed

+29
-18
lines changed

5 files changed

+29
-18
lines changed

build/jsdocs/leaflet/docs.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"disqus":"",
99
"tags": {
1010
"allowUnknownTags": true,
11-
"linkdoc-leaflet":"http://leafletjs.com/reference-1.0.3.html",
12-
"linkdoc-htmlExtension":true
11+
"linkdoc-leaflet":"http://leafletjs.com/reference-1.0.3.html"
1312
},
1413
"source": {
1514
"includePattern": ".+\\.js?$",

build/jsdocs/openlayers/docs.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"disqus":"",
88
"tags": {
99
"allowUnknownTags": true,
10-
"linkdoc-openlayers":"https://openlayers.org/en/latest/apidoc/",
11-
"linkdoc-htmlExtension":true
10+
"linkdoc-openlayers":"https://openlayers.org/en/latest/apidoc/"
1211
},
1312
"source": {
1413
"includePattern": ".+\\.js?$",

build/jsdocs/plugins/linkdoc.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports.handlers = {
88
for (var i = 0; i < e.doclet.augments.length; i++) {
99
var a = e.doclet.augments[i];
1010
if (a.indexOf("@linkdoc")) {
11-
var reg = new RegExp("@(.*?)/");
11+
var reg = new RegExp("@(linkdoc.*?)/");
1212
var match = a.match(reg);
1313
if (match) {
1414
e.doclet.augments[i] = a.replace("@" + match[1] + "/", env.conf.tags[match[1]]);
@@ -20,5 +20,18 @@ exports.handlers = {
2020
}
2121
}
2222
}
23+
if (e.doclet.params) {
24+
for (var i = 0; i < e.doclet.params.length; i++) {
25+
var a = e.doclet.params[i].description;
26+
if (a && a.indexOf("@linkdoc")) {
27+
var reg = new RegExp("@(linkdoc.*?)/");
28+
var match = a.match(reg);
29+
if (match) {
30+
var str="@" + match[1] + "/";
31+
e.doclet.params[i].description = a.replace(new RegExp(str,'g'), "@link "+ env.conf.tags[match[1]]);
32+
}
33+
}
34+
}
35+
}
2336
}
2437
};

build/jsdocs/template/publish.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,12 @@ function attachModuleSymbols(doclets, modules) {
206206
function buildNav(members) {
207207
var nav = [];
208208

209-
if (members.namespaces.length) {
210-
_.each(members.namespaces, function (v) {
209+
210+
211+
if (members.classes.length) {
212+
_.each(members.classes, function (v) {
211213
nav.push({
212-
type: 'namespace',
214+
type: 'class',
213215
longname: v.longname,
214216
name: v.name,
215217
members: find({
@@ -231,11 +233,10 @@ function buildNav(members) {
231233
});
232234
});
233235
}
234-
235-
if (members.classes.length) {
236-
_.each(members.classes, function (v) {
236+
if (members.namespaces.length) {
237+
_.each(members.namespaces, function (v) {
237238
nav.push({
238-
type: 'class',
239+
type: 'namespace',
239240
longname: v.longname,
240241
name: v.name,
241242
members: find({
@@ -257,7 +258,6 @@ function buildNav(members) {
257258
});
258259
});
259260
}
260-
261261
return nav;
262262
}
263263

src/leaflet/mapping/BaiduTileLayer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import L from "leaflet";
77
* @extends L.TileLayer{@linkdoc-leaflet/#tilelayer}
88
* @param url -{string} 切片地址
99
* @param options -{Object} 切片参数。如:<br>
10-
* minZoom - {number} 最小缩放级别
11-
* maxZoom - {number} 最大缩放级别
12-
* bounds - {L.bounds} 显示范围
13-
* retina - {L.Browser} 浏览器显示分辨率
14-
* attribution - {string} 版权信息
10+
* minZoom - {number} 最小缩放级别 <br>
11+
* maxZoom - {number} 最大缩放级别 <br>
12+
* bounds - {[L.LatLngBounds]{@linkdoc-leaflet/#latlngbounds}} 显示范围 <br>
13+
* retina - {[L.Browser]{@linkdoc-leaflet/#browser}} 浏览器显示分辨率 <br>
14+
* attribution - {string} 版权信息 <br>
1515
*/
1616
export var BaiduTileLayer = L.TileLayer.extend({
1717

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