UNPKG

primevue

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) [![Discord Chat](https://img.shields.io/discord/55794023

2 lines (1 loc) 860 B
import{openBlock as t,createBlock as o,createVNode as e}from"vue";var n={name:"DataViewLayoutOptions",emits:["update:modelValue"],props:{modelValue:String},computed:{buttonListClass(){return["p-button p-button-icon-only",{"p-highlight":"list"===this.modelValue}]},buttonGridClass(){return["p-button p-button-icon-only",{"p-highlight":"grid"===this.modelValue}]}},methods:{changeLayout(t){this.$emit("update:modelValue",t)}}};const i={class:"p-dataview-layout-options p-selectbutton p-buttonset"},l=e("i",{class:"pi pi-bars"},null,-1),u=e("i",{class:"pi pi-th-large"},null,-1);n.render=function(n,s,a,p,r,d){return t(),o("div",i,[e("button",{class:d.buttonListClass,onClick:s[1]||(s[1]=t=>d.changeLayout("list")),type:"button"},[l],2),e("button",{class:d.buttonGridClass,onClick:s[2]||(s[2]=t=>d.changeLayout("grid")),type:"button"},[u],2)])};export default n;