UNPKG

@opensig/opendesign

Version:

68 lines (67 loc) 2.56 kB
"use strict"; const vue = require("vue"); const index = require("../popup/index.js"); const types = require("./types.js"); const vueUtils = require("../_utils/vue-utils.js"); const __default__ = { inheritAttrs: false }; const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...__default__, __name: "OPopover", props: types.popoverProps, emits: ["update:visible"], setup(__props, { emit: __emit }) { const props = __props; const emits = __emit; const updateVisible = (val) => { emits("update:visible", val); }; return (_ctx, _cache) => { return props.disabled ? vue.renderSlot(_ctx.$slots, "target", { key: 0 }) : (vue.openBlock(), vue.createBlock(vue.unref(index.OPopup), { key: 1, class: "o-popover", offset: props.offset, "edge-offset": props.edgeOffset, visible: props.visible, position: props.position, trigger: props.trigger, target: props.target, wrapper: props.wrapper, "wrap-class": vue.unref(vueUtils.mergeClass)("o-popover-wrap", props.wrapClass), anchor: props.anchor, "anchor-class": props.anchor ? vue.unref(vueUtils.mergeClass)("o-popover-anchor", props.anchorClass) : "", "unmount-on-hide": props.unmountOnHide, "auto-hide": props.autoHide, disabled: props.disabled, transition: props.transition, "adjust-width": props.adjustWidth, adaptive: props.adaptive, "adjust-min-width": props.adjustMinWidth, "hide-when-target-invisible": props.hideWhenTargetInvisible, "hover-delay": props.hoverDelay, "before-hide": props.beforeHide, "before-show": props.beforeShow, "onUpdate:visible": updateVisible }, { target: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "target") ]), default: vue.withCtx(() => [ vue.createElementVNode( "div", vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), [ vue.renderSlot(_ctx.$slots, "default") ], 16 /* FULL_PROPS */ ) ]), _: 3 /* FORWARDED */ }, 8, ["offset", "edge-offset", "visible", "position", "trigger", "target", "wrapper", "wrap-class", "anchor", "anchor-class", "unmount-on-hide", "auto-hide", "disabled", "transition", "adjust-width", "adaptive", "adjust-min-width", "hide-when-target-invisible", "hover-delay", "before-hide", "before-show"])); }; } }); module.exports = _sfc_main;