various-ui
Version:
This is a test version of the Vue 3 component library
82 lines (77 loc) • 2.71 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
require('../../../utils/index.js');
var index = require('./index.js');
var composable = require('./src/composable.js');
var index$1 = require('../../../utils/src/node/index.js');
const _hoisted_1 = { class: "ui-tooltip-content" };
const __default__ = vue.defineComponent({ name: "UiTooltipFunction" });
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: index.UiTooltipFunctionPropsOption,
emits: index.UiTooltipFunctionEmits,
setup(__props, { expose: __expose, emit: __emit }) {
const emits = __emit;
const define = __props;
const { ons, refs, nodes, methods, computeds } = composable.useComposable(define, emits);
const { active, visible } = refs;
const { tooltip } = nodes;
const { show, hidden } = methods;
const { style } = computeds;
vue.onBeforeUnmount(() => {
tooltip.value && index$1.remove(document.body, tooltip.value);
});
;
__expose({ show, hidden });
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock(
"div",
{
class: vue.normalizeClass(["ui-tooltip-container", { "ui-active": vue.unref(active) }])
},
[
vue.renderSlot(_ctx.$slots, "default"),
vue.createVNode(
vue.Transition,
vue.toHandlers(vue.unref(ons).animation),
{
default: vue.withCtx(() => [
vue.unref(visible) ? (vue.openBlock(), vue.createElementBlock(
"div",
vue.mergeProps({ key: 0 }, vue.toHandlers(vue.unref(ons).content, true), {
class: ["ui-tooltip", _ctx.classExtraName],
ref_key: "tooltip",
ref: tooltip,
style: vue.unref(style)
}),
[
vue.createElementVNode("div", _hoisted_1, [
vue.renderSlot(_ctx.$slots, "content", {}, () => [
vue.createTextVNode(
vue.toDisplayString(_ctx.content),
1
/* TEXT */
)
])
])
],
16
/* FULL_PROPS */
)) : vue.createCommentVNode("v-if", true)
]),
_: 3
/* FORWARDED */
},
16
/* FULL_PROPS */
)
],
2
/* CLASS */
);
};
}
});
exports.default = _sfc_main;
//# sourceMappingURL=index.vue2.js.map