2022-09-06 12:03:37 +00:00
|
|
|
<template>
|
2024-01-30 14:35:32 +00:00
|
|
|
<div ref="container" :class="cx('root')" v-bind="ptm('root', getPTOptions)">
|
2022-09-06 12:03:37 +00:00
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-05-24 08:54:19 +00:00
|
|
|
import BaseSplitterPanel from './BaseSplitterPanel.vue';
|
2023-03-27 07:13:31 +00:00
|
|
|
|
2022-09-06 12:03:37 +00:00
|
|
|
export default {
|
|
|
|
name: 'SplitterPanel',
|
2023-05-24 08:54:19 +00:00
|
|
|
extends: BaseSplitterPanel,
|
2022-09-06 12:03:37 +00:00
|
|
|
computed: {
|
|
|
|
isNested() {
|
2022-09-14 11:26:01 +00:00
|
|
|
return this.$slots.default().some((child) => {
|
2022-09-06 12:03:37 +00:00
|
|
|
return child.type.name === 'Splitter';
|
|
|
|
});
|
2023-07-25 09:22:30 +00:00
|
|
|
},
|
|
|
|
getPTOptions() {
|
|
|
|
return {
|
|
|
|
context: {
|
|
|
|
nested: this.isNested
|
|
|
|
}
|
|
|
|
};
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
2022-09-14 11:26:01 +00:00
|
|
|
};
|
2022-09-06 12:03:37 +00:00
|
|
|
</script>
|