mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Styles imported. Components added
This commit is contained in:
parent
3cb3910561
commit
8264983db4
452 changed files with 55902 additions and 0 deletions
39
components/dataviewlayoutoptions/DataViewLayoutOptions.vue
Executable file
39
components/dataviewlayoutoptions/DataViewLayoutOptions.vue
Executable file
|
@ -0,0 +1,39 @@
|
|||
<template>
|
||||
<div class="p-dataview-layout-options p-selectbutton p-buttonset">
|
||||
<button :class="buttonListClass" @click="changeLayout('list')" type="button">
|
||||
<i class="pi pi-bars"></i>
|
||||
</button>
|
||||
<button :class="buttonGridClass" @click="changeLayout('grid')" type="button">
|
||||
<i class="pi pi-th-large"></i>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DataViewLayoutOptions',
|
||||
emits: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: String
|
||||
},
|
||||
computed: {
|
||||
buttonListClass(){
|
||||
return [
|
||||
'p-button p-button-icon-only',
|
||||
{'p-highlight': this.modelValue === 'list'}
|
||||
]
|
||||
},
|
||||
buttonGridClass() {
|
||||
return [
|
||||
'p-button p-button-icon-only',
|
||||
{'p-highlight': this.modelValue === 'grid'}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeLayout(layout){
|
||||
this.$emit('update:modelValue', layout);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue