2023-05-24 08:54:19 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
|
|
|
import { useStyle } from 'primevue/usestyle';
|
|
|
|
|
|
|
|
const styles = `
|
2023-09-25 19:11:55 +00:00
|
|
|
@layer primevue {
|
|
|
|
.p-splitter-panel {
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-splitter-panel-nested {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-splitter-panel .p-splitter {
|
|
|
|
flex-grow: 1;
|
|
|
|
border: 0 none;
|
|
|
|
}
|
2023-05-24 08:54:19 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: ({ instance }) => ['p-splitter-panel', { 'p-splitter-panel-nested': instance.isNested }]
|
|
|
|
};
|
|
|
|
|
2023-07-03 22:20:35 +00:00
|
|
|
const { load: loadStyle } = useStyle(styles, { name: 'splitterpanel', manual: true });
|
2023-05-24 08:54:19 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseSplitterPanel',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
size: {
|
|
|
|
type: Number,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
minSize: {
|
|
|
|
type: Number,
|
|
|
|
default: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
css: {
|
2023-05-30 11:06:57 +00:00
|
|
|
classes,
|
|
|
|
loadStyle
|
2023-05-24 08:54:19 +00:00
|
|
|
},
|
2023-05-30 11:06:57 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-24 08:54:19 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|