UNPKG

primevue

Version:

PrimeVue is a premium UI library for Vue featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, wh

64 lines (58 loc) 1.59 kB
import BaseComponent from '@primevue/core/basecomponent'; import SidebarMainStyle from 'primevue/sidebarmain/style'; import { openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, renderSlot, normalizeClass } from 'vue'; var script$1 = { name: 'BaseSidebarMain', "extends": BaseComponent, props: { as: { type: [String, Object], "default": 'MAIN' }, asChild: { type: Boolean, "default": false } }, style: SidebarMainStyle, provide: function provide() { return { $pcSidebarMain: this, $parentInstance: this }; } }; var script = { name: 'SidebarMain', "extends": script$1, inheritAttrs: false, inject: { $pcSidebarLayout: { "default": null } }, methods: { onClick: function onClick(event) { var _this$$pcSidebarLayou; (_this$$pcSidebarLayou = this.$pcSidebarLayout) === null || _this$$pcSidebarLayou === void 0 || _this$$pcSidebarLayou.onMainClick(event); } } }; function render(_ctx, _cache, $props, $setup, $data, $options) { return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ key: 0, "class": _ctx.cx('root'), onClick: $options.onClick }, _ctx.ptmi('root')), { "default": withCtx(function () { return [renderSlot(_ctx.$slots, "default")]; }), _: 3 }, 16, ["class", "onClick"])) : renderSlot(_ctx.$slots, "default", { key: 1, "class": normalizeClass(_ctx.cx('root')), onClick: $options.onClick }); } script.render = render; export { script as default };