@opensig/opendesign
Version:
44 lines (43 loc) • 1.19 kB
JavaScript
import { defineComponent, computed, createElementBlock, openBlock, withDirectives, normalizeClass, renderSlot, unref } from "vue";
import "../scrollbar/index.mjs";
import { vScrollbar } from "../scrollbar/vScrollbar.mjs";
const _hoisted_1 = { class: "o-option-list" };
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "OOptionList",
props: {
wrapClass: {},
scrollbar: { type: [Boolean, Object] }
},
setup(__props) {
const props = __props;
const scrollbarProps = computed(() => {
if (props.scrollbar === true) {
return {
showType: "hover",
size: "small"
};
}
return props.scrollbar;
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", _hoisted_1, [
withDirectives((openBlock(), createElementBlock(
"div",
{
class: normalizeClass(["o-options-container", props.wrapClass])
},
[
renderSlot(_ctx.$slots, "default")
],
2
/* CLASS */
)), [
[unref(vScrollbar), scrollbarProps.value]
])
]);
};
}
});
export {
_sfc_main as default
};