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
71 lines (65 loc) • 1.94 kB
JavaScript
import { mergeProps, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue';
import BaseComponent from '@primevue/core/basecomponent';
import ScrollAreaContentStyle from 'primevue/scrollareacontent/style';
var script$1 = {
name: 'BaseScrollAreaContent',
"extends": BaseComponent,
props: {
as: {
type: [String, Object],
"default": 'DIV'
},
asChild: {
type: Boolean,
"default": false
}
},
style: ScrollAreaContentStyle,
provide: function provide() {
return {
$pcScrollAreaContent: this,
$parentInstance: this
};
}
};
var script = {
name: 'ScrollAreaContent',
"extends": script$1,
inheritAttrs: false,
inject: ['$pcScrollArea'],
computed: {
contentStyle: function contentStyle() {
var _this$$pcScrollArea;
var scrollMeta = (_this$$pcScrollArea = this.$pcScrollArea) === null || _this$$pcScrollArea === void 0 ? void 0 : _this$$pcScrollArea.scrollMeta;
return {
minWidth: scrollMeta && !scrollMeta.hiddenX ? 'fit-content' : undefined,
minHeight: scrollMeta && !scrollMeta.hiddenY ? 'fit-content' : undefined
};
},
attrs: function attrs() {
return mergeProps(this.a11yAttrs, this.ptmi('root'));
},
a11yAttrs: function a11yAttrs() {
return {
style: this.contentStyle
};
}
}
};
function render(_ctx, _cache, $props, $setup, $data, $options) {
return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({
key: 0,
"class": _ctx.cx('root')
}, $options.attrs), {
"default": withCtx(function () {
return [renderSlot(_ctx.$slots, "default")];
}),
_: 3
}, 16, ["class"])) : renderSlot(_ctx.$slots, "default", {
key: 1,
"class": normalizeClass(_ctx.cx('root')),
a11yAttrs: $options.a11yAttrs
});
}
script.render = render;
export { script as default };