Commit 9ad52eec by 米嘉伟

Merge branch 'dev_zwpt' of http://47.92.108.28/changchao/founder_vue into dev_zwpt

parents 0fbb615f 8efe58fb
......@@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"docs": "jsdoc -c jsdoc.json",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>base.js - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">接口文档首页</a></h2><h3>Modules</h3><ul><li><a href="module-%25E6%25B5%258B%25E8%25AF%2595.html">测试</a></li><li><a href="module-%25E6%25B5%258B%25E8%25AF%25952.html">测试2</a></li></ul>
</nav>
<div id="main">
<h1 class="page-title">base.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/*
* @Author: your name
* @Date: 2021-11-02 15:39:51
* @LastEditTime: 2021-12-08 16:47:06
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\api\base.js
*/
/**
* @module 测试2
*/
var relUrlIp = window.location.host.substring(
0,
window.location.host.length - 5
);
let base = {
bigurl: "",
mapurl: "",
bigwfwurl: "",
bigservicesurl: "",
alyIP: "",
naotuPath: "",
XingZhen: "",
ZhiTu_url: "",
naotuurl: "",
Ptlogin: "",
ebss: "",
test: ""
};
if (
relUrlIp == "68.174.69.46" ||
relUrlIp == "68.175.7.118" ||
relUrlIp == "65.65.100.205" ||
relUrlIp == "68.175.7.150" ||
relUrlIp == "68.175.7.95" ||
relUrlIp == "68.174.25.98" ||
relUrlIp == "68.175.7.120"
) {
//地图后台服务路径 公安网
base.XingZhen = "http://68.174.69.95";
base.mapurl = "http://68.174.25.99:8051";
/*登陆*/
base.Ptlogin = "http://68.174.25.99:8061";
base.ebss = "http://68.174.25.107:8090";
/*脑图服务旧 公安网*/
base.bigurl = "http://77.1.24.51:8080";
/*东莞智通服务*/
base.ZhiTu_url = "http://39.99.159.210:8053";
/*脑图微服务新*/
base.bigwfwurl = "http://77.1.24.51:8050";
/*以图搜图*/
base.naotuurl = "http://47.92.226.24:8051";
base.bigservicesurl = "http://77.1.24.51:9040";
base.naotuPath = "http://68.174.25.90:8101";
/*阿里云ip*/
base.alyIP = "47.92.48.137";
} else if (relUrlIp == "47.92.48.137") {
debugger;
//地图后台服务路径
base.XingZhen = "http://68.174.69.95";
base.mapurl = "http://47.92.48.137:8050";
base.bigurl = "http://47.92.48.137:8080";
base.bigwfwurl = "http://47.92.225.109:8050";
base.bigservicesurl = "http://47.92.225.109:9040";
base.naotuPath = "http://47.92.48.137:9099";
base.naotuurl = "http://39.99.159.210:8051";
base.ZhiTu_url = "http://39.99.159.210:8053";
/*阿里云ip*/
base.alyIP = "47.92.48.137";
base.test = "http://39.99.159.210:8052";
} else {
//地图后台服务路径
base.XingZhen = "http://192.168.1.110";
base.mapurl = "http://39.99.159.210:8051";
base.bigurl = "http://47.92.48.137:8080";
base.bigwfwurl = "http://47.92.225.109:8050";
base.bigservicesurl = "http://47.92.225.109:9040";
base.naotuPath = "http://47.92.48.137:9099";
base.naotuurl = "http://39.99.159.210:8051";
base.ZhiTu_url = "http://39.99.159.210:8053";
base.Ptlogin = "http://39.99.159.210:8052";
/*阿里云ip*/
base.alyIP = "localhost";
base.test = "http://39.99.159.210:8052";
}
export default base;
</code></pre>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> on Wed Dec 08 2021 17:06:51 GMT+0800 (中国标准时间) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/prettify/jquery-3.2.1.min.js"></script>
<script src="scripts/prettify/http.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>home.js - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">接口文档首页</a></h2><h3>Modules</h3><ul><li><a href="module-%25E6%25B5%258B%25E8%25AF%2595.html">测试</a></li><li><a href="module-%25E6%25B5%258B%25E8%25AF%25952.html">测试2</a></li></ul>
</nav>
<div id="main">
<h1 class="page-title">home.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/*
* @Author: your name
* @Date: 2021-11-02 15:39:51
* @LastEditTime: 2021-12-08 16:40:52
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\api\home.js
*/
/**
* @module 测试
*/
import { get, post } from "@/utils/http.js";
import base from "@/api/base";
// import qs from "qs";
export const Home = params => post(`${base.test}/getNewRelationInfo`, params);
// @description (描述一个标识)
export const test = params =>
post("http://39.99.159.210:8052/getCarRyxx", params);
export const test1 = params =>
get("http://39.99.159.210:8051/getXyrSaxxDg", params);
export const login = params =>
post("https://uniapp.b2b2c.niuteam.cn/api/login/login", params);
export const code = params =>
post("https://uniapp.b2b2c.niuteam.cn/api/captcha/captcha", params);
</code></pre>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> on Wed Dec 08 2021 17:06:51 GMT+0800 (中国标准时间) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/prettify/jquery-3.2.1.min.js"></script>
<script src="scripts/prettify/http.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Home - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">接口文档首页</a></h2><h3>Modules</h3><ul><li><a href="module-%25E6%25B5%258B%25E8%25AF%2595.html">测试</a></li><li><a href="module-%25E6%25B5%258B%25E8%25AF%25952.html">测试2</a></li></ul>
</nav>
<div id="main">
<section class="package">
<h3> </h3>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> on Wed Dec 08 2021 17:06:51 GMT+0800 (中国标准时间) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/prettify/jquery-3.2.1.min.js"></script>
<script src="scripts/prettify/http.js"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>测试 - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">接口文档首页</a></h2><h3>Modules</h3><ul><li><a href="module-%25E6%25B5%258B%25E8%25AF%2595.html">测试</a></li><li><a href="module-%25E6%25B5%258B%25E8%25AF%25952.html">测试2</a></li></ul>
</nav>
<div id="main">
<h1 class="page-title">测试</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
</div>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> on Wed Dec 08 2021 17:06:51 GMT+0800 (中国标准时间) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/prettify/jquery-3.2.1.min.js"></script>
<script src="scripts/prettify/http.js"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>测试2 - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">接口文档首页</a></h2><h3>Modules</h3><ul><li><a href="module-%25E6%25B5%258B%25E8%25AF%2595.html">测试</a></li><li><a href="module-%25E6%25B5%258B%25E8%25AF%25952.html">测试2</a></li></ul>
</nav>
<div id="main">
<h1 class="page-title">测试2</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
</div>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> on Wed Dec 08 2021 17:06:51 GMT+0800 (中国标准时间) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/prettify/jquery-3.2.1.min.js"></script>
<script src="scripts/prettify/http.js"></script>
</body>
</html>
\ No newline at end of file
function hideAllButCurrent(){
//by default all submenut items are hidden
//but we need to rehide them for search
document.querySelectorAll("nav > ul > li > ul li").forEach(function(parent) {
parent.style.display = "none";
});
//only current page (if it exists) should be opened
var file = window.location.pathname.split("/").pop().replace(/\.html/, '');
document.querySelectorAll("nav > ul > li > a").forEach(function(parent) {
var href = parent.attributes.href.value.replace(/\.html/, '');
if (file === href) {
parent.parentNode.querySelectorAll("ul li").forEach(function(elem) {
elem.style.display = "block";
});
}
});
}
hideAllButCurrent();
\ No newline at end of file
/*global document */
(function() {
var source = document.getElementsByClassName('prettyprint source linenums');
var i = 0;
var lineNumber = 0;
var lineId;
var lines;
var totalLines;
var anchorHash;
if (source && source[0]) {
anchorHash = document.location.hash.substring(1);
lines = source[0].getElementsByTagName('li');
totalLines = lines.length;
for (; i < totalLines; i++) {
lineNumber++;
lineId = 'line' + lineNumber;
lines[i].id = lineId;
if (lineId === anchorHash) {
lines[i].className += ' selected';
}
}
}
})();
function scrollToNavItem() {
var path = window.location.href.split('/').pop().replace(/\.html/, '');
document.querySelectorAll('nav a').forEach(function(link) {
var href = link.attributes.href.value.replace(/\.html/, '');
if (path === href) {
link.scrollIntoView({block: 'center'});
return;
}
})
}
scrollToNavItem();
//IE Fix, src: https://www.reddit.com/r/programminghorror/comments/6abmcr/nodelist_lacks_foreach_in_internet_explorer/
if (typeof(NodeList.prototype.forEach)!==typeof(alert)){
NodeList.prototype.forEach=Array.prototype.forEach;
}
\ No newline at end of file
/*
* @Author: your name
* @Date: 2021-11-18 09:49:09
* @LastEditTime: 2021-11-22 11:11:40
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \SpaceBigDataPlatform\src\utils\docdash\static\scripts\prettify\http.js
*/
var len = $('button').length
for (let i = 0; i < len; i++) {
$('button').eq(i).click(function () {
var valueType = $('.defaultValueType').eq(i).text().replace(/\s/g,'')
var oldValue = $('.defaultValue').eq(i).text()?$('.defaultValue').eq(i).text():$('.defaultValue').eq(i).prevObject[0].innerText
var url = $('.url').eq(i).text()
var type = $('.method').eq(i).text().replace(/"/g,'')
var data = {};
var dataType = '';
if(oldValue != 'null'){
if(valueType == 'Object'){
let data1 = new Object();
let str = oldValue.replace(/{/,'').replace(/}/,'').replace(/"/g,'')
let arr = str.split(',');
arr.forEach(el=>{
let elArr = el.split(':');
data1[elArr[0]] = elArr[1] == ""?'':elArr[1]
})
data = data1
dataType = "json"
console.log(data,'datadatadata')
}else if(valueType == 'String'){
let brr;
let str = '?'
if(oldValue.indexOf(',')){
brr = oldValue.split(',');
brr.forEach((el,index)=>{
if(index+1 == brr.length){
str += el
}else{
str = str + el +'&'
}
})
}else{
str += oldValue
}
url += str;
dataType = "text"
}
}
test(url,type,data,dataType)
})
}
$("#cover").click(function () {
$("#cover").css('display','none');
$("#dialog").css('display','none');
$('#dialog').text('');
$('body').css({
  "overflow-x":"auto",
  "overflow-y":"auto"
});
})
/**
*
* @param {String} url
* @param {String} type
* @param {*} data
* @param {String} dataType
* @description 请求接口
*/
function test(url,type,data,dataType){
$.ajax({
type,
url,
data,
dataType,
success: (res)=>{
var result = '';
if(res.constructor === String && res != undefined && res.length>0){
result = JSON.parse(res)
}else{
result = res
}
console.log(result,'resultresultresult')
var msgStr = '返回结果';
if(res.msg) msgStr = res.msg;
var str = "<ul><li style='text-align:center;background:#6d426d;color:#fff;height:40px;line-height:40px;'><span class='content'>"+
msgStr + "</span></li><li style='height: 350px;padding:5px;'><span class='title'>返回数据:</span><div style='height:325px; overflow-y:scroll;overflow-wrap: break-word;'>"+
dataStr + "</div></li></ul>"
$("#cover").css('display','block');
$("#dialog").css('display','block');
$('#dialog').append(str);
$('body').css({
  "overflow-x":"hidden",
  "overflow-y":"hidden"
});
},
});
}
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
var searchAttr = 'data-search-mode';
function contains(a,m){
return (a.textContent || a.innerText || "").toUpperCase().indexOf(m) !== -1;
};
//on search
document.getElementById("nav-search").addEventListener("keyup", function(event) {
var search = this.value.toUpperCase();
if (!search) {
//no search, show all results
document.documentElement.removeAttribute(searchAttr);
document.querySelectorAll("nav > ul > li:not(.level-hide)").forEach(function(elem) {
elem.style.display = "block";
});
if (typeof hideAllButCurrent === "function"){
//let's do what ever collapse wants to do
hideAllButCurrent();
} else {
//menu by default should be opened
document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) {
elem.style.display = "block";
});
}
} else {
//we are searching
document.documentElement.setAttribute(searchAttr, '');
//show all parents
document.querySelectorAll("nav > ul > li").forEach(function(elem) {
elem.style.display = "block";
});
//hide all results
document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) {
elem.style.display = "none";
});
//show results matching filter
document.querySelectorAll("nav > ul > li > ul a").forEach(function(elem) {
if (!contains(elem.parentNode, search)) {
return;
}
elem.parentNode.style.display = "block";
});
//hide parents without children
document.querySelectorAll("nav > ul > li").forEach(function(parent) {
var countSearchA = 0;
parent.querySelectorAll("a").forEach(function(elem) {
if (contains(elem, search)) {
countSearchA++;
}
});
var countUl = 0;
var countUlVisible = 0;
parent.querySelectorAll("ul").forEach(function(ulP) {
// count all elements that match the search
if (contains(ulP, search)) {
countUl++;
}
// count all visible elements
var children = ulP.children
for (i=0; i<children.length; i++) {
var elem = children[i];
if (elem.style.display != "none") {
countUlVisible++;
}
}
});
if (countSearchA == 0 && countUl === 0){
//has no child at all and does not contain text
parent.style.display = "none";
} else if(countSearchA == 0 && countUlVisible == 0){
//has no visible child and does not contain text
parent.style.display = "none";
}
});
}
});
\ No newline at end of file
.pln {
color: #ddd;
}
/* string content */
.str {
color: #61ce3c;
}
/* a keyword */
.kwd {
color: #fbde2d;
}
/* a comment */
.com {
color: #aeaeae;
}
/* a type name */
.typ {
color: #8da6ce;
}
/* a literal value */
.lit {
color: #fbde2d;
}
/* punctuation */
.pun {
color: #ddd;
}
/* lisp open bracket */
.opn {
color: #000000;
}
/* lisp close bracket */
.clo {
color: #000000;
}
/* a markup tag name */
.tag {
color: #8da6ce;
}
/* a markup attribute name */
.atn {
color: #fbde2d;
}
/* a markup attribute value */
.atv {
color: #ddd;
}
/* a declaration */
.dec {
color: #ef5050;
}
/* a variable name */
.var {
color: #c82829;
}
/* a function name */
.fun {
color: #4271ae;
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0;
}
#cover {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: none;
background-color: rgba(0, 0, 0, 0.3);
}
#dialog {
width: 600px;
height: 400px;
background: #fff;
position: fixed;
display: none;
top: 25%;
left: 30%;
}
#dialog ul {
padding: 0;
height: 400px;
margin: 0;
}
#dialog ul li {
list-style: none;
}
#dialog ul li .title {
font-weight: 300;
color: #4d4e53;
color: #fff;
font-family: "Helvetica Neue", Helvetica, sans-serif;
font-size: 13px;
}
/*
* @Author: your name
* @Date: 2021-11-02 15:39:51
* @LastEditTime: 2021-12-08 16:47:06
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\api\base.js
*/
/**
* @module 测试2
*/
var relUrlIp = window.location.host.substring(
0,
window.location.host.length - 5
......
/*
* @Author: your name
* @Date: 2021-11-02 15:39:51
* @LastEditTime: 2021-12-08 16:40:52
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\api\home.js
*/
/**
* @module 测试
*/
import { get, post } from "@/utils/http.js";
import base from "@/api/base";
// import qs from "qs";
export const Home = params => post(`${base.test}/getNewRelationInfo`, params);
// @description (描述一个标识)
export const test = params =>
post("http://39.99.159.210:8052/getCarRyxx", params);
......
## Version 1.2.0
* [feature] host fonts locally
* [feature] separate styles for headers inside user markdown
* [feature] hide static/private method depending of the config
* [fix] fix empty source code lines in some browsers
* [fix] improved viewing theme on smaller screens
## Version 1.1.1
* [feature] scroll to currently opened method on page load
* [fix] fixed searching in IE11
* [fix] hiding/showing find exact match to open only single relevant section
## Version 1.1.0
* [scripts] remove jQuery as dependency
* [feature] allow aliasing event names
## Version 1.0.3
* [style] break headers into multiple lines
* [style] break links in descriptions into multiple lines
* [fix] fix ancestor check when there are none, like including tutorials
* [fix] remove unnecessary files from published package
* [fix] stop crashing on incorrect params JSDoc comments
* [feature] add displaying version from package.json when it is provided
* [feature] add support for yield
* [feature] add support for namepsaces that are functions
* [feature] add support for interfaces
* [feature] add support for modifies
## Version 1.0.2
* [styles] increase space between custom menu items
* [option] Added `wrap` option to wrap long names instead of trimming them
* [option] Added `navLevel` option to control depth level to show in navbar, starting at 0
* [option] Added `private` option to show/hide @private in navbar
## Version 1.0.1
* Allow adding custom menu items
* Remove line-height: 160%
## Version 1.0.0
* Add option to add disqus comments to each page
* Add option to filter through navigation items
* Add option to have menus collapsed by default and only open the one for the current page
* Add option to provide custom site title
* Add option to provide meta information for the website
* Add option to provide opengraph information for the website
* Add viewport meta data
* Added global table styles
* Added support for @hidecontainer (jsdoc 3.5.0)
* Added support for useLongnameInNav
* Allow including typedefs in the menu
* Allow inclusion of custom CSS
* Allow injecting external or local copied scripts into HTML
* Allow removing single and double quotes from pathnames
* Fix crash when @example is empty or undefined
* Fix issue with node 8.5
* Fixing copyFile problem on some systems or nodejs versions
* Removes arbitrary width property
* Support ordering of the main navbar sections
\ No newline at end of file
# License
Docdash is free software, licensed under the Apache License, Version 2.0 (the
"License"). Commercial and non-commercial use are permitted in compliance with
the License.
Copyright (c) 2016 Clement Moron <clenemt@gmail.com> and the
[contributors to docdash](https://github.com/clenemt/docdash/graphs/contributors).
All rights reserved.
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
In addition, a copy of the License is included with this distribution.
As stated in Section 7, "Disclaimer of Warranty," of the License:
> Licensor provides the Work (and each Contributor provides its Contributions)
> on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
> express or implied, including, without limitation, any warranties or
> conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
> PARTICULAR PURPOSE. You are solely responsible for determining the
> appropriateness of using or redistributing the Work and assume any risks
> associated with Your exercise of permissions under this License.
The source code for docdash is available at:
https://github.com/clenemt/docdash
# Third-Party Software
Docdash includes or depends upon the following third-party software, either in
whole or in part. Each third-party software package is provided under its own
license.
## JSDoc 3
JSDoc 3 is free software, licensed under the Apache License, Version 2.0 (the
"License"). Commercial and non-commercial use are permitted in compliance with
the License.
Copyright (c) 2011-2016 Michael Mathews <micmath@gmail.com> and the
[contributors to JSDoc](https://github.com/jsdoc3/jsdoc/graphs/contributors).
All rights reserved.
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
In addition, a copy of the License is included with this distribution.
As stated in Section 7, "Disclaimer of Warranty," of the License:
> Licensor provides the Work (and each Contributor provides its Contributions)
> on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
> express or implied, including, without limitation, any warranties or
> conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
> PARTICULAR PURPOSE. You are solely responsible for determining the
> appropriateness of using or redistributing the Work and assume any risks
> associated with Your exercise of permissions under this License.
The source code for JSDoc 3 is available at:
https://github.com/jsdoc3/jsdoc
# Docdash
[![Build Status](https://api.travis-ci.org/clenemt/docdash.png?branch=master)](https://travis-ci.org/clenemt/docdash) [![npm version](https://badge.fury.io/js/docdash.svg)](https://badge.fury.io/js/docdash) [![license](https://img.shields.io/npm/l/docdash.svg)](LICENSE.md)
A clean, responsive documentation template theme for JSDoc 3.
![docdash-screenshot](https://cloud.githubusercontent.com/assets/447956/13398144/4dde7f36-defd-11e5-8909-1a9013302cb9.png)
![docdash-screenshot-2](https://cloud.githubusercontent.com/assets/447956/13401057/e30effd8-df0a-11e5-9f51-66257ac38e94.jpg)
## Example
See http://clenemt.github.io/docdash/ for a sample demo. :rocket:
## Install
```bash
$ npm install docdash
```
## Usage
Clone repository to your designated `jsdoc` template directory, then:
```bash
$ jsdoc entry-file.js -t path/to/docdash
```
## Usage (npm)
In your projects `package.json` file add a new script:
```json
"script": {
"generate-docs": "node_modules/.bin/jsdoc -c jsdoc.json"
}
```
In your `jsdoc.json` file, add a template option.
```json
"opts": {
"template": "node_modules/docdash"
}
```
## Sample `jsdoc.json`
See the config file for the [fixtures](fixtures/fixtures.conf.json) or the sample below.
```json
{
"tags": {
"allowUnknownTags": false
},
"source": {
"include": "../js",
"includePattern": ".js$",
"excludePattern": "(node_modules/|docs)"
},
"plugins": [
"plugins/markdown"
],
"opts": {
"template": "assets/template/docdash/",
"encoding": "utf8",
"destination": "docs/",
"recurse": true,
"verbose": true
},
"templates": {
"cleverLinks": false,
"monospaceLinks": false
}
}
```
## Options
Docdash supports the following options:
```json5
{
"docdash": {
"static": [false|true], // Display the static members inside the navbar
"sort": [false|true], // Sort the methods in the navbar
"sectionOrder": [ // Order the main section in the navbar (default order shown here)
"Classes",
"Modules",
"Externals",
"Events",
"Namespaces",
"Mixins",
"Tutorials",
"Interfaces"
],
"disqus": "", // Shortname for your disqus (subdomain during site creation)
"openGraph": { // Open Graph options (mostly for Facebook and other sites to easily extract meta information)
"title": "", // Title of the website
"type": "website", // Type of the website
"image": "", // Main image/logo
"site_name": "", // Site name
"url": "" // Main canonical URL for the main page of the site
},
"meta": { // Meta information options (mostly for search engines that have not indexed your site yet)
"title": "", // Also will be used as postfix to actualy page title, prefixed with object/document name
"description": "", // Description of overal contents of your website
"keyword": "" // Keywords for search engines
},
"search": [false|true], // Display seach box above navigation which allows to search/filter navigation items
"collapse": [false|true], // Collapse navigation by default except current object's navigation of the current page
"wrap": [false|true], // Wrap long navigation names instead of trimming them
"typedefs": [false|true], // Include typedefs in menu
"navLevel": [integer], // depth level to show in navbar, starting at 0 (false or -1 to disable)
"private": [false|true], // set to false to not show @private in navbar
"removeQuotes": [none|all|trim],// Remove single and double quotes, trim removes only surrounding ones
"scripts": [], // Array of external (or relative local copied using templates.default.staticFiles.include) js or css files to inject into HTML,
"menu": { // Adding additional menu items after Home
"Project Website": { // Menu item name
"href":"https://myproject.com", //the rest of HTML properties to add to manu item
"target":"_blank",
"class":"menu-item",
"id":"website_link"
},
"Forum": {
"href":"https://myproject.com.forum",
"target":"_blank",
"class":"menu-item",
"id":"forum_link"
}
}
}
}
```
Place them anywhere inside your `jsdoc.json` file.
## Contributors
[![0](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/0)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/0)
[![1](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/1)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/1)
[![2](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/2)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/2)
[![3](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/3)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/3)
[![4](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/4)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/4)
[![5](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/5)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/5)
[![6](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/6)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/6)
[![7](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/7)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/7)
## Thanks
Thanks to [lodash](https://lodash.com) and [minami](https://github.com/nijikokun/minami).
## License
Licensed under the Apache License, version 2.0. (see [Apache-2.0](LICENSE.md)).
{
"_from": "docdash",
"_id": "docdash@1.2.0",
"_inBundle": false,
"_integrity": "sha512-IYZbgYthPTspgqYeciRJNPhSwL51yer7HAwDXhF5p+H7mTDbPvY3PCk/QDjNxdPCpWkaJVFC4t7iCNB/t9E5Kw==",
"_location": "/docdash",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "docdash",
"name": "docdash",
"escapedName": "docdash",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#DEV:/",
"#USER"
],
"_resolved": "https://registry.npmjs.org/docdash/-/docdash-1.2.0.tgz",
"_shasum": "f99dde5b8a89aa4ed083a3150383e042d06c7f49",
"_spec": "docdash",
"_where": "D:\\code\\founder_code\\founder_vue",
"author": {
"name": "Clement Moron",
"email": "clement.moron@gmail.com"
},
"bugs": {
"url": "https://github.com/clenemt/docdash/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "A clean, responsive documentation template theme for JSDoc 3 inspired by lodash and minami",
"devDependencies": {
"browser-sync": "latest",
"jsdoc": "latest",
"watch-run": "latest"
},
"files": [
"publish.js",
"static",
"tmpl"
],
"homepage": "https://github.com/clenemt/docdash#readme",
"keywords": [
"jsdoc",
"template"
],
"license": "Apache-2.0",
"main": "publish.js",
"name": "docdash",
"repository": {
"type": "git",
"url": "git+https://github.com/clenemt/docdash.git"
},
"scripts": {
"sync": "browser-sync start -s ../fixtures-doc -f ../fixtures-doc --reload-delay 1000 --no-ui --no-notify",
"test": "jsdoc -c fixtures/fixtures.conf.json",
"watch": "watch-run -d 1000 -p tmpl/**,static/** \"npm run test\""
},
"version": "1.2.0"
}
function hideAllButCurrent(){
//by default all submenut items are hidden
//but we need to rehide them for search
document.querySelectorAll("nav > ul > li > ul li").forEach(function(parent) {
parent.style.display = "none";
});
//only current page (if it exists) should be opened
var file = window.location.pathname.split("/").pop().replace(/\.html/, '');
document.querySelectorAll("nav > ul > li > a").forEach(function(parent) {
var href = parent.attributes.href.value.replace(/\.html/, '');
if (file === href) {
parent.parentNode.querySelectorAll("ul li").forEach(function(elem) {
elem.style.display = "block";
});
}
});
}
hideAllButCurrent();
\ No newline at end of file
/*global document */
(function() {
var source = document.getElementsByClassName('prettyprint source linenums');
var i = 0;
var lineNumber = 0;
var lineId;
var lines;
var totalLines;
var anchorHash;
if (source && source[0]) {
anchorHash = document.location.hash.substring(1);
lines = source[0].getElementsByTagName('li');
totalLines = lines.length;
for (; i < totalLines; i++) {
lineNumber++;
lineId = 'line' + lineNumber;
lines[i].id = lineId;
if (lineId === anchorHash) {
lines[i].className += ' selected';
}
}
}
})();
function scrollToNavItem() {
var path = window.location.href.split('/').pop().replace(/\.html/, '');
document.querySelectorAll('nav a').forEach(function(link) {
var href = link.attributes.href.value.replace(/\.html/, '');
if (path === href) {
link.scrollIntoView({block: 'center'});
return;
}
})
}
scrollToNavItem();
//IE Fix, src: https://www.reddit.com/r/programminghorror/comments/6abmcr/nodelist_lacks_foreach_in_internet_explorer/
if (typeof(NodeList.prototype.forEach)!==typeof(alert)){
NodeList.prototype.forEach=Array.prototype.forEach;
}
\ No newline at end of file
/*
* @Author: your name
* @Date: 2021-11-18 09:49:09
* @LastEditTime: 2021-11-22 11:11:40
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \SpaceBigDataPlatform\src\utils\docdash\static\scripts\prettify\http.js
*/
var len = $('button').length
for (let i = 0; i < len; i++) {
$('button').eq(i).click(function () {
var valueType = $('.defaultValueType').eq(i).text().replace(/\s/g,'')
var oldValue = $('.defaultValue').eq(i).text()?$('.defaultValue').eq(i).text():$('.defaultValue').eq(i).prevObject[0].innerText
var url = $('.url').eq(i).text()
var type = $('.method').eq(i).text().replace(/"/g,'')
var data = {};
var dataType = '';
if(oldValue != 'null'){
if(valueType == 'Object'){
let data1 = new Object();
let str = oldValue.replace(/{/,'').replace(/}/,'').replace(/"/g,'')
let arr = str.split(',');
arr.forEach(el=>{
let elArr = el.split(':');
data1[elArr[0]] = elArr[1] == ""?'':elArr[1]
})
data = data1
dataType = "json"
console.log(data,'datadatadata')
}else if(valueType == 'String'){
let brr;
let str = '?'
if(oldValue.indexOf(',')){
brr = oldValue.split(',');
brr.forEach((el,index)=>{
if(index+1 == brr.length){
str += el
}else{
str = str + el +'&'
}
})
}else{
str += oldValue
}
url += str;
dataType = "text"
}
}
test(url,type,data,dataType)
})
}
$("#cover").click(function () {
$("#cover").css('display','none');
$("#dialog").css('display','none');
$('#dialog').text('');
$('body').css({
  "overflow-x":"auto",
  "overflow-y":"auto"
});
})
/**
*
* @param {String} url
* @param {String} type
* @param {*} data
* @param {String} dataType
* @description 请求接口
*/
function test(url,type,data,dataType){
$.ajax({
type,
url,
data,
dataType,
success: (res)=>{
var result = '';
if(res.constructor === String && res != undefined && res.length>0){
result = JSON.parse(res)
}else{
result = res
}
console.log(result,'resultresultresult')
var msgStr = '返回结果';
if(res.msg) msgStr = res.msg;
var str = "<ul><li style='text-align:center;background:#6d426d;color:#fff;height:40px;line-height:40px;'><span class='content'>"+
msgStr + "</span></li><li style='height: 350px;padding:5px;'><span class='title'>返回数据:</span><div style='height:325px; overflow-y:scroll;overflow-wrap: break-word;'>"+
dataStr + "</div></li></ul>"
$("#cover").css('display','block');
$("#dialog").css('display','block');
$('#dialog').append(str);
$('body').css({
  "overflow-x":"hidden",
  "overflow-y":"hidden"
});
},
});
}
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
var searchAttr = 'data-search-mode';
function contains(a,m){
return (a.textContent || a.innerText || "").toUpperCase().indexOf(m) !== -1;
};
//on search
document.getElementById("nav-search").addEventListener("keyup", function(event) {
var search = this.value.toUpperCase();
if (!search) {
//no search, show all results
document.documentElement.removeAttribute(searchAttr);
document.querySelectorAll("nav > ul > li:not(.level-hide)").forEach(function(elem) {
elem.style.display = "block";
});
if (typeof hideAllButCurrent === "function"){
//let's do what ever collapse wants to do
hideAllButCurrent();
} else {
//menu by default should be opened
document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) {
elem.style.display = "block";
});
}
} else {
//we are searching
document.documentElement.setAttribute(searchAttr, '');
//show all parents
document.querySelectorAll("nav > ul > li").forEach(function(elem) {
elem.style.display = "block";
});
//hide all results
document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) {
elem.style.display = "none";
});
//show results matching filter
document.querySelectorAll("nav > ul > li > ul a").forEach(function(elem) {
if (!contains(elem.parentNode, search)) {
return;
}
elem.parentNode.style.display = "block";
});
//hide parents without children
document.querySelectorAll("nav > ul > li").forEach(function(parent) {
var countSearchA = 0;
parent.querySelectorAll("a").forEach(function(elem) {
if (contains(elem, search)) {
countSearchA++;
}
});
var countUl = 0;
var countUlVisible = 0;
parent.querySelectorAll("ul").forEach(function(ulP) {
// count all elements that match the search
if (contains(ulP, search)) {
countUl++;
}
// count all visible elements
var children = ulP.children
for (i=0; i<children.length; i++) {
var elem = children[i];
if (elem.style.display != "none") {
countUlVisible++;
}
}
});
if (countSearchA == 0 && countUl === 0){
//has no child at all and does not contain text
parent.style.display = "none";
} else if(countSearchA == 0 && countUlVisible == 0){
//has no visible child and does not contain text
parent.style.display = "none";
}
});
}
});
\ No newline at end of file
.pln {
color: #ddd;
}
/* string content */
.str {
color: #61ce3c;
}
/* a keyword */
.kwd {
color: #fbde2d;
}
/* a comment */
.com {
color: #aeaeae;
}
/* a type name */
.typ {
color: #8da6ce;
}
/* a literal value */
.lit {
color: #fbde2d;
}
/* punctuation */
.pun {
color: #ddd;
}
/* lisp open bracket */
.opn {
color: #000000;
}
/* lisp close bracket */
.clo {
color: #000000;
}
/* a markup tag name */
.tag {
color: #8da6ce;
}
/* a markup attribute name */
.atn {
color: #fbde2d;
}
/* a markup attribute value */
.atv {
color: #ddd;
}
/* a declaration */
.dec {
color: #ef5050;
}
/* a variable name */
.var {
color: #c82829;
}
/* a function name */
.fun {
color: #4271ae;
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0;
}
#cover {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: none;
background-color: rgba(0, 0, 0, 0.3);
}
#dialog {
width: 600px;
height: 400px;
background: #fff;
position: fixed;
display: none;
top: 25%;
left: 30%;
}
#dialog ul {
padding: 0;
height: 400px;
margin: 0;
}
#dialog ul li {
list-style: none;
}
#dialog ul li .title {
font-weight: 300;
color: #4d4e53;
color: #fff;
font-family: "Helvetica Neue", Helvetica, sans-serif;
font-size: 13px;
}
<?js
var data = obj;
var self = this;
?>
<?js if (data.augments && data.augments.length) { ?>
<ul><?js data.augments.forEach(function(a) { ?>
<li><?js= self.linkto(a, a) ?></li>
<?js }) ?></ul>
<?js } ?>
<?js
var self = this;
var isGlobalPage;
docs.forEach(function(doc, i) {
?>
<?js
// we only need to check this once
if (typeof isGlobalPage === 'undefined') {
isGlobalPage = (doc.kind === 'globalobj');
}
?>
<?js if (doc.kind === 'mainpage' || (doc.kind === 'package')) { ?>
<?js= self.partial('mainpage.tmpl', doc) ?>
<?js } else if (doc.kind === 'source') { ?>
<?js= self.partial('source.tmpl', doc) ?>
<?js } else { ?>
<section>
<header>
<?js if (!doc.longname || doc.kind !== 'module') { ?>
<h2><?js if (doc.ancestors && doc.ancestors.length) { ?>
<span class="ancestors"><?js= doc.ancestors.join('') ?></span>
<?js } ?>
<?js= doc.name ?>
<?js if (doc.variation) { ?>
<sup class="variation"><?js= doc.variation ?></sup>
<?js } ?></h2>
<?js if (doc.classdesc) { ?>
<div class="class-description usertext"><?js= doc.classdesc ?></div>
<?js } ?>
<?js } else if (doc.kind === 'module' && doc.modules) { ?>
<?js doc.modules.forEach(function(module) { ?>
<?js if (module.classdesc) { ?>
<div class="class-description"><?js= module.classdesc ?></div>
<?js } ?>
<?js }) ?>
<?js } ?>
</header>
<article>
<?js if (!doc.hideconstructor) { ?>
<div class="container-overview">
<?js if (doc.kind === 'module' && doc.modules) { ?>
<?js if (doc.description) { ?>
<div class="description usertext"><?js= doc.description ?></div>
<?js } ?>
<?js doc.modules.forEach(function(module) { ?>
<?js= self.partial('method.tmpl', module) ?>
<?js }) ?>
<?js } else if (doc.kind === 'class') { ?>
<?js= self.partial('method.tmpl', doc) ?>
<?js } else { ?>
<?js= self.partial('details.tmpl', doc) ?>
<?js if (doc.description) { ?>
<div class="description usertext"><?js= doc.description ?></div>
<?js } ?>
<?js if (doc.examples && doc.examples.length) { ?>
<h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
<?js= self.partial('examples.tmpl', doc.examples) ?>
<?js } ?>
<?js } ?>
</div>
<?js } ?>
<?js if (doc.augments && doc.augments.length) { ?>
<h3 class="subsection-title">Extends</h3>
<?js= self.partial('augments.tmpl', doc) ?>
<?js } ?>
<?js if (doc.requires && doc.requires.length) { ?>
<h3 class="subsection-title">Requires</h3>
<ul><?js doc.requires.forEach(function(r) { ?>
<li><?js= self.linkto(r, r) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js
var classes = self.find({kind: 'class', memberof: doc.longname});
if (!isGlobalPage && classes && classes.length) {
?>
<h3 class="subsection-title">Classes</h3>
<dl><?js classes.forEach(function(c) { ?>
<dt><?js= self.linkto(c.longname, c.name) ?></dt>
<dd><?js if (c.summary) { ?><?js= c.summary ?><?js } ?></dd>
<?js }); ?></dl>
<?js } ?>
<?js
var interfaces = self.find({kind: 'interface', memberof: doc.longname});
if (!isGlobalPage && interfaces && interfaces.length) {
?>
<h3 class="subsection-title">Interfaces</h3>
<dl><?js interfaces.forEach(function(i) { ?>
<dt><?js= self.linkto(i.longname, i.name) ?></dt>
<dd><?js if (i.summary) { ?><?js= i.summary ?><?js } ?></dd>
<?js }); ?></dl>
<?js } ?>
<?js
var mixins = self.find({kind: 'mixin', memberof: doc.longname});
if (!isGlobalPage && mixins && mixins.length) {
?>
<h3 class="subsection-title">Mixins</h3>
<dl><?js mixins.forEach(function(m) { ?>
<dt><?js= self.linkto(m.longname, m.name) ?></dt>
<dd><?js if (m.summary) { ?><?js= m.summary ?><?js } ?></dd>
<?js }); ?></dl>
<?js } ?>
<?js
var namespaces = self.find({kind: 'namespace', memberof: doc.longname});
if (!isGlobalPage && namespaces && namespaces.length) {
?>
<h3 class="subsection-title">Namespaces</h3>
<dl><?js namespaces.forEach(function(n) { ?>
<dt><?js= self.linkto(n.longname, n.name) ?></dt>
<dd><?js if (n.summary) { ?><?js= n.summary ?><?js } ?></dd>
<?js }); ?></dl>
<?js } ?>
<?js
var members = self.find({kind: 'member', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
// symbols that are assigned to module.exports are not globals, even though they're not a memberof anything
if (isGlobalPage && members && members.length && members.forEach) {
members = members.filter(function(m) {
return m.longname && m.longname.indexOf('module:') !== 0;
});
}
if (members && members.length && members.forEach) {
?>
<h3 class="subsection-title">Members</h3>
<?js members.forEach(function(p) { ?>
<?js= self.partial('members.tmpl', p) ?>
<?js }); ?>
<?js } ?>
<?js
var methods = self.find({kind: 'function', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
if (methods && methods.length && methods.forEach) {
?>
<h3 class="subsection-title">Methods</h3>
<?js methods.forEach(function(m) { ?>
<?js= self.partial('method.tmpl', m) ?>
<?js }); ?>
<?js } ?>
<?js
var typedefs = self.find({kind: 'typedef', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
if (typedefs && typedefs.length && typedefs.forEach) {
?>
<h3 class="subsection-title">Type Definitions</h3>
<?js typedefs.forEach(function(e) {
if (e.signature) {
?>
<?js= self.partial('method.tmpl', e) ?>
<?js
}
else {
?>
<?js= self.partial('members.tmpl', e) ?>
<?js
}
}); ?>
<?js } ?>
<?js
var events = self.find({kind: 'event', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
if (events && events.length && events.forEach) {
?>
<h3 class="subsection-title">Events</h3>
<?js events.forEach(function(e) { ?>
<?js= self.partial('method.tmpl', e) ?>
<?js }); ?>
<?js } ?>
</article>
</section>
<?js } ?>
<?js }); ?>
<?js
var data = obj;
var self = this;
var defaultObjectClass = '';
// Check if the default value is an object or array; if so, apply code highlighting
if (data.defaultvalue && (data.defaultvaluetype === 'object' || data.defaultvaluetype === 'array')) {
try {
var indentedValues = JSON.stringify(JSON.parse(data.defaultvalue), null, ' ');
data.defaultvalue = indentedValues;
} catch (e) {}
data.defaultvalue = "<pre class=\"prettyprint\"><code>" + data.defaultvalue + "</code></pre>";
defaultObjectClass = ' class="object-value"';
}
?>
<dl class="details">
<?js if (data.meta && self.outputSourceFiles) {?>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<?js= self.linkto(meta.shortpath) ?>, <?js= self.linkto(meta.shortpath, 'line ' + meta.lineno, null, 'line' + meta.lineno) ?>
</li></ul></dd>
<?js } ?>
<?js if (data.version) {?>
<dt class="tag-version">Version:</dt>
<dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd>
<?js } ?>
<?js if (data.since) {?>
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li><?js= since ?></li></ul></dd>
<?js } ?>
<?js if (data.inherited && data.inherits && !data.overrides) { ?>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<?js= this.linkto(data.inherits, this.htmlsafe(data.inherits)) ?>
</li></ul></dd>
<?js } ?>
<?js if (data.overrides) { ?>
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<?js= this.linkto(data.overrides, this.htmlsafe(data.overrides)) ?>
</li></ul></dd>
<?js } ?>
<?js if (data.implementations && data.implementations.length) { ?>
<dt class="implementations">Implementations:</dt>
<dd class="implementations"><ul>
<?js data.implementations.forEach(function(impl) { ?>
<li><?js= self.linkto(impl, self.htmlsafe(impl)) ?></li>
<?js }); ?>
</ul></dd>
<?js } ?>
<?js if (data.implements && data.implements.length) { ?>
<dt class="implements">Implements:</dt>
<dd class="implements"><ul>
<?js data.implements.forEach(function(impl) { ?>
<li><?js= self.linkto(impl, self.htmlsafe(impl)) ?></li>
<?js }); ?>
</ul></dd>
<?js } ?>
<?js if (data.mixes && data.mixes.length) { ?>
<dt class="mixes">Mixes In:</dt>
<dd class="mixes"><ul>
<?js data.mixes.forEach(function(a) { ?>
<li><?js= self.linkto(a, a) ?></li>
<?js }); ?>
</ul></dd>
<?js } ?>
<?js if (data.deprecated) { ?>
<dt class="important tag-deprecated">Deprecated:</dt><?js
if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li></ul></dd><?js }
?>
<?js } ?>
<?js if (data.author && author.length) {?>
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul><?js author.forEach(function(a) { ?>
<li><?js= self.resolveAuthorLinks(a) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
<?js if (data.copyright) {?>
<dt class="tag-copyright">Copyright:</dt>
<dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd>
<?js } ?>
<?js if (data.license) {?>
<dt class="tag-license">License:</dt>
<dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd>
<?js } ?>
<?js if (data.defaultvalue) {?>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li<?js= defaultObjectClass ?>><?js= data.defaultvalue ?></li>
</ul></dd>
<?js } ?>
<?js if (data.tutorials && tutorials.length) {?>
<dt class="tag-tutorial">Tutorials:</dt>
<dd class="tag-tutorial">
<ul><?js tutorials.forEach(function(t) { ?>
<li><?js= self.tutoriallink(t) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
<?js if (data.see && see.length) {?>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul><?js see.forEach(function(s) { ?>
<li><?js= self.linkto(s) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
<?js if (data.todo && todo.length) {?>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul><?js todo.forEach(function(t) { ?>
<li><?js= t ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
</dl>
<?js
var properties = data.properties;
if (properties && properties.length && properties.forEach) {
?>
<h5 class="subsection-title">请求接口信息:</h5>
<?js= this.partial('properties.tmpl', data) ?>
<?js } ?>
<?js var data = obj; ?>
<pre><code><?js= data ?></code></pre>
<?js
var data = obj;
var self = this;
data.forEach(function(example) {
if (example.caption) {
?>
<p class="code-caption"><?js= example.caption ?></p>
<?js } ?>
<pre class="prettyprint"><code><?js= self.htmlsafe(example.code) ?></code></pre>
<?js
});
?>
\ No newline at end of file
<?js
var data = obj;
?>
<?js if (data.description && data.type && data.type.names) { ?>
<dl>
<dt>
<div class="param-desc usertext">
<?js= data.description ?>
</div>
</dt>
<dd></dd>
<dt>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<?js= this.partial('type.tmpl', data.type.names) ?>
</dd>
</dl>
</dt>
<dd></dd>
</dl>
<?js } else { ?>
<div class="param-desc usertext">
<?js if (data.description) { ?>
<?js= data.description ?>
<?js } else if (data.type && data.type.names) { ?>
<?js= this.partial('type.tmpl', data.type.names) ?>
<?js } ?>
</div>
<?js } ?>
<!DOCTYPE html>
<html lang="en">
<head>
<?js if (!env.conf.docdash) { env.conf.docdash = {};} ?>
<meta charset="utf-8">
<title><?js= title ?> - <?js= ((env.conf.docdash.meta && env.conf.docdash.meta.title) || "Documentation") ?></title>
<?js if (env.conf.docdash.meta) { ?>
<?js if (env.conf.docdash.meta.description) { ?><meta name="description" content="<?js= env.conf.docdash.meta.description ?>" /><?js } ?>
<?js if (env.conf.docdash.meta.keyword) { ?>
<meta name="keywords" content="<?js= env.conf.docdash.meta.keyword ?>" />
<meta name="keyword" content="<?js= env.conf.docdash.meta.keyword ?>" />
<?js } ?>
<?js } ?>
<?js if (env.conf.docdash.openGraph) { ?>
<meta property="og:title" content="<?js= env.conf.docdash.openGraph.title ?>"/>
<meta property="og:type" content="<?js= env.conf.docdash.openGraph.type ?>"/>
<meta property="og:image" content="<?js= env.conf.docdash.openGraph.image ?>"/>
<?js if (env.conf.docdash.openGraph.site_name) { ?><meta property="og:site_name" content="<?js= env.conf.docdash.openGraph.site_name ?>"/><?js } ?>
<meta property="og:url" content="<?js= env.conf.docdash.openGraph.url ?>"/>
<?js } ?>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav <?js if (env.conf.docdash.wrap) { ?>class="wrap"<?js } ?>>
<?js if (env.conf.docdash.search) { ?>
<input type="text" id="nav-search" placeholder="Search" />
<?js } ?>
<?js= this.nav ?>
</nav>
<div id="main">
<?js if (title != 'Home') { ?>
<h1 class="page-title"><?js= title ?></h1>
<?js } ?>
<?js= content ?>
<?js if (env.conf.docdash.disqus) { ?>
<div id="disqus_thread"></div>
<script>
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//<?js= env.conf.docdash.disqus ?>.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<?js } ?>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc <?js= env.version.number ?></a><?js if(env.conf.templates && env.conf.templates.default && env.conf.templates.default.includeDate !== false) { ?> on <?js= (new Date()) ?><?js } ?> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/prettify/jquery-3.2.1.min.js"></script>
<script src="scripts/prettify/http.js"></script>
<?js if (env.conf.docdash.search) { ?>
<script src="scripts/search.js" defer></script>
<?js } ?>
<?js if (env.conf.docdash.collapse) { ?>
<script src="scripts/collapse.js" defer></script>
<?js } ?>
<?js if (env.conf.docdash.scripts && env.conf.docdash.scripts.length) {
for(var i = 0; i < env.conf.docdash.scripts.length; i++){
if (env.conf.docdash.scripts[i].indexOf(".css") != -1) {
?>
<link type="text/css" rel="stylesheet" href="<?js= env.conf.docdash.scripts[i] ?>">
<?js
} else {
?>
<script src="<?js= env.conf.docdash.scripts[i] ?>"></script>
<?js
}
}
} ?>
</body>
</html>
<?js
var data = obj;
var self = this;
?>
<?js if (data.kind === 'package') { ?>
<section class="package">
<h3><?js= data.name ?> <?js= data.version ?></h3>
</section>
<?js } ?>
<?js if (data.readme) { ?>
<section class="readme usertext">
<article><?js= data.readme ?></article>
</section>
<?js } ?>
<?js
var data = obj;
var self = this;
?>
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + name + (data.signature ? data.signature : '') ?></h4>
<?js if (data.summary) { ?>
<p class="summary"><?js= summary ?></p>
<?js } ?>
<?js= this.partial('details.tmpl', data) ?>
<?js if (data.description) { ?>
<div class="description usertext">
<?js= data.description ?>
</div>
<?js } ?>
<?js if (data.type && data.type.names) {?>
<h5>Type:</h5>
<ul>
<li>
<?js= self.partial('type.tmpl', data.type.names) ?>
</li>
</ul>
<?js } ?>
<?js if (data.fires && fires.length) { ?>
<h5>Fires:</h5>
<ul><?js fires.forEach(function(f) { ?>
<li><?js= self.linkto(f) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (data.examples && examples.length) { ?>
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
<?js= this.partial('examples.tmpl', examples) ?>
<?js } ?>
<?js
var data = obj;
var self = this;
?>
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
<?js if (data.kind === 'class' && data.classdesc) { ?>
<h2>Constructor</h2>
<?js } ?>
<h4 class="name" id="<?js= id ?>"><?js= data.attribs ?><?js
if(kind === 'class' && name.indexOf('module:') === 0) {
print('new (require("' + name.slice(7) + '"))');
} else if(kind === 'class') {
print('new ' + name);
} else if(kind === 'event' && data.alias) {
print(data.alias);
} else {
print(name);
}
?><?js= (data.signature || '') ?></h4>
<?js if (data.summary) { ?>
<p class="summary usertext"><?js= summary ?></p>
<?js } ?>
<?js } ?>
<?js= this.partial('details.tmpl', data) ?>
<?js if (data.kind !== 'module' && data.description) { ?>
<div class="description usertext">
<?js= data.description ?>
</div>
<?js } ?>
<?js if (data.augments && data.alias && data.alias.indexOf('module:') === 0) { ?>
<h5>Extends:</h5>
<?js= self.partial('augments.tmpl', data) ?>
<?js } ?>
<?js if (kind === 'event' && data.type && data.type.names) {?>
<h5>Type:</h5>
<ul>
<li>
<?js= self.partial('type.tmpl', data.type.names) ?>
</li>
</ul>
<?js } ?>
<?js if (data['this']) { ?>
<h5>This:</h5>
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
<?js } ?>
<?js if (data.examples && examples.length) { ?>
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
<?js= this.partial('examples.tmpl', examples) ?>
<?js } ?>
<?js if (data.params && params.length) { ?>
<h5>参数:</h5>
<?js= this.partial('params.tmpl', params) ?>
<?js } ?>
<?js if (data.kind !== 'module' && data.requires && data.requires.length) { ?>
<h5>Requires:</h5>
<ul><?js data.requires.forEach(function(r) { ?>
<li><?js= self.linkto(r) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (data.fires && fires.length) { ?>
<h5>Fires:</h5>
<ul><?js fires.forEach(function(f) { ?>
<li><?js= self.linkto(f) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (data.listens && listens.length) { ?>
<h5>Listens to Events:</h5>
<ul><?js listens.forEach(function(f) { ?>
<li><?js= self.linkto(f) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (data.listeners && listeners.length) { ?>
<h5>Listeners of This Event:</h5>
<ul><?js listeners.forEach(function(f) { ?>
<li><?js= self.linkto(f) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (data.modifies && modifies.length) {?>
<h5>Modifies:</h5>
<?js if (modifies.length > 1) { ?><ul><?js
modifies.forEach(function(m) { ?>
<li><?js= self.partial('modifies.tmpl', m) ?></li>
<?js });
?></ul><?js } else {
modifies.forEach(function(m) { ?>
<?js= self.partial('modifies.tmpl', m) ?>
<?js });
} } ?>
<?js if (data.exceptions && exceptions.length) { ?>
<h5>Throws:</h5>
<?js if (exceptions.length > 1) { ?><ul><?js
exceptions.forEach(function(r) { ?>
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
<?js });
?></ul><?js } else {
exceptions.forEach(function(r) { ?>
<?js= self.partial('exceptions.tmpl', r) ?>
<?js });
} } ?>
<?js if (data.returns && returns.length) { ?>
<h5>Returns:</h5>
<?js if (returns.length > 1) { ?><ul><?js
returns.forEach(function(r) { ?>
<li><?js= self.partial('returns.tmpl', r) ?></li>
<?js });
?></ul><?js } else {
returns.forEach(function(r) { ?>
<?js= self.partial('returns.tmpl', r) ?>
<?js });
} } ?>
<?js if (data.yields && yields.length) { ?>
<h5>Yields:</h5>
<?js if (yields.length > 1) { ?><ul><?js
yields.forEach(function(r) { ?>
<li><?js= self.partial('returns.tmpl', r) ?></li>
<?js });
?></ul><?js } else {
yields.forEach(function(r) { ?>
<?js= self.partial('returns.tmpl', r) ?>
<?js });
} } ?>
<?js
var data = obj || {};
?>
<?js if (data.type && data.type.names) {?>
<dl>
<dt>
Type
</dt>
<dd>
<?js= this.partial('type.tmpl', data.type.names) ?>
</dd>
</dl>
<?js } ?>
\ No newline at end of file
<?js
var params = obj;
/* sort subparams under their parent params (like opts.classname) */
var parentParam = null;
params.forEach(function(param, i) {
var paramRegExp;
if (!param) {
return;
}
if (parentParam && parentParam.name && param.name) {
try {
paramRegExp = new RegExp('^(?:' + parentParam.name + '(?:\\[\\])*)\\.(.+)$');
}
catch (e) {
console.error("Problem parsing comment", e);
// there's probably a typo in the JSDoc comment that resulted in a weird
// parameter name
return;
}
if ( paramRegExp.test(param.name) ) {
param.name = RegExp.$1;
parentParam.subparams = parentParam.subparams || [];
parentParam.subparams.push(param);
params[i] = null;
}
else {
parentParam = param;
}
}
else {
parentParam = param;
}
});
/* determine if we need extra columns, "attributes" and "default" */
params.hasAttributes = false;
params.hasDefault = false;
params.hasName = false;
params.forEach(function(param) {
if (!param) { return; }
if (param.optional || param.nullable || param.variable) {
params.hasAttributes = true;
}
if (param.name) {
params.hasName = true;
}
if (typeof param.defaultvalue !== 'undefined') {
params.hasDefault = true;
}
});
?>
<table class="params">
<thead>
<tr>
<?js if (params.hasName) {?>
<th>Name</th>
<?js } ?>
<th>Type</th>
<?js if (params.hasAttributes) {?>
<th>Attributes</th>
<?js } ?>
<?js if (params.hasDefault) {?>
<th>Default</th>
<?js } ?>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<?js
var self = this;
params.forEach(function(param) {
if (!param) { return; }
?>
<tr>
<?js if (params.hasName) {?>
<td class="name"><code><?js= param.name ?></code></td>
<?js } ?>
<td class="type">
<?js if (param.type && param.type.names) {?>
<?js= self.partial('type.tmpl', param.type.names) ?>
<?js } ?>
</td>
<?js if (params.hasAttributes) {?>
<td class="attributes">
<?js if (param.optional) { ?>
&lt;optional><br>
<?js } ?>
<?js if (param.nullable) { ?>
&lt;nullable><br>
<?js } ?>
<?js if (param.variable) { ?>
&lt;repeatable><br>
<?js } ?>
</td>
<?js } ?>
<?js if (params.hasDefault) {?>
<td class="default">
<?js if (typeof param.defaultvalue !== 'undefined') { ?>
<code><?js= self.htmlsafe(param.defaultvalue) ?></code>
<?js } ?>
</td>
<?js } ?>
<td class="description last"><?js= param.description ?><?js if (param.subparams) { ?>
<h6>Properties</h6>
<?js= self.partial('params.tmpl', param.subparams) ?>
<?js } ?></td>
</tr>
<?js }); ?>
</tbody>
</table>
<?js
var self = this;
params.forEach(function(param) {
if (!param) { return; }
?>
<?js if (param.type && param.type.names) {?>
<span class='defaultValueType' style="display:none;"> <?js= self.partial('type.tmpl', param.type.names) ?></span>
<?js } ?>
<?js if (params.hasDefault) {?>
<?js if (typeof param.defaultvalue !== 'undefined') { ?>
<span class='defaultValue' style="display:none;"><?js= self.htmlsafe(param.defaultvalue) ?></span>
<?js } ?>
<?js } ?>
<?js }); ?>
<button class="btn-http">发送请求</button>
\ No newline at end of file
<?js
var data = obj;
var props = data.subprops || data.properties;
/* sort subprops under their parent props (like opts.classname) */
var parentProp = null;
props.forEach(function(prop, i) {
if (!prop) { return; }
if ( parentProp && prop.name && prop.name.indexOf(parentProp.name + '.') === 0 ) {
prop.name = prop.name.substr(parentProp.name.length+1);
parentProp.subprops = parentProp.subprops || [];
parentProp.subprops.push(prop);
props[i] = null;
}
else {
parentProp = prop;
}
});
/* determine if we need extra columns, "attributes" and "default" */
props.hasAttributes = false;
props.hasDefault = false;
props.hasName = false;
props.forEach(function(prop) {
if (!prop) { return; }
if (prop.optional || prop.nullable) {
props.hasAttributes = true;
}
if (prop.name) {
props.hasName = true;
}
if (typeof prop.defaultvalue !== 'undefined' && !data.isEnum) {
props.hasDefault = true;
}
});
?>
<table class="props">
<thead>
<tr>
<?js if (props.hasName) {?>
<th>Name</th>
<?js } ?>
<th>Type</th>
<?js if (props.hasAttributes) {?>
<th>Attributes</th>
<?js } ?>
<?js if (props.hasDefault) {?>
<th>Default</th>
<?js } ?>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<?js
var self = this;
props.forEach(function(prop) {
if (!prop) { return; }
?>
<tr>
<?js if (props.hasName) {?>
<td class="name"><code><?js= prop.name ?></code></td>
<?js } ?>
<td class="type">
<?js if (prop.type && prop.type.names) {?>
<?js= self.partial('type.tmpl', prop.type.names) ?>
<?js } ?>
</td>
<?js if (props.hasAttributes) {?>
<td class="attributes">
<?js if (prop.optional) { ?>
&lt;optional><br>
<?js } ?>
<?js if (prop.nullable) { ?>
&lt;nullable><br>
<?js } ?>
</td>
<?js } ?>
<?js if (props.hasDefault) {?>
<td class="default">
<?js if (typeof prop.defaultvalue !== 'undefined') { ?>
<code><?js= self.htmlsafe(prop.defaultvalue) ?></code>
<?js } ?>
</td>
<?js } ?>
<td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?>
<h6>Properties</h6><?js= self.partial('properties.tmpl', prop) ?>
<?js } ?></td>
</tr>
<?js }); ?>
</tbody>
</table>
<div>
<?js
var self = this;
props.forEach(function(prop) {
if (!prop) { return; }
?>
<span class=<?js= prop.name ?> style="display:none;"><?js= self.htmlsafe(prop.defaultvalue) ?></span>
<?js }); ?>
</div>
\ No newline at end of file
<?js
var data = obj || {};
if (data.description) {
?>
<div class="param-desc">
<?js= description ?>
</div>
<?js } ?>
<?js if (data.type && data.type.names) {?>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<?js= this.partial('type.tmpl', data.type.names) ?>
</dd>
</dl>
<?js } ?>
\ No newline at end of file
<?js
var data = obj;
?>
<section>
<article>
<pre class="prettyprint source linenums"><code><?js= data.code ?></code></pre>
</article>
</section>
\ No newline at end of file
<section>
<header>
<?js if (children.length > 0) { ?>
<ul><?js
var self = this;
children.forEach(function(t) { ?>
<li><?js= self.tutoriallink(t.name) ?></li>
<?js }); ?></ul>
<?js } ?>
<h2><?js= header ?></h2>
</header>
<article>
<?js= content ?>
</article>
</section>
<?js
var data = obj;
var self = this;
data.forEach(function(name, i) { ?>
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span>
<?js if (i < data.length-1) { ?>|<?js } ?>
<?js }); ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment