primevue-mirror/components/splitterpanel/SplitterPanel.vue

32 lines
656 B
Vue
Raw Normal View History

2022-09-06 12:03:37 +00:00
<template>
<div ref="container" :class="containerClass">
<slot></slot>
</div>
</template>
<script>
export default {
name: 'SplitterPanel',
props: {
size: {
type: Number,
default: null
},
minSize: {
type: Number,
default: null
}
},
computed: {
containerClass() {
return ['p-splitter-panel', {'p-splitter-panel-nested': this.isNested}];
},
isNested() {
return this.$slots.default().some(child => {
return child.type.name === 'Splitter';
});
}
}
}
</script>