vue-devui 1.0.0-beta.15 → 1.0.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -117,7 +117,7 @@ Tooltip.install = function(app) {
117
117
  var index = {
118
118
  title: "Tooltip\u63D0\u793A",
119
119
  category: "\u53CD\u9988",
120
- status: "50%",
120
+ status: "70%",
121
121
  install(app) {
122
122
  app.use(Tooltip);
123
123
  }
@@ -1 +1 @@
1
- (function(d,i){typeof exports=="object"&&typeof module!="undefined"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(d=typeof globalThis!="undefined"?globalThis:d||self,i(d.index={},d.Vue))})(this,function(d,i){"use strict";const u={position:{type:String,default:"top"},showAnimation:{type:Boolean,default:!0},content:{type:String},mouseLeaveDelay:{type:String,default:"150"},mouseEnterDelay:{type:String,default:"100"}};var p="",f=i.defineComponent({name:"DTooltip",props:u,setup(s){const n=i.reactive({left:0,top:0}),r=(o,t)=>{document.getElementById("devui-arrow").style[o]=t},e=i.ref(null);return i.onMounted(()=>{e.value.children[0].onmouseenter=function(){const o=document.createElement("div"),t=document.createElement("div"),l=document.createElement("div");o.classList.add("tooltip"),t.classList.add("arrow"),l.classList.add("tooltipcontent"),t.id="devui-arrow",o.id="devui-tooltip1",setTimeout(()=>{switch(document.getElementById("devui-tooltip").appendChild(o),o.appendChild(t),o.appendChild(l),l.innerHTML=s.content,o.style.opacity="1",o.style.zIndex="999",t.style.border="5px solid transparent",s.position){case"top":n.left=e.value.children[0].offsetLeft-o.offsetWidth/2+e.value.children[0].offsetWidth/2-5,n.top=e.value.children[0].offsetTop-10-l.offsetHeight,t.style.top=`${l.offsetHeight}px`,t.style.left=`${l.offsetWidth/2+5}px`,t.style.borderTop="5px solid rgb(70, 77, 110)";break;case"bottom":n.top=e.value.children[0].offsetHeight+e.value.children[0].offsetTop+10,n.left=e.value.children[0].offsetLeft+e.value.children[0].offsetWidth/2-l.offsetWidth/2-5,r("borderBottom","5px solid rgb(70, 77, 110)"),t.style.top="-10px",t.style.left=`${l.offsetWidth/2+5}px`,t.style.borderBottom="5px solid rgb(70, 77, 110)";break;case"left":n.top=e.value.children[0].offsetTop+e.value.children[0].offsetHeight/2-l.offsetHeight/2,n.left=e.value.children[0].offsetLeft-20-l.offsetWidth,r("borderLeft","5px solid rgb(70, 77, 110)"),t.style.left=`${l.offsetWidth+10}px`,t.style.top=`${l.offsetHeight/2-5}px`,t.style.borderLeft="5px solid rgb(70, 77, 110)";break;case"right":n.left=e.value.children[0].offsetLeft+e.value.children[0].offsetWidth,n.top=e.value.children[0].offsetTop+e.value.children[0].offsetHeight/2-l.offsetHeight/2,r("borderRight","5px solid rgb(70, 77, 110)"),t.style.top=`${l.offsetHeight/2-5}px`,t.style.left="-0px",t.style.borderRight="5px solid rgb(70, 77, 110)";break}o.style.top=n.top+5+"px",o.style.left=n.left+"px"},s.mouseEnterDelay)},e.value.children[0].onmouseleave=function(){setTimeout(()=>{document.getElementById("devui-tooltip1").removeChild(document.getElementById("devui-arrow")),document.getElementById("devui-tooltip").removeChild(document.getElementById("devui-tooltip1"))},s.mouseLeaveDelay)}}),i.onBeforeUnmount(()=>{e.value.children[0].onmouseenter=null,e.value.children[0].onmouseleave=null}),()=>{const o=i.renderSlot(i.useSlots(),"default");return i.createVNode("div",{class:"devui-tooltip",id:"devui-tooltip"},[i.createVNode("div",{class:"slotElement",ref:e},[o])])}}});f.install=function(s){s.component(f.name,f)};var a={title:"Tooltip\u63D0\u793A",category:"\u53CD\u9988",status:"50%",install(s){s.use(f)}};d.Tooltip=f,d.default=a,Object.defineProperty(d,"__esModule",{value:!0}),d[Symbol.toStringTag]="Module"});
1
+ (function(d,i){typeof exports=="object"&&typeof module!="undefined"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(d=typeof globalThis!="undefined"?globalThis:d||self,i(d.index={},d.Vue))})(this,function(d,i){"use strict";const u={position:{type:String,default:"top"},showAnimation:{type:Boolean,default:!0},content:{type:String},mouseLeaveDelay:{type:String,default:"150"},mouseEnterDelay:{type:String,default:"100"}};var p="",f=i.defineComponent({name:"DTooltip",props:u,setup(s){const n=i.reactive({left:0,top:0}),r=(o,t)=>{document.getElementById("devui-arrow").style[o]=t},e=i.ref(null);return i.onMounted(()=>{e.value.children[0].onmouseenter=function(){const o=document.createElement("div"),t=document.createElement("div"),l=document.createElement("div");o.classList.add("tooltip"),t.classList.add("arrow"),l.classList.add("tooltipcontent"),t.id="devui-arrow",o.id="devui-tooltip1",setTimeout(()=>{switch(document.getElementById("devui-tooltip").appendChild(o),o.appendChild(t),o.appendChild(l),l.innerHTML=s.content,o.style.opacity="1",o.style.zIndex="999",t.style.border="5px solid transparent",s.position){case"top":n.left=e.value.children[0].offsetLeft-o.offsetWidth/2+e.value.children[0].offsetWidth/2-5,n.top=e.value.children[0].offsetTop-10-l.offsetHeight,t.style.top=`${l.offsetHeight}px`,t.style.left=`${l.offsetWidth/2+5}px`,t.style.borderTop="5px solid rgb(70, 77, 110)";break;case"bottom":n.top=e.value.children[0].offsetHeight+e.value.children[0].offsetTop+10,n.left=e.value.children[0].offsetLeft+e.value.children[0].offsetWidth/2-l.offsetWidth/2-5,r("borderBottom","5px solid rgb(70, 77, 110)"),t.style.top="-10px",t.style.left=`${l.offsetWidth/2+5}px`,t.style.borderBottom="5px solid rgb(70, 77, 110)";break;case"left":n.top=e.value.children[0].offsetTop+e.value.children[0].offsetHeight/2-l.offsetHeight/2,n.left=e.value.children[0].offsetLeft-20-l.offsetWidth,r("borderLeft","5px solid rgb(70, 77, 110)"),t.style.left=`${l.offsetWidth+10}px`,t.style.top=`${l.offsetHeight/2-5}px`,t.style.borderLeft="5px solid rgb(70, 77, 110)";break;case"right":n.left=e.value.children[0].offsetLeft+e.value.children[0].offsetWidth,n.top=e.value.children[0].offsetTop+e.value.children[0].offsetHeight/2-l.offsetHeight/2,r("borderRight","5px solid rgb(70, 77, 110)"),t.style.top=`${l.offsetHeight/2-5}px`,t.style.left="-0px",t.style.borderRight="5px solid rgb(70, 77, 110)";break}o.style.top=n.top+5+"px",o.style.left=n.left+"px"},s.mouseEnterDelay)},e.value.children[0].onmouseleave=function(){setTimeout(()=>{document.getElementById("devui-tooltip1").removeChild(document.getElementById("devui-arrow")),document.getElementById("devui-tooltip").removeChild(document.getElementById("devui-tooltip1"))},s.mouseLeaveDelay)}}),i.onBeforeUnmount(()=>{e.value.children[0].onmouseenter=null,e.value.children[0].onmouseleave=null}),()=>{const o=i.renderSlot(i.useSlots(),"default");return i.createVNode("div",{class:"devui-tooltip",id:"devui-tooltip"},[i.createVNode("div",{class:"slotElement",ref:e},[o])])}}});f.install=function(s){s.component(f.name,f)};var a={title:"Tooltip\u63D0\u793A",category:"\u53CD\u9988",status:"70%",install(s){s.use(f)}};d.Tooltip=f,d.default=a,Object.defineProperty(d,"__esModule",{value:!0}),d[Symbol.toStringTag]="Module"});