修改引用,增加搜索的位置
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<!--无论发布在哪、如何修改源码,请勿删除本行原作者信息,感谢-->
|
||||
<meta name="author" content="暮光:城中城,项目地址:https://gitee.com/zyplayer/zyplayer-doc" />
|
||||
<title>dubbo文档管理系统</title>
|
||||
<link rel="shortcut icon" href="webjars/doc-dubbo/img/dubbo.ico"/>
|
||||
<link rel="stylesheet" href="webjars/doc-dubbo/css/element-ui.css">
|
||||
@@ -170,7 +172,7 @@
|
||||
<script type="text/javascript" src="webjars/doc-dubbo/js/common.js"></script>
|
||||
<script type="text/javascript" src="webjars/doc-dubbo/js/toast.js"></script>
|
||||
<script type="text/javascript" src="webjars/doc-dubbo/js/formatjson.js"></script>
|
||||
<script type="text/javascript" src="webjars/doc-dubbo/js/doc-wiki-tree.js"></script>
|
||||
<script type="text/javascript" src="webjars/doc-dubbo/js/doc-dubbo-tree.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
|
||||
@@ -126,6 +126,32 @@ function findInPathsValue(pathsValue, keywords) {
|
||||
if (isNotEmpty(interface) && interface.toLowerCase().indexOf(keywords) >= 0) {
|
||||
return true;
|
||||
}
|
||||
if (pathsValue.nodeList.length > 0) {
|
||||
for (var i = 0; i < pathsValue.nodeList.length; i++) {
|
||||
var node = pathsValue.nodeList[i];
|
||||
if (getNotEmptyStr(node.application).toLowerCase().indexOf(keywords) >= 0) {
|
||||
return true;
|
||||
}
|
||||
if (!!node.methods && node.methods.length > 0) {
|
||||
for (var j = 0; j < node.methods.length; j++) {
|
||||
var method = node.methods[j];
|
||||
if (method.toLowerCase().indexOf(keywords) >= 0) {
|
||||
return true;
|
||||
}
|
||||
var path = interface + "." + method;
|
||||
var docInfo = app.dubboDocMap[path];
|
||||
if (!!docInfo) {
|
||||
if (getNotEmptyStr(docInfo.explain).toLowerCase().indexOf(keywords) >= 0) {
|
||||
return true;
|
||||
}
|
||||
if (getNotEmptyStr(docInfo.result).toLowerCase().indexOf(keywords) >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user