* [ui] optimize UI of tutorial popover.

This commit is contained in:
sunhao
2024-09-04 17:31:41 +08:00
committed by 王于听
parent 05b886d742
commit 0806ebe3ad
+2 -1
View File
@@ -174,6 +174,7 @@ function highlightStepTarget($target, step, popoverOptions)
className : 'tutorial-popover rounded-md',
titleClass : 'popover-title text-lg pl-1',
minWidth : 280,
maxWidth : 400,
headingClass : 'popover-heading bg-transparent',
elementShowClass: 'with-popover-show tutorial-hl',
destroyOnHide : true,
@@ -203,7 +204,7 @@ function highlightStepTarget($target, step, popoverOptions)
const $body = $trigger.closest('body');
const triggerRect = info.trigger.getBoundingClientRect();
let $lightElement = $body.find('.tutorial-light-box');
if(!$lightElement.length) $lightElement = $('<div class="tutorial-light-box fixed pointer-events-none rounded" style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.4), 0 0 0 9999px rgba(0, 0, 0, 0.4); z-index: 999; transition: top .2s, left .2s, opacity .2s;"></div>').appendTo($body);
if(!$lightElement.length) $lightElement = $('<div class="tutorial-light-box fixed pointer-events-none rounded" style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.4), 0 0 0 9999px rgba(0, 0, 0, 0.4); z-index: 1690; transition: top .2s, left .2s, opacity .2s;"></div>').appendTo($body);
$lightElement.removeClass('opacity-0').css(
{
top : triggerRect.top,