# Tooltip (تلميح)

تلميح طبقة عائمة يُسبَّب بالتمرير / النقر / التركيز. تموضع ثابت + انعكاس عند حافة إطار العرض (flip/shift)، ويُطوى تلقائيًا عندما يخرج العنصر المُشغِّل من إطار العرض.

تلميح
<template>
  <div class="demo-row" style="justify-content: center; padding: 56px 0 72px">
    <LhTooltip content="تلميح علوي" placement="top">
      <LhButton>أعلى</LhButton>
    </LhTooltip>
    <LhTooltip content="تلميح سفلي" placement="bottom">
      <LhButton>أسفل</LhButton>
    </LhTooltip>
    <LhTooltip content="تلميح الجانب الأيسر" placement="left">
      <LhButton>يسار</LhButton>
    </LhTooltip>
    <LhTooltip content="تلميح الجانب الأيمن" placement="right">
      <LhButton>يمين</LhButton>
    </LhTooltip>
    <LhTooltip content="تُشغَّل بالنقر" trigger="click">
      <LhButton type="primary">نقر</LhButton>
    </LhTooltip>
    <LhTooltip content="تموضع صارم وفق top دون انعكاس" placement="top" :flip="false">
      <LhButton>top صارم</LhButton>
    </LhTooltip>
    <LhTooltip content="تلميح بلون السمة" type="primary">
      <LhButton>لون السمة</LhButton>
    </LhTooltip>
  </div>
</template>

# Props

خاصية الوصف النوع الافتراضي
content محتوى التلميح string ''
placement 12 اتجاهًا 'top' \| 'top-start' \| … \| 'right-end' 'top'
flip ينعكس الاتجاه عند عدم كفاية المساحة على المحور الرئيسي؛ ضبط false يُلزم التموضع الصارم وفق placement boolean true
trigger طريقة التشغيل 'hover' \| 'click' \| 'focus' 'hover'
manual / visible وضع التحكم اليدوي boolean false / —
showAfter / hideAfter تأخير الإظهار والإخفاء (ms) number 0
openDelay / closeDelay أسماء بديلة لتأخير الإظهار والإخفاء (مرادفة لـ showAfter/hideAfter وأسبقية أقل) number —
effect السمة الفاتحة أو الداكنة 'dark' \| 'light' 'dark'
type لون سمة مدمج (يتجاوز خلفية effect) 'primary' \| 'success' \| … —
bgColor لون خلفية مخصص (الأسبقية الأعلى) string —
maxWidth أقصى عرض string \| number '200px'
teleportTarget هدف تركيب الطبقة العائمة (تطبيق بنقل عنصر DOM) string \| HTMLElement 'body'
disabled / themeVars / bgPattern / sx — — —

# Events

يُدار الإظهار والإخفاء داخليًا عبر منطق التشغيل.

# الأساليب

في الوضع manual تُستخدم أساليب النسخة show() / hide() / toggle() (defineExpose).

تلميح

يعمل sx على العنصر الجذري المُشغِّل (أما popper فمحمول على body، ولا ينطبق عليه sx).

Copyright © 2024-2026 FengMo WenXue