From 306927209461378b6272ff345c080ab47f7ae609 Mon Sep 17 00:00:00 2001 From: yangjian Date: Sat, 15 May 2021 17:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2=E9=AB=98?= =?UTF-8?q?=E4=BA=AE=E8=AF=8D=E5=AF=BC=E8=87=B4=E4=BB=A3=E7=A0=81=E5=9D=97?= =?UTF-8?q?=E5=92=8C=E9=93=BE=E6=8E=A5=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/mrdoc/mrdoc-docs.js | 10 +++----- template/app_doc/doc.html | 6 ++--- template/app_doc/docs_base.html | 42 +++++++++++++++++---------------- 3 files changed, 28 insertions(+), 30 deletions(-) diff --git a/static/mrdoc/mrdoc-docs.js b/static/mrdoc/mrdoc-docs.js index ce26dfe..8f229ca 100644 --- a/static/mrdoc/mrdoc-docs.js +++ b/static/mrdoc/mrdoc-docs.js @@ -484,16 +484,13 @@ function keyLight(id, key, bgColor){ key = decodeURI(key); var oDiv = document.getElementById(id), sText = oDiv.innerHTML, - bgColor = bgColor || "#c00", - sKey = ""+key+"", num = -1, rStr = new RegExp(key, "ig"), rHtml = new RegExp("\<.*?\>","ig"), //匹配html元素 - aHtml = sText.match(rHtml); //存放html元素的数组 + aHtml = sText.match(rHtml), //存放html元素的数组 sText = sText.replace(rHtml, '{~}'); //替换html标签 - // sText = sText.replace(rStr,sKey); //替换key sText = sText.replace(rStr,function(text){ - return ""+text+"" + return "" + text +"" }); //替换key sText = sText.replace(/{~}/g,function(){ //恢复html标签 num++; @@ -501,5 +498,4 @@ function keyLight(id, key, bgColor){ }); oDiv.innerHTML = sText; } -}; -keyLight('doc-content',getQueryVariable("highlight")) \ No newline at end of file +}; \ No newline at end of file diff --git a/template/app_doc/doc.html b/template/app_doc/doc.html index 2ba6971..047e5d5 100644 --- a/template/app_doc/doc.html +++ b/template/app_doc/doc.html @@ -242,9 +242,9 @@ }); //修改a标签链接新窗口打开 - $('#content').on('click','a',function(e){ - e.target.target = '_blank'; - }); + // $('#content').on('click','a',function(e){ + // e.target.target = '_blank'; + // }); // 显示文档下载弹出框 $("#download_doc").click(function(r){ var layer = layui.layer; diff --git a/template/app_doc/docs_base.html b/template/app_doc/docs_base.html index c68de43..05ee9d2 100644 --- a/template/app_doc/docs_base.html +++ b/template/app_doc/docs_base.html @@ -335,26 +335,6 @@ {% endif %} - - {% if debug %} {% else %} @@ -383,5 +363,27 @@ {% block custom_script %} {% endblock %} + \ No newline at end of file