mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-13 07:56:14 +01:00
This commit is contained in:
parent
0d1fcecec0
commit
2a75d4d4f9
3 changed files with 4 additions and 13 deletions
|
|
@ -13,8 +13,8 @@
|
|||
line-height: 17px;
|
||||
max-width: 320px;
|
||||
animation-name: zoomIn;
|
||||
animation-duration: 100ms;
|
||||
animation-delay: var(--b3-tooltips-delay, 500ms);
|
||||
animation-duration: 150ms;
|
||||
animation-delay: 300ms;
|
||||
animation-fill-mode: both;
|
||||
max-height: 90vh;
|
||||
overflow: auto;
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
pointer-events: none;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
transition: opacity 100ms var(--b3-tooltips-delay, 500ms) cubic-bezier(0, 0, .2, 1), transform 100ms var(--b3-tooltips-delay, 500ms) cubic-bezier(0, 0, .2, 1);
|
||||
transition: opacity 150ms 300ms cubic-bezier(0, 0, .2, 1), transform 150ms 300ms cubic-bezier(0, 0, .2, 1);
|
||||
}
|
||||
|
||||
&:hover,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ export const showTooltip = (
|
|||
tooltipClass?: string,
|
||||
event?: MouseEvent,
|
||||
space: number = 0.5,
|
||||
delay?: number
|
||||
) => {
|
||||
if (isMobile() || !message) {
|
||||
return;
|
||||
|
|
@ -42,14 +41,6 @@ export const showTooltip = (
|
|||
messageElement.innerHTML = message;
|
||||
// 避免原本的 top 和 left 影响计算
|
||||
messageElement.removeAttribute("style");
|
||||
|
||||
const delayAttr = target.closest("[data-tooltips-delay]")?.getAttribute("data-tooltips-delay");
|
||||
const parsedDelay = parseInt(delayAttr, 10);
|
||||
if (delay === undefined || delay === null) {
|
||||
delay = Number.isFinite(parsedDelay) ? parsedDelay : 500;
|
||||
}
|
||||
messageElement.style.setProperty("--b3-tooltips-delay", delay + "ms");
|
||||
|
||||
const position = target.getAttribute("data-position");
|
||||
const parentRect = target.parentElement.getBoundingClientRect();
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ export class Files extends Model {
|
|||
<span class="fn__space"></span>
|
||||
<span data-type="min" class="block__icon b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.min}${updateHotkeyAfterTip(window.siyuan.config.keymap.general.closeTab.custom)}"><svg><use xlink:href='#iconMin'></use></svg></span>
|
||||
</div>
|
||||
<div class="fn__flex-1" style="padding-top: 2px;" data-tooltips-delay="200"></div>
|
||||
<div class="fn__flex-1" style="padding-top: 2px;"></div>
|
||||
<ul class="b3-list fn__flex-column" style="min-height: auto;height:30px;transition: height .2s cubic-bezier(0, 0, .2, 1) 0ms">
|
||||
<li class="b3-list-item" data-type="toggle">
|
||||
<span class="b3-list-item__toggle">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue