b48fd546b99ff16c3d72c7a07b7d075ff42bb50f0b1e71b848d3b3db9d9afeebd56d891ce96ca868eb22fd06b9c773f8f3e8efe38d58012c3cf6e1fff4b486 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { defineComponent, inject, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle } from 'vue';
  2. import { POPPER_CONTENT_INJECTION_KEY } from './constants.mjs';
  3. import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
  4. import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
  5. const __default__ = defineComponent({
  6. name: "ElPopperArrow",
  7. inheritAttrs: false
  8. });
  9. const _sfc_main = /* @__PURE__ */ defineComponent({
  10. ...__default__,
  11. setup(__props, { expose }) {
  12. const ns = useNamespace("popper");
  13. const { arrowRef, arrowStyle } = inject(POPPER_CONTENT_INJECTION_KEY, void 0);
  14. onBeforeUnmount(() => {
  15. arrowRef.value = void 0;
  16. });
  17. expose({
  18. arrowRef
  19. });
  20. return (_ctx, _cache) => {
  21. return openBlock(), createElementBlock("span", {
  22. ref_key: "arrowRef",
  23. ref: arrowRef,
  24. class: normalizeClass(unref(ns).e("arrow")),
  25. style: normalizeStyle(unref(arrowStyle)),
  26. "data-popper-arrow": ""
  27. }, null, 6);
  28. };
  29. }
  30. });
  31. var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "arrow.vue"]]);
  32. export { ElPopperArrow as default };
  33. //# sourceMappingURL=arrow.mjs.map