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) 831 B
this.primevue=this.primevue||{},this.primevue.basecomponent=function(t,e){"use strict";return{name:"BaseComponent",props:{pt:{type:Object,default:void 0}},methods:{getOption(e={},s=""){const i=t.ObjectUtils.convertToFlatCase(s);return e[Object.keys(e).find((e=>t.ObjectUtils.convertToFlatCase(e)===i))||""]},getPTValue(s={},i="",r={}){const u=t.ObjectUtils.getItemValue(this.getOption(s,i),r),a=t.ObjectUtils.getItemValue(this.getOption(this.defaultPT,i),r);return e.mergeProps(u,a)},ptm(t="",e={}){return this.getPTValue(this.pt,t,{props:this.$props,state:this.$data,...e})},ptmo(t={},e="",s={}){return this.getPTValue(t,e,s)}},computed:{defaultPT(){return t.ObjectUtils.getItemValue(this.getOption(this.$primevue.config.pt,this.$.type.name),this.defaultsParams)},defaultsParams(){return{instance:this.$}}}}}(primevue.utils,Vue);