sa-token 小助手增加提示信息

This commit is contained in:
click33
2023-08-09 13:33:01 +08:00
parent f5586a94ea
commit 6f8a3a4249
2 changed files with 37 additions and 10 deletions

View File

@@ -143,7 +143,8 @@
</div>
<!-- 小助手div -->
<div class="p-none" style="position: fixed; right: 40px; bottom: 330px; z-index: 10000; border: 0px #aaa solid;">
<div class="p-none help-btn-box" style="position: fixed; right: 40px; bottom: 330px; z-index: 10000; border: 0px #aaa solid;">
<div class="help-tips" style="position: relative; left: -30px; top: -10px;"></div>
<div class="help-btn" style="width: 60px; height: 60px; text-align: center; border-radius: 50%; background-color: #42b983; cursor: pointer;">
<span style="font-size: 18px; color: #FFF; line-height: 60px;">Help</span>
</div>
@@ -162,7 +163,7 @@
<!-- -->
<script src="./static/docsify-plugin.js"></script>
<script src="./static/is-star-plugin.js?v=2"></script>
<script src="./static/is-star-plugin.js?v=3"></script>
<script>
var saTokenTopVersion = '1.35.0.RC'; // Sa-Token最新版本
var name = '<img style="width: 60px; height: 60px; vertical-align: middle;" src="logo.png" alt="logo" /> ';
@@ -291,6 +292,18 @@
offset: '10%',
})
})
try{
// 给个小提示
const index = layer.tips('框架技术支持,点此求助', '.help-tips', {
tips: [1, '#000'] ,//还可配置颜色
time: 5000,
});
// 改为 fixed 定位,否则它会随着滚动条移动,样式就跑偏了
$('#layui-layer' + index).css('position', 'fixed');
}catch(e){
console.error(e);
}
</script>
<!-- 修改背景颜色 -->