element-plus
Version:
A Component Library for Vue 3
53 lines (50 loc) • 2.22 kB
JavaScript
import { defineComponent, toRefs, reactive, openBlock, createBlock, normalizeProps, guardReactiveProps, unref, withCtx, createVNode, renderSlot, mergeProps, createCommentVNode } from 'vue';
import { pick } from 'lodash-unified';
import { tooltipV2ArrowProps } from './arrow.mjs';
import { tooltipV2ContentProps } from './content.mjs';
import { tooltipV2RootProps } from './root.mjs';
import { tooltipV2Props } from './tooltip.mjs';
import { tooltipV2TriggerProps } from './trigger.mjs';
import _sfc_main$1 from './root2.mjs';
import _sfc_main$4 from './arrow2.mjs';
import _sfc_main$3 from './content2.mjs';
import _sfc_main$2 from './trigger2.mjs';
const __default__ = {
name: "ElTooltipV2"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
...__default__,
props: tooltipV2Props,
setup(__props) {
const props = __props;
const refedProps = toRefs(props);
const arrowProps = reactive(pick(refedProps, Object.keys(tooltipV2ArrowProps)));
const contentProps = reactive(pick(refedProps, Object.keys(tooltipV2ContentProps)));
const rootProps = reactive(pick(refedProps, Object.keys(tooltipV2RootProps)));
const triggerProps = reactive(pick(refedProps, Object.keys(tooltipV2TriggerProps)));
return (_ctx, _cache) => {
return openBlock(), createBlock(_sfc_main$1, normalizeProps(guardReactiveProps(unref(rootProps))), {
default: withCtx(() => [
createVNode(_sfc_main$2, normalizeProps(guardReactiveProps(unref(triggerProps))), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "trigger")
]),
_: 3
}, 16),
createVNode(_sfc_main$3, normalizeProps(guardReactiveProps(unref(contentProps))), {
arrow: withCtx(({ style }) => [
_ctx.showArrow ? (openBlock(), createBlock(_sfc_main$4, mergeProps({ key: 0 }, unref(arrowProps), { style }), null, 16, ["style"])) : createCommentVNode("v-if", true)
]),
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16)
]),
_: 3
}, 16);
};
}
});
export { _sfc_main as default };
//# sourceMappingURL=tooltip2.mjs.map