1import{I as d,M as s,b as i,h as r,m as t,o as a,y as o,z as e}from"./index2.TXCYkG4n.js";import{a as m}from"./index1.CHy4f-jF.js";import{t as y}from"./index2.C3AWflXc.js";a();var b={name:"Tooltip",components:{doc:y},data(){return{data:[{id:"info",title:"ä»ç»"},{id:"example",title:"示ä¾",children:[{id:"basic",title:"åºç¡ç¨æ³",desc:"注æ<code>y-tooltip</code>å çææ¬ä½¿ç¨äº<code>white-space: nowrap</code>ï¼å³ä¸èªå¨æ¢è¡ï¼å¦éå±ç¤ºå¾å¤å 容并èªå¨æ¢è¡æ¶ï¼å»ºè®®ç»å 容<code>slot</code>å¢å æ ·å¼<code>white-space: normal</code>ã",code:`<template> 2 <y-tooltip content="Here is the prompt text"> 3 A balloon appears when the mouse passes over this text 4 </y-tooltip> 5</template>`},{id:"placement",title:"ä½ç½®",desc:"ç»ä»¶æä¾äº12个ä¸åçæ¹åæ¾ç¤º<code>y-tooltip</code>ï¼å ·ä½é ç½®å¯æ¥çAPIã",code:`<template> 6 <div class="top"> 7 <y-tooltip content="Top Left text" placement="top-start"> 8 <y-button>Top Left</y-button> 9 </y-tooltip> 10 <y-tooltip content="Top Center text" placement="top"> 11 <y-button>Top Center</y-button> 12 </y-tooltip> 13 <y-tooltip content="Top Right text" placement="top-end"> 14 <y-button>Top Right</y-button> 15 </y-tooltip> 16 </div> 17 <div class="center"> 18 <y-tooltip content="Left Top text" placement="left-start"> 19 <y-button>Left Top</y-button> 20 </y-tooltip> 21 <y-tooltip content="Right Top text" placement="right-start"> 22 <y-button>Right Top</y-button> 23 </y-tooltip> 24 </div> 25 <div class="center"> 26 <y-tooltip content="Left Center text" placement="left"> 27 <y-button>Left Center</y-button> 28 </y-tooltip> 29 <y-tooltip content="Right Center text" placement="right"> 30 <y-button>Right Center</y-button> 31 </y-tooltip> 32 </div> 33 <div class="center"> 34 <y-tooltip content="Left Bottom text" placement="left-end"> 35 <y-button>Left Bottom</y-button> 36 </y-tooltip> 37 <y-tooltip content="Right Bottom text" placement="right-end"> 38 <y-button>Right Bottom</y-button> 39 </y-tooltip> 40 </div> 41 <div class="bottom"> 42 <y-tooltip content="Bottom Left text" placement="bottom-start"> 43 <y-button>Bottom Left</y-button> 44 </y-tooltip> 45 <y-tooltip content="Bottom Center text" placement="bottom"> 46 <y-button>Bottom Center</y-button> 47 </y-tooltip> 48 <y-tooltip content="Bottom Right text" placement="bottom-end"> 49 <y-button>Bottom Right</y-button> 50 </y-tooltip> 51 </div> 52</template>`,codeStyle:` 53<style scoped> 54 .top, .bottom, .center{ 55 display: flex; 56 justify-content: space-between; 57 width: 380px; 58 margin: 0 auto 59 } 60 .center{ 61 width: 500px; 62 margin-top: 15px; 63 margin-bottom: 15px 64 } 65 .top button, .center button, .bottom button{ 66 width: 120px; 67 margin-right: 0!important 68 } 69</style>`},{id:"slot",title:"èªå®ä¹å 容",desc:"éè¿èªå®ä¹<code>slot</code>æ¾ç¤ºå¤è¡ææ¬ææ´å¤æçæ ·å¼ã",code:`<template> 70 <y-tooltip placement="top"> 71 <y-button>Multiple lines</y-button> 72 <template #content> 73 <p>Display multiple lines of information</p> 74 <p><i>Can customize the style</i></p> 75 </template> 76 </y-tooltip> 77</template>`},{id:"disabled",title:"ç¦ç¨",desc:"éè¿è®¾ç½®å±æ§<code>disabled</code>å¯ä»¥ç¦ç¨æåæç¤ºã",code:`<template> 78 <y-tooltip placement="top" content="Can disable text prompts" :disabled="disabled"> 79 <y-button @click="disabled = true">Click to close</y-button> 80 </y-tooltip> 81</template>`,codeOption:` 82<script> 83 export default { 84 data() { 85 return { 86 disabled: false 87 } 88 } 89 } 90<\/script>`,codeSetup:` 91<script setup> 92 import { ref } from "vue" 93 94 const disabled = ref(false) 95<\/script>`,codeTs:!1},{id:"delay",title:"å»¶æ¶",desc:"éè¿è®¾ç½®å±æ§<code>delay</code>å¯ä»¥å»¶æ¶æ¾ç¤ºæåæç¤ºï¼å使¯«ç§ã",code:`<template> 96 <y-tooltip placement="top" content="Tooltip text" :delay="1000"> 97 <y-button @click="disabled = true">Delay 1 second to show</y-button> 98 </y-tooltip> 99</template>`},{id:"theme",title:"主é¢",desc:"è®¾ç½®å±æ§<code>theme</code>å¯ä»¥æ¾ç¤ºä¸åçé¢è²ã",code:`<template> 100 <y-tooltip content="content of tooltip"> 101 <y-button>Dark(default)</y-button> 102 </y-tooltip> 103 <y-tooltip content="content of tooltip" theme="light"> 104 <y-button>Light</y-button> 105 </y-tooltip> 106</template>`},{id:"max-width",title:"èªå¨æ¢è¡",desc:"è®¾ç½®å±æ§<code>max-width</code>ï¼å½è¶ åºæå¤§å¼åï¼ææ¬å°èªå¨æ¢è¡ï¼å¹¶ä¸¤ç«¯å¯¹é½ã",code:`<template> 107 <y-tooltip max-width="200" content="Steven Paul Jobs was an American entrepreneur and business magnate. He was the chairman, chief executive officer, and a co-founder of Apple Inc."> 108 <y-button>Long Content</y-button> 109 </y-tooltip> 110</template>`}]}
110,{id:"api",title:"API",children:[{id:"props",title:"Props",slot:"props"},{id:"events",title:"Events",slot:"events"},{id:"slots",title:"Slots",slot:"slots"}]}]}}},c={class:"doc-table"};function f(g,l,x,v,u,w){const n=d("y-divider"),p=d("doc");return s(),r(p,{data:u.data,title:"Tooltip æåæç¤º",info:"æåæç¤ºæ°æ³¡æ¡ï¼å¨é¼ æ æ¬åæ¶æ¾ç¤ºï¼ä»£æ¿äºç³»ç»çtitleæç¤ºã"},{props:e(()=>[t("table",c,[l[20]||(l[20]=t("thead",null,[t("tr",null,[t("th",null,"屿§"),t("th",null,"说æ"),t("th",null,"ç±»å"),t("th",null,"é»è®¤å¼")])],-1)),t("tbody",null,[t("tr",null,[l[2]||(l[2]=t("td",null,"content",-1)),l[3]||(l[3]=t("td",null,"æ¾ç¤ºçå
容",-1)),t("td",null,[l[0]||(l[0]=o("String ",-1)),i(n,{mode:"vertical"}),l[1]||(l[1]=o("Number ",-1))]),l[4]||(l[4]=t("td",null,"空",-1))]),l[10]||(l[10]=t("tr",null,[t("td",null,"placement"),t("td",null,[o("æç¤ºæ¡åºç°çä½ç½®ï¼å¯éå¼ä¸º"),t("code",null,"top"),o("ã"),t("code",null,"top-start"),o("ã"),t("code",null,"top-end"),o("ã"),t("code",null,"bottom"),o("ã"),t("code",null,"bottom-start"),o("ã"),t("code",null,"bottom-end"),o("ã"),t("code",null,"left"),o("ã"),t("code",null,"left-start"),o("ã"),t("code",null,"left-end"),o("ã"),t("code",null,"right"),o("ã"),t("code",null,"right-start"),o("ã"),t("code",null,"right-end"),o("ï¼æ¯æèªå¨è¯å« ")]),t("td",null,"String"),t("td",null,"bottom")],-1)),l[11]||(l[11]=t("tr",null,[t("td",null,"disabled"),t("td",null,"æ¯å¦ç¦ç¨æç¤ºæ¡"),t("td",null,"Boolean"),t("td",null,"false")],-1)),l[12]||(l[12]=t("tr",null,[t("td",null,"delay"),t("td",null,"å»¶è¿æ¾ç¤ºï¼å使¯«ç§"),t("td",null,"Number"),t("td",null,"0")],-1)),l[13]||(l[13]=t("tr",null,[t("td",null,"always"),t("td",null,"æ¯å¦æ»æ¯å¯è§"),t("td",null,"Boolean"),t("td",null,"false")],-1)),l[14]||(l[14]=t("tr",null,[t("td",null,"theme"),t("td",null,[o("主é¢ï¼å¯éå¼ä¸º"),t("code",null,"dark"),o("æ"),t("code",null,"light")]),t("td",null,"String"),t("td",null,"dark")],-1)),t("tr",null,[l[7]||(l[7]=t("td",null,"max-width",-1)),l[8]||(l[8]=t("td",null,"æå¤§å®½åº¦ï¼è¶
åºæå¤§å¼åï¼ææ¬å°èªå¨æ¢è¡ï¼å¹¶ä¸¤ç«¯å¯¹é½",-1)),t("td",null,[l[5]||(l[5]=o("String ",-1)),i(n,{mode:"vertical"}),l[6]||(l[6]=o("Number ",-1))]),l[9]||(l[9]=t("td",null,"-",-1))]),l[15]||(l[15]=t("tr",null,[t("td",null,"offset"),t("td",null,"åºç°ä½ç½®çåç§»é"),t("td",null,"Number"),t("td",null,"0")],-1)),l[16]||(l[16]=t("tr",null,[t("td",null,"transfer"),t("td",null,[o("æ¯å¦å°å¼¹å±æ¾ç½®äº"),t("code",null,"body"),o("å
ï¼å¨"),t("code",null,"Tabs"),o("ã带æ"),t("code",null,"fixed"),o("ç"),t("code",null,"Table"),o("åå
ä½¿ç¨æ¶ï¼å»ºè®®æ·»å æ¤å±æ§ï¼å®å°ä¸åç¶çº§æ ·å¼å½±åï¼ä»èè¾¾å°æ´å¥½çææ ")]),t("td",null,"Boolean"),t("td",null,"false")],-1)),l[17]||(l[17]=t("tr",null,[t("td",null,"options"),t("td",null,[o("èªå®ä¹"),t("code",null,"popper.js"),o("çé
置项ï¼å
·ä½é
ç½®è§ "),t("a",{href:"https://popper.js.org/popper-documentation.html",target:"_blank"},"popper.jsææ¡£")]),t("td",null,"Object"),t("td",null,[t("code",null,"{ modifiers: { computeStyle:{ gpuAcceleration: false, }, preventOverflow :{ boundariesElement: 'window' }}}")])],-1)),l[18]||(l[18]=t("tr",null,[t("td",null,"transfer-class-name"),t("td",null,[o("å¼å¯"),t("code",null,"transfer"),o("æ¶ï¼ç»æµ®å±æ·»å é¢å¤ç"),t("code",null,"class"),o("åç§°")]),t("td",null,"String"),t("td",null,"-")],-1)),l[19]||(l[19]=t("tr",null,[t("td",null,"events-enabled"),t("td",null,[o("æ¯å¦å¼å¯"),t("code",null,"Popper"),o("ç"),t("code",null,"eventsEnabled"),o("屿§ï¼å¼å¯å¯è½ä¼çºç²ä¸å®çæ§è½")]),t("td",null,"Boolean"),t("td",null,"false")],-1))])])]),events:e(()=>[...l[21]||(l[21]=[t("table",{class:"doc-table"},[t("thead",null,[t("tr",null,[t("th",null,"äºä»¶å"),t("th",null,"说æ"),t("th",null,"è¿åå¼")])]),t("tbody",null,[t("tr",null,[t("td",null,"on-popper-show"),t("td",null,"å¨æç¤ºæ¡æ¾ç¤ºæ¶è§¦å"),t("td",null,"-")]),t("tr",null,[t("td",null,"on-popper-hide"),t("td",null,"å¨æç¤ºæ¡æ¶å¤±æ¶è§¦å"),t("td",null,"-")])])],-1)])]),slots:e(()=>[...l[22]||(l[22]=[t("table",{class:"doc-table"},[t("thead",null,[t("tr",null,[t("th",null,"åç§°"),t("th",null,"说æ")])]),t("tbody",null,[t("tr",null,[t("td",null,"default"),t("td",null,"主ä½å
容")]),t("tr",null,[t("td",null,"content"),t("td",null,[o("æç¤ºæ¡çå
容ï¼å®ä¹æ¤"),t("code",null,"slot"),o("æ¶ï¼ä¼è¦ç props "),t("code",null,"content"),o("ã")])])])],-1)])]),_:1},8,["data"])}var L=m(b,[["render",f]]);export{L as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.