@mapgis/webclient-mapboxgl-plugin 17.0.0 → 17.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +234 -89
- package/dist/es5/webclient-common.min.js +4 -4
- package/dist/es5/webclient-mapboxgl-plugin.min.js +1 -1
- package/dist/webclient-mapboxgl-plugin-es6.min.js +1 -1
- package/documention/EchartsLayer.html +6 -177
- package/documention/MapViewMapboxgl.html +8 -179
- package/documention/Popup.html +9 -180
- package/documention/Screenshot.html +6 -177
- package/documention/SketchEditorMapboxgl.html +7 -178
- package/documention/global.html +7 -178
- package/documention/index.html +6 -6
- package/documention/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.MapvLayer.html +7 -178
- package/documention/scripts/sideBar.js +76 -0
- package/documention/styles/app.min.css +1 -1
- package/documention/tutorial-1./345/277/253/351/200/237/345/205/245/351/227/250.html +7 -155
- package/package.json +1 -1
package/documention/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.MapvLayer.html
CHANGED
|
@@ -1,142 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
|
|
6
|
-
<meta charset="utf-8">
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
-
<title>Client for JavaScript MapvLayer</title>
|
|
9
|
-
<!--[if lt IE 9]>
|
|
10
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
-
<![endif]-->
|
|
12
|
-
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
|
|
13
|
-
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
|
|
14
|
-
<link type="text/css" rel="stylesheet" href="">
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<body class="layout small-header">
|
|
22
|
-
<div id="stickyNavbarOverlay"></div>
|
|
1
|
+
<header id="page-title" class="page-title">
|
|
23
2
|
|
|
3
|
+
<span class="page-title-main">类名</span>
|
|
4
|
+
<span class="page-title-sub">MapvLayer</span>
|
|
5
|
+
|
|
6
|
+
</header>
|
|
24
7
|
|
|
25
|
-
<div class="top-nav">
|
|
26
|
-
<div class="inner">
|
|
27
|
-
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
|
|
28
|
-
<span aria-hidden="true"></span>
|
|
29
|
-
<span aria-hidden="true"></span>
|
|
30
|
-
<span aria-hidden="true"></span>
|
|
31
|
-
</a>
|
|
32
|
-
<div class="logo">
|
|
33
|
-
|
|
34
|
-
<h1> MapGIS Client for JavaScript API</h1>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</div>
|
|
38
|
-
<div class="menu">
|
|
39
|
-
|
|
40
|
-
<div class="navigation">
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<a
|
|
44
|
-
class="link user-link "
|
|
45
|
-
href="/static/modules/common/api/common-mapgis/index.html"
|
|
46
|
-
>
|
|
47
|
-
Common
|
|
48
|
-
</a>
|
|
49
|
-
|
|
50
|
-
<a
|
|
51
|
-
class="link user-link "
|
|
52
|
-
href="/static/modules/cesium/api/cesium-mapgis/index.html"
|
|
53
|
-
>
|
|
54
|
-
Cesium-Plugin
|
|
55
|
-
</a>
|
|
56
|
-
|
|
57
|
-
<a
|
|
58
|
-
class="link user-link "
|
|
59
|
-
href="/static/modules/mapboxgl/api/mapboxgl-mapgis/index.html"
|
|
60
|
-
>
|
|
61
|
-
MapboxGL-Plugin
|
|
62
|
-
</a>
|
|
63
|
-
|
|
64
|
-
<a
|
|
65
|
-
class="link user-link "
|
|
66
|
-
href="/static/modules/leaflet/api/leaflet-mapgis/index.html"
|
|
67
|
-
>
|
|
68
|
-
Leaflet-Plugin
|
|
69
|
-
</a>
|
|
70
|
-
|
|
71
|
-
<a
|
|
72
|
-
class="link user-link "
|
|
73
|
-
href="/static/modules/openlayers/api/openLayers-mapgis/index.html"
|
|
74
|
-
>
|
|
75
|
-
OpenLayers-Plugin
|
|
76
|
-
</a>
|
|
77
|
-
|
|
78
|
-
<a
|
|
79
|
-
class="link user-link "
|
|
80
|
-
href="/static/modules/video/api/video-mapgis/index.html"
|
|
81
|
-
>
|
|
82
|
-
Video-Plugin
|
|
83
|
-
</a>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
<div id="main">
|
|
93
|
-
<div
|
|
94
|
-
class="sidebar "
|
|
95
|
-
id="sidebarNav"
|
|
96
|
-
>
|
|
97
|
-
<div>
|
|
98
|
-
<span class="mapgis-api-document-span"><a href="index.html">API文档</a></span>
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<div class="search-wrapper">
|
|
102
|
-
<input id="search" type="text" placeholder="搜索文档..." class="input">
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<nav>
|
|
106
|
-
|
|
107
|
-
<div class="category"><div onclick="toggleSideBar('ViewModule-sidebar')" id="ViewModule" style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">视图模块</div><ul id="ViewModule-sidebar" class="mapgis-sidebar-menus"><li class="mapgis-link"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a class="mapgis-link-name" title="MapViewMapboxgl" href="MapViewMapboxgl.html">MapViewMapboxgl</a><img id="MapViewMapboxgl-detail-arrow" onclick="toggleLinkDetail('MapViewMapboxgl-detail')" style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/up-arrow.png" alt=""><span style="display: none;"><p>二维场景视图(mapboxgl引擎),对地图引擎进行管理,如果要对地图图层进行管理请参考<code>Map</code>,<br/>
|
|
108
|
-
参考示例:
|
|
109
|
-
<a href='#MapViewMapboxgl'>[初始化二维场景视图]</a>
|
|
110
|
-
<br>[ES5引入方式]:<br/>
|
|
111
|
-
Zondy.MapViewMapboxgl() <br/>
|
|
112
|
-
[ES6引入方式]:<br/>
|
|
113
|
-
import { MapViewMapboxgl } from '@mapgis/webclient-mapboxgl-plugin' <br/></p></span></li><div class="mapgis-link-detail" id="MapViewMapboxgl-detail"><div><a href="MapViewMapboxgl.html#page-title">构造函数</a></div><div><a class="mapgis-link-name" href="MapViewMapboxgl.html#function">方法</a></div><div><ul><li><a title="fromJSON" class="mapgis-link-name" href="MapViewMapboxgl.html#fromJSON">fromJSON</a></li><li><a title="flyTo" class="mapgis-link-name" href="MapViewMapboxgl.html#flyTo">flyTo</a></li><li><a title="getCenter" class="mapgis-link-name" href="MapViewMapboxgl.html#getCenter">getCenter</a></li><li><a title="getExtent" class="mapgis-link-name" href="MapViewMapboxgl.html#getExtent">getExtent</a></li><li><a title="getScale" class="mapgis-link-name" href="MapViewMapboxgl.html#getScale">getScale</a></li><li><a title="getSize" class="mapgis-link-name" href="MapViewMapboxgl.html#getSize">getSize</a></li><li><a title="getZoom" class="mapgis-link-name" href="MapViewMapboxgl.html#getZoom">getZoom</a></li><li><a title="goTo" class="mapgis-link-name" href="MapViewMapboxgl.html#goTo">goTo</a></li><li><a title="hitTest" class="mapgis-link-name" href="MapViewMapboxgl.html#hitTest">hitTest</a></li><li><a title="takeScreenshot" class="mapgis-link-name" href="MapViewMapboxgl.html#takeScreenshot">takeScreenshot</a></li><li><a title="toJSON" class="mapgis-link-name" href="MapViewMapboxgl.html#toJSON">toJSON</a></li><li><a title="toMap" class="mapgis-link-name" href="MapViewMapboxgl.html#toMap">toMap</a></li><li><a title="toScreen" class="mapgis-link-name" href="MapViewMapboxgl.html#toScreen">toScreen</a></li></ul></div><div><a class="mapgis-link-name" href="MapViewMapboxgl.html#member">成员变量</a></div><div><ul><li><a title="engineType" class="mapgis-link-name" href="MapViewMapboxgl.html#engineType">engineType</a></li></ul></div></div><li class="mapgis-link"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a class="mapgis-link-name" title="Popup" href="Popup.html">Popup</a><img id="Popup-detail-arrow" onclick="toggleLinkDetail('Popup-detail')" style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/up-arrow.png" alt=""><span style="display: none;"><p>二维场景信息弹窗(mapboxgl引擎)
|
|
114
|
-
参考示例:
|
|
115
|
-
<a href='#MapView'>[初始化二维场景视图]</a>
|
|
116
|
-
[ES6引入方式]:<br/>
|
|
117
|
-
import { Popup } from '@mapgis/webclient-mapboxgl-plugin' <br/>
|
|
118
|
-
自定义样式说明:<br/>
|
|
119
|
-
zondy-popup__content 弹窗容器样式<br/>
|
|
120
|
-
zondy-popup__tip 弹窗对话框箭头样式<br/>
|
|
121
|
-
zondy-popup__header 弹窗头部样式<br/>
|
|
122
|
-
zondy-popup__content 弹窗主体样式<br/>
|
|
123
|
-
zondy-popup__footer 弹窗底部样式<br/></p></span></li><div class="mapgis-link-detail" id="Popup-detail"><div><a href="Popup.html#page-title">构造函数</a></div><div><a class="mapgis-link-name" href="Popup.html#function">方法</a></div><div><ul><li><a title="close" class="mapgis-link-name" href="Popup.html#close">close</a></li><li><a title="open" class="mapgis-link-name" href="Popup.html#open">open</a></li><li><a title="openPopup" class="mapgis-link-name" href="Popup.html#openPopup">openPopup</a></li></ul></div><div><a class="mapgis-link-name" href="Popup.html#member">成员变量</a></div><div><ul><li><a title="alignment" class="mapgis-link-name" href="Popup.html#alignment">alignment</a></li><li><a title="content" class="mapgis-link-name" href="Popup.html#content">content</a></li><li><a title="defaultButtons" class="mapgis-link-name" href="Popup.html#defaultButtons">defaultButtons</a></li><li><a title="location" class="mapgis-link-name" href="Popup.html#location">location</a></li><li><a title="title" class="mapgis-link-name" href="Popup.html#title">title</a></li><li><a title="view" class="mapgis-link-name" href="Popup.html#view">view</a></li></ul></div></div><li class="mapgis-link"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a class="mapgis-link-name" title="Screenshot" href="Screenshot.html">Screenshot</a><img id="Screenshot-detail-arrow" onclick="toggleLinkDetail('Screenshot-detail')" style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/up-arrow.png" alt=""><span style="display: none;"><p>打印工具</p></span></li><div class="mapgis-link-detail" id="Screenshot-detail"><div><a href="Screenshot.html#page-title">构造函数</a></div><div><a class="mapgis-link-name" href="Screenshot.html#member">成员变量</a></div><div><ul><li><a title="filename" class="mapgis-link-name" href="Screenshot.html#filename">filename</a></li><li><a title="format" class="mapgis-link-name" href="Screenshot.html#format">format</a></li><li><a title="height" class="mapgis-link-name" href="Screenshot.html#height">height</a></li><li><a title="isDownload" class="mapgis-link-name" href="Screenshot.html#isDownload">isDownload</a></li><li><a title="view" class="mapgis-link-name" href="Screenshot.html#view">view</a></li><li><a title="width" class="mapgis-link-name" href="Screenshot.html#width">width</a></li><li><a title="x" class="mapgis-link-name" href="Screenshot.html#x">x</a></li><li><a title="y" class="mapgis-link-name" href="Screenshot.html#y">y</a></li></ul></div></div></ul><div onclick="toggleSideBar('SketchEditorModule-sidebar')" id="SketchEditorModule" style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">草图编辑模块</div><ul id="SketchEditorModule-sidebar" class="mapgis-sidebar-menus"><li class="mapgis-link"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a class="mapgis-link-name" title="SketchEditorMapboxgl" href="SketchEditorMapboxgl.html">SketchEditorMapboxgl</a><img id="SketchEditorMapboxgl-detail-arrow" onclick="toggleLinkDetail('SketchEditorMapboxgl-detail')" style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/up-arrow.png" alt=""><span style="display: none;"><p>二维Mapboxgl引擎草图编辑类<br/>
|
|
124
|
-
<br>[ES5引入方式]:<br/>
|
|
125
|
-
const { SketchEditorMapboxgl } = Zondy <br/>
|
|
126
|
-
[ES6引入方式]:<br/>
|
|
127
|
-
import { SketchEditorMapboxgl } from "@mapgis/webclient-leaflet-plugin" <br/></p></span></li><div class="mapgis-link-detail" id="SketchEditorMapboxgl-detail"><div><a href="SketchEditorMapboxgl.html#page-title">构造函数</a></div><div><a class="mapgis-link-name" href="SketchEditorMapboxgl.html#function">方法</a></div><div><ul><li><a title="addVertex" class="mapgis-link-name" href="SketchEditorMapboxgl.html#addVertex">addVertex</a></li><li><a title="canRedo" class="mapgis-link-name" href="SketchEditorMapboxgl.html#canRedo">canRedo</a></li><li><a title="canUndo" class="mapgis-link-name" href="SketchEditorMapboxgl.html#canUndo">canUndo</a></li><li><a title="drawPolylineToPolygon" class="mapgis-link-name" href="SketchEditorMapboxgl.html#drawPolylineToPolygon">drawPolylineToPolygon</a></li><li><a title="getGeometry" class="mapgis-link-name" href="SketchEditorMapboxgl.html#getGeometry">getGeometry</a></li><li><a title="getSketchStyle" class="mapgis-link-name" href="SketchEditorMapboxgl.html#getSketchStyle">getSketchStyle</a></li><li><a title="redo" class="mapgis-link-name" href="SketchEditorMapboxgl.html#redo">redo</a></li><li><a title="remove" class="mapgis-link-name" href="SketchEditorMapboxgl.html#remove">remove</a></li><li><a title="removeVertex" class="mapgis-link-name" href="SketchEditorMapboxgl.html#removeVertex">removeVertex</a></li><li><a title="setSketchStyle" class="mapgis-link-name" href="SketchEditorMapboxgl.html#setSketchStyle">setSketchStyle</a></li><li><a title="split" class="mapgis-link-name" href="SketchEditorMapboxgl.html#split">split</a></li><li><a title="start" class="mapgis-link-name" href="SketchEditorMapboxgl.html#start">start</a></li><li><a title="startCustomDrawTool" class="mapgis-link-name" href="SketchEditorMapboxgl.html#startCustomDrawTool">startCustomDrawTool</a></li><li><a title="stop" class="mapgis-link-name" href="SketchEditorMapboxgl.html#stop">stop</a></li><li><a title="undo" class="mapgis-link-name" href="SketchEditorMapboxgl.html#undo">undo</a></li><li><a title="union" class="mapgis-link-name" href="SketchEditorMapboxgl.html#union">union</a></li><li><a title="updateVertex" class="mapgis-link-name" href="SketchEditorMapboxgl.html#updateVertex">updateVertex</a></li></ul></div></div></ul></div>
|
|
128
|
-
|
|
129
|
-
</nav>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="core" id="main-content-wrapper">
|
|
132
|
-
<div class="content">
|
|
133
|
-
<header id="page-title" class="page-title">
|
|
134
|
-
|
|
135
|
-
<span class="page-title-main">类名</span>
|
|
136
|
-
<span class="page-title-sub">MapvLayer</span>
|
|
137
|
-
|
|
138
|
-
</header>
|
|
139
|
-
|
|
140
8
|
|
|
141
9
|
|
|
142
10
|
|
|
@@ -314,7 +182,7 @@ import { SketchEditorMapboxgl } from "@mapgis/webclient-leaflet-plugin"
|
|
|
314
182
|
<dt class="tag-see">See:</dt>
|
|
315
183
|
<dd class="tag-see">
|
|
316
184
|
<ul>
|
|
317
|
-
<li><a class="mapgis-link-name" title="https://github.com/huiyan-fe/mapv/blob/master/API.md"
|
|
185
|
+
<li><a class="mapgis-link-name" title="https://github.com/huiyan-fe/mapv/blob/master/API.md" https://github.com/huiyan-fe/mapv/blob/master/API.md>https://github.com/huiyan-fe/mapv/blob/master/API.md</a></li>
|
|
318
186
|
</ul>
|
|
319
187
|
</dd>
|
|
320
188
|
|
|
@@ -403,43 +271,4 @@ import { SketchEditorMapboxgl } from "@mapgis/webclient-leaflet-plugin"
|
|
|
403
271
|
|
|
404
272
|
</article>
|
|
405
273
|
|
|
406
|
-
</section>
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
</div>
|
|
412
|
-
|
|
413
|
-
<footer class="footer">
|
|
414
|
-
<div class="content has-text-centered">
|
|
415
|
-
<p>文档生成<a href="https://github.com/jsdoc3/jsdoc">JSDoc 17.0.0</a></p>
|
|
416
|
-
<p class="sidebar-created-by">
|
|
417
|
-
<a href="http://www.smaryun.com" target="_blank">司马云</a> <span>© 2023 云生态圈</span>
|
|
418
|
-
<a href="http://webclient.smaryun.com/#/index" target="_blank">MapGIS Client for JavaScript</a>
|
|
419
|
-
</p>
|
|
420
|
-
</div>
|
|
421
|
-
</footer>
|
|
422
|
-
|
|
423
|
-
</div>
|
|
424
|
-
<div id="side-nav" class="side-nav">
|
|
425
|
-
<div style="margin-bottom: 10px;">
|
|
426
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#page-title">构造函数</a>
|
|
427
|
-
</div>
|
|
428
|
-
<div style="margin-bottom: 10px;">
|
|
429
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#member">成员变量</a>
|
|
430
|
-
</div>
|
|
431
|
-
<div style="margin-bottom: 10px;">
|
|
432
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#function">方法</a>
|
|
433
|
-
</div>
|
|
434
|
-
<div>
|
|
435
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#event">事件</a>
|
|
436
|
-
</div>
|
|
437
|
-
</div>
|
|
438
|
-
</div>
|
|
439
|
-
<script src="scripts/linenumber.js"> </script>
|
|
440
|
-
|
|
441
|
-
<script src="scripts/search.js"> </script>
|
|
442
|
-
|
|
443
|
-
<script src="scripts/sideBar.js"> </script>
|
|
444
|
-
</body>
|
|
445
|
-
</html>
|
|
274
|
+
</section>
|
|
@@ -9,3 +9,79 @@ function toggleLinkDetail(id) {
|
|
|
9
9
|
_arrow.style.transform = _dom.style.display === 'block' ? 'rotate(360deg)' : 'rotate(180deg)'
|
|
10
10
|
_dom.style.display = _dom.style.display === 'block' ? 'none' : 'block'
|
|
11
11
|
}
|
|
12
|
+
|
|
13
|
+
function getBaseUrl(url) {
|
|
14
|
+
const regex1 = /^(http:|https:)\/\/[0-9a-zA-Z.]+:[0-9]+/
|
|
15
|
+
const regex2 = /^(http:|https:)\/\/[0-9a-zA-Z.]+/
|
|
16
|
+
let match = url.match(regex1)
|
|
17
|
+
if (match && match[0]) {
|
|
18
|
+
return match[0]
|
|
19
|
+
} else {
|
|
20
|
+
match = url.match(regex2)
|
|
21
|
+
if (match && match[0]) {
|
|
22
|
+
return match[0]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return ''
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
(function() {
|
|
29
|
+
const targets = [ ...document.querySelectorAll('#sidebarNav li.mapgis-link a')]
|
|
30
|
+
targets.forEach(function (_target) {
|
|
31
|
+
_target.addEventListener('click', function (e) {
|
|
32
|
+
const _baseUrl = getBaseUrl(window.location.href)
|
|
33
|
+
fetch(_baseUrl + e.target.attributes[1].value, {
|
|
34
|
+
method: 'GET',
|
|
35
|
+
})
|
|
36
|
+
.then(response => response.text())
|
|
37
|
+
.then(data => {
|
|
38
|
+
const _contentDom = document.getElementById('main-content')
|
|
39
|
+
if (_contentDom) {
|
|
40
|
+
_contentDom.innerHTML = data
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
.catch(error => console.error('Error:', error))
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
const targets2 = [ ...document.querySelectorAll('#sidebarNav div div a#api-fold')]
|
|
47
|
+
targets2.forEach(function (_target) {
|
|
48
|
+
_target.addEventListener('click', function (e) {
|
|
49
|
+
const _baseUrl = getBaseUrl(window.location.href)
|
|
50
|
+
fetch(_baseUrl + e.target.attributes[1].value, {
|
|
51
|
+
method: 'GET',
|
|
52
|
+
})
|
|
53
|
+
.then(response => response.text())
|
|
54
|
+
.then(data => {
|
|
55
|
+
const _contentDom = document.getElementById('main-content')
|
|
56
|
+
if (_contentDom) {
|
|
57
|
+
_contentDom.innerHTML = data
|
|
58
|
+
const _aDom = document.createElement('a');
|
|
59
|
+
_aDom.href = e.target.attributes[0].value
|
|
60
|
+
_aDom.click()
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
.catch(error => console.error('Error:', error))
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const targets3 = [ ...document.querySelectorAll('#sidebarNav div div ul li a#api-member')]
|
|
68
|
+
targets3.forEach(function (_target) {
|
|
69
|
+
_target.addEventListener('click', function (e) {
|
|
70
|
+
const _baseUrl = getBaseUrl(window.location.href)
|
|
71
|
+
fetch(_baseUrl + e.target.attributes[1].value, {
|
|
72
|
+
method: 'GET',
|
|
73
|
+
})
|
|
74
|
+
.then(response => response.text())
|
|
75
|
+
.then(data => {
|
|
76
|
+
const _contentDom = document.getElementById('main-content')
|
|
77
|
+
if (_contentDom) {
|
|
78
|
+
_contentDom.innerHTML = data
|
|
79
|
+
const _aDom = document.createElement('a');
|
|
80
|
+
_aDom.href = e.target.attributes[0].value
|
|
81
|
+
_aDom.click()
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
.catch(error => console.error('Error:', error))
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
})()
|