From e8f78f9c8e3a63a0cc6814b78c9ff872d10a45a5 Mon Sep 17 00:00:00 2001 From: azhengzz <820108271@qq.com> Date: Thu, 25 Mar 2021 11:50:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E9=A1=B9=E7=9B=AE=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=AD=E6=B7=BB=E5=8A=A0=3F=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E6=8F=90=E7=A4=BA=E6=8C=89=E9=92=AE=EF=BC=8C=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E7=9B=B8=E5=85=B3=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ApiAutomationTest/app/static/css/base.css | 26 ++++++++++++++ ApiAutomationTest/app/static/js/base.js | 24 ++++++++++++- ApiAutomationTest/app/templates/base.html | 36 +++++++++++++++++++ .../app/templates/scene/scene.html | 6 ---- 4 files changed, 85 insertions(+), 7 deletions(-) diff --git a/ApiAutomationTest/app/static/css/base.css b/ApiAutomationTest/app/static/css/base.css index 045c3eb..797152b 100644 --- a/ApiAutomationTest/app/static/css/base.css +++ b/ApiAutomationTest/app/static/css/base.css @@ -38,6 +38,32 @@ body { background-image: url(/static/icon/bootstrap-icons/arrow-repeat-blue.svg); } +.btn-help{ + user-select: none; + cursor: pointer; + opacity: 1; + position: fixed; + display: flex; + background: white; + align-items: center; + justify-content: center; + bottom: 33px; + right: 33px; + width: 36px; + height: 36px; + border-radius: 100%; + font-size: 20px; + box-shadow: rgba(15, 15, 15, 0.1) 0 0 0 1px, rgba(15, 15, 15, 0.1) 0 2px 4px; + z-index: 101; + outline: none; +} +.btn-help:hover{ + background-color: #ebebeb; +} +.btn-help:focus{ + background-color: #cdcdcd; +} + .div-split-gutter-vertical{ background-image: url(/static/icon/bootstrap-icons/three-dots-vertical.svg); background-repeat: no-repeat; diff --git a/ApiAutomationTest/app/static/js/base.js b/ApiAutomationTest/app/static/js/base.js index 85b2f7b..6bd9aec 100644 --- a/ApiAutomationTest/app/static/js/base.js +++ b/ApiAutomationTest/app/static/js/base.js @@ -57,6 +57,9 @@ $(document).ready(function () { }); }); + // 为帮助按钮设置弹出框 + tippyHelpBtn(); + }); let $btn_refresh_latest_report = $('#btn-refresh-latest-report'); @@ -200,4 +203,23 @@ jQuery.wait = function (selector, func, times, interval) { // }, _interval); // } // return this; -// }; \ No newline at end of file +// }; + +// 为帮助按钮设置弹出框 +function tippyHelpBtn() { + let $helpBtn = $('.btn-help'); + tippy($helpBtn[0], { + trigger: 'click', + hideOnClick: true, + placement: 'top', + allowHTML: true, + interactive: true, + content: function (){ + return $helpBtn.next().html(); + }, + appendTo: () => document.body, + zIndex: 200, + theme: 'light', + maxWidth: 'none', + }); +} \ No newline at end of file diff --git a/ApiAutomationTest/app/templates/base.html b/ApiAutomationTest/app/templates/base.html index 99d4da6..ea35221 100644 --- a/ApiAutomationTest/app/templates/base.html +++ b/ApiAutomationTest/app/templates/base.html @@ -18,6 +18,10 @@ {# #} + + + + {%- endblock styles %} {%- endblock head %} @@ -45,6 +49,36 @@ {# application content needs to be provided in the app_content block #} {% block app_content %}{% endblock %} +
?
+
+
+
+
帮助与操作指引
+

当前项目处于频繁更新的初步阶段,请大家提出宝贵意见。

+
+ +
+
+ {%- endblock content %} {% block scripts %} @@ -54,6 +88,8 @@ + + - -