| 1 |
- import{a as y,c as w,s as S,j as v}from"./index-CT-LfNPG.js";import{T as P}from"./index-DRLFbjL_.js";import{d as V,p as h,q as O,o as _,w as u,m as c,t as j,u as T,b as $,j as k,e as r}from"./vue-vendor-C15EL-OS.js";var B=Object.defineProperty,f=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,d=(e,o,t)=>o in e?B(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,m=(e,o)=>{for(var t in o||(o={}))A.call(o,t)&&d(e,t,o[t]);if(f)for(var t of f(o))z.call(o,t)&&d(e,t,o[t]);return e};const E=V({name:"Tooltip",components:{Trigger:P},props:{popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},content:String,position:{type:String,default:"top"},mini:{type:Boolean,default:!1},backgroundColor:{type:String},contentClass:{type:[String,Array,Object]},contentStyle:{type:Object},arrowClass:{type:[String,Array,Object]},arrowStyle:{type:Object},popupContainer:{type:[String,Object]}},emits:{"update:popupVisible":e=>!0,popupVisibleChange:e=>!0},setup(e,{emit:o}){const t=w("tooltip"),a=k(e.defaultPopupVisible),s=r(()=>{var n;return(n=e.popupVisible)!=null?n:a.value}),p=n=>{a.value=n,o("update:popupVisible",n),o("popupVisibleChange",n)},i=r(()=>[`${t}-content`,e.contentClass,{[`${t}-mini`]:e.mini}]),g=r(()=>{if(e.backgroundColor||e.contentStyle)return m({backgroundColor:e.backgroundColor},e.contentStyle)}),b=r(()=>[`${t}-popup-arrow`,e.arrowClass]),C=r(()=>{if(e.backgroundColor||e.arrowStyle)return m({backgroundColor:e.backgroundColor},e.arrowStyle)});return{prefixCls:t,computedPopupVisible:s,contentCls:i,computedContentStyle:g,arrowCls:b,computedArrowStyle:C,handlePopupVisibleChange:p}}});function I(e,o,t,a,s,p){const i=h("Trigger");return _(),O(i,{class:$(e.prefixCls),trigger:"hover",position:e.position,"popup-visible":e.computedPopupVisible,"popup-offset":10,"show-arrow":"","content-class":e.contentCls,"content-style":e.computedContentStyle,"arrow-class":e.arrowCls,"arrow-style":e.computedArrowStyle,"popup-container":e.popupContainer,"animation-name":"zoom-in-fade-out","auto-fit-transform-origin":"",role:"tooltip",onPopupVisibleChange:e.handlePopupVisibleChange},{content:u(()=>[c(e.$slots,"content",{},()=>[j(T(e.content),1)])]),default:u(()=>[c(e.$slots,"default")]),_:3},8,["class","position","popup-visible","content-class","content-style","arrow-class","arrow-style","popup-container","onPopupVisibleChange"])}var l=y(E,[["render",I]]);const G=Object.assign(l,{install:(e,o)=>{S(e,o);const t=v(o);e.component(t+l.name,l)}});export{G as T};
|