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)

2 lines (1 loc) 831 B
import{openBlock as t,createBlock as o,createVNode as l}from"vue";var e={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 n={class:"p-dataview-layout-options p-selectbutton p-buttonset"},u=l("i",{class:"pi pi-bars"},null,-1),i=l("i",{class:"pi pi-th-large"},null,-1);e.render=function(e,s,a,p,r,d){return t(),o("div",n,[l("button",{class:d.buttonListClass,onClick:s[1]||(s[1]=t=>d.changeLayout("list")),type:"button"},[u],2),l("button",{class:d.buttonGridClass,onClick:s[2]||(s[2]=t=>d.changeLayout("grid")),type:"button"},[i],2)])};export default e;