UNPKG

element-plus

Version:

A Component Library for Vue 3

38 lines (35 loc) 1.29 kB
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, renderSlot, createCommentVNode } from 'vue'; import '../../../hooks/index.mjs'; import { dividerProps } from './divider.mjs'; import { useNamespace } from '../../../hooks/use-namespace/index.mjs'; const __default__ = { name: "ElDivider" }; const _sfc_main = /* @__PURE__ */ defineComponent({ ...__default__, props: dividerProps, setup(__props) { const props = __props; const ns = useNamespace("divider"); const dividerStyle = computed(() => { return { "--el-border-style": props.borderStyle }; }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.direction)]), style: normalizeStyle(unref(dividerStyle)) }, [ _ctx.$slots.default && _ctx.direction !== "vertical" ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([unref(ns).e("text"), unref(ns).is(_ctx.contentPosition)]) }, [ renderSlot(_ctx.$slots, "default") ], 2)) : createCommentVNode("v-if", true) ], 6); }; } }); export { _sfc_main as default }; //# sourceMappingURL=divider2.mjs.map