element-plus
Version:
A Component Library for Vue 3
45 lines (40 loc) • 1.24 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
require('../../../hooks/index.js');
require('../../../tokens/index.js');
var arrow = require('./arrow.js');
var index = require('../../../hooks/use-namespace/index.js');
var popper = require('../../../tokens/popper.js');
const __default__ = {
name: "ElPopperArrow",
inheritAttrs: false
};
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: arrow.usePopperArrowProps,
setup(__props, { expose }) {
const props = __props;
const ns = index.useNamespace("popper");
const { arrowOffset, arrowRef } = vue.inject(popper.POPPER_CONTENT_INJECTION_KEY, void 0);
vue.watch(() => props.arrowOffset, (val) => {
arrowOffset.value = val;
});
vue.onBeforeUnmount(() => {
arrowRef.value = void 0;
});
expose({
arrowRef
});
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("span", {
ref_key: "arrowRef",
ref: arrowRef,
class: vue.normalizeClass(vue.unref(ns).e("arrow")),
"data-popper-arrow": ""
}, null, 2);
};
}
});
exports["default"] = _sfc_main;
//# sourceMappingURL=arrow2.js.map