2023-06-02 16:04:55 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: 'p-dataview-layout-options p-selectbutton p-buttonset',
|
|
|
|
listButton: ({ props }) => [
|
|
|
|
'p-button p-button-icon-only',
|
|
|
|
{
|
|
|
|
'p-highlight': props.modelValue === 'list'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
gridButton: ({ props }) => [
|
|
|
|
'p-button p-button-icon-only',
|
|
|
|
{
|
|
|
|
'p-highlight': props.modelValue === 'grid'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseDataViewLayoutOptions',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
modelValue: String
|
|
|
|
},
|
|
|
|
css: {
|
2023-06-06 13:13:46 +00:00
|
|
|
classes
|
2023-06-02 16:04:55 +00:00
|
|
|
},
|
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|