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) 2.92 kB
import t from"primevue/button";import e from"primevue/menu";import{UniqueComponentId as n}from"primevue/utils";import{resolveComponent as o,openBlock as l,createBlock as i,createVNode as a,mergeProps as d,withScopeId as s}from"vue";var r={name:"SplitButton",inheritAttrs:!1,props:{label:{type:String,default:null},icon:{type:String,default:null},model:{type:Array,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:String,default:"body"},class:null,style:null},methods:{onDropdownButtonClick(){this.$refs.menu.toggle({currentTarget:this.$el})},onDefaultButtonClick(){this.$refs.menu.hide()}},computed:{ariaId:()=>n(),containerClass(){return["p-splitbutton p-component",this.class]}},components:{PVSButton:t,PVSMenu:e}};const p=s("data-v-76d71c64")(((t,e,n,s,r,p)=>{const u=o("PVSButton"),c=o("PVSMenu");return l(),i("div",{class:p.containerClass,style:n.style},[a(u,d({type:"button",class:"p-splitbutton-defaultbutton"},t.$attrs,{icon:n.icon,label:n.label,onClick:p.onDefaultButtonClick}),null,16,["icon","label","onClick"]),a(u,{type:"button",class:"p-splitbutton-menubutton",icon:"pi pi-chevron-down",onClick:p.onDropdownButtonClick,disabled:t.$attrs.disabled,"aria-haspopup":"true","aria-controls":p.ariaId+"_overlay"},null,8,["onClick","disabled","aria-controls"]),a(c,{id:p.ariaId+"_overlay",ref:"menu",model:n.model,popup:!0,autoZIndex:n.autoZIndex,baseZIndex:n.baseZIndex,appendTo:n.appendTo},null,8,["id","model","autoZIndex","baseZIndex","appendTo"])],6)}));!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&o.firstChild?o.insertBefore(l,o.firstChild):o.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t))}}("\n.p-splitbutton[data-v-76d71c64] {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n position: relative;\n}\n.p-splitbutton .p-splitbutton-defaultbutton[data-v-76d71c64] {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0 none;\n}\n.p-splitbutton-menubutton[data-v-76d71c64] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-splitbutton .p-menu[data-v-76d71c64] {\n min-width: 100%;\n}\n.p-fluid .p-splitbutton[data-v-76d71c64] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),r.render=p,r.__scopeId="data-v-76d71c64";export default r;