52 lines
974 B
Vue
52 lines
974 B
Vue
<script>
|
|
import BaseComponent from 'primevue/basecomponent';
|
|
import { useStyle } from 'primevue/usestyle';
|
|
|
|
const styles = `
|
|
@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;
|
|
}
|
|
}
|
|
`;
|
|
|
|
const classes = {
|
|
root: ({ instance }) => ['p-splitter-panel', { 'p-splitter-panel-nested': instance.isNested }]
|
|
};
|
|
|
|
const { load: loadStyle } = useStyle(styles, { name: 'splitterpanel', manual: true });
|
|
|
|
export default {
|
|
name: 'BaseSplitterPanel',
|
|
extends: BaseComponent,
|
|
props: {
|
|
size: {
|
|
type: Number,
|
|
default: null
|
|
},
|
|
minSize: {
|
|
type: Number,
|
|
default: null
|
|
}
|
|
},
|
|
css: {
|
|
classes,
|
|
loadStyle
|
|
},
|
|
provide() {
|
|
return {
|
|
$parentInstance: this
|
|
};
|
|
}
|
|
};
|
|
</script>
|