birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
49 lines (48 loc) • 2.25 kB
JavaScript
;
const tooltip_vue_vue_type_script_lang = require("./tooltip.vue2.js");
const vue = require("vue");
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.js");
const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("div", { class: "triangle" }, null, -1);
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _directive_clickOutside = vue.resolveDirective("clickOutside");
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
_ctx.show ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
key: 0,
to: "body"
}, [
vue.createVNode(vue.Transition, { name: "tooltip-fade" }, {
default: vue.withCtx(() => [
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
ref: "containerRef",
class: vue.normalizeClass(`${_ctx.name}-container`)
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-content`)
}, [
!_ctx.slots.content ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
vue.createTextVNode(vue.toDisplayString(_ctx.content), 1)
], 64)) : vue.createCommentVNode("", true),
vue.renderSlot(_ctx.$slots, "content")
], 2),
_hoisted_1
], 2)), [
[vue.vShow, _ctx.visible],
[_directive_clickOutside, _ctx.trigger === "click" && _ctx.closeTool]
])
]),
_: 3
})
])) : vue.createCommentVNode("", true),
vue.createElementVNode("div", {
ref: "slotRef",
class: vue.normalizeClass(`${_ctx.name}-inner`),
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
onMouseenter: _cache[1] || (_cache[1] = (...args) => _ctx.mouseenter && _ctx.mouseenter(...args)),
onMouseleave: _cache[2] || (_cache[2] = (...args) => _ctx.mouseleave && _ctx.mouseleave(...args))
}, [
vue.renderSlot(_ctx.$slots, "default")
], 34)
], 64);
}
const tooltip = /* @__PURE__ */ _pluginVue_exportHelper(tooltip_vue_vue_type_script_lang, [["render", _sfc_render]]);
module.exports = tooltip;