import{n as c,Z as u,I as o}from"./index.8c202964.js";import{u as _}from"./framework.e8f655c8.js";const p={__name:"BtnSelect",props:{value:{type:[String,Number]},total:Number,options:Array,placeholderNum:{type:Number,default:8},valueKey:{type:[String,Function],default:"value"},labelKey:{type:[String,Function],default:"label"},selectModel:Object,totalText:{type:String,default:"\u6761"}},emits:["input","change"],setup(n,{emit:e}){const t=n;function a(s,r){return u(s)?s(r):r[s]}function l(s,r){return t.selectModel?t.selectModel.identifier===r.identifier:a(s,r)===t.value}function i(s){const r=a(t.valueKey,s);e("input",r),e("change",r,s)}return{__sfc:!0,props:t,emits:e,getVal:a,getActive:l,handleItemClick:i}}};var v=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"btn-select scrollbar-default"},[t("div",{staticClass:"divider flex-center-align"},[e.total?t("p",[e._v(" \u5171"),t("span",{staticClass:"number"},[e._v(e._s(e.total)+e._s(e.totalText))])]):e._e(),t("div",{staticClass:"line flex-1"})]),t("div",{staticClass:"btn-wrap flex-wrap"},[e._l(e.options,function(l){return t("span",{directives:[{name:"title",rawName:"v-title.overflow",value:a.getVal(e.labelKey,l),expression:"getVal(labelKey, btn)",modifiers:{overflow:!0}}],key:l.value,staticClass:"btn-item text-ellipsis text-center pointer",class:{active:a.getActive(e.valueKey,l)},on:{click:function(i){return a.handleItemClick(l)}}},[e._v(" "+e._s(a.getVal(e.labelKey,l))+" ")])}),e._l(e.placeholderNum,function(l){return t("i",{key:l+"_",staticClass:"placeholder"})})],2)])},f=[],d=c(p,v,f,!1,null,"b2385b82",null,null);const h=d.exports;const m={__name:"ImgBtnSelect",props:{value:[Number,String],label:String,options:Array,placeholderNum:{type:Number,default:8}},emits:["input","change"],setup(n,{emit:e}){const t=n;function a(l){const{value:i}=l;e("input",i),t.value!==i&&e("change",i)}return{__sfc:!0,props:t,emits:e,handleClick:a}}};var b=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"img-btn-select"},[t("p",{staticClass:"label"},[e._v(e._s(e.label))]),t("div",{staticClass:"btn-wrap flex-wrap"},[e._l(e.options,function(l){return t("span",{directives:[{name:"title",rawName:"v-title.overflow",value:l.label,expression:"btn.label",modifiers:{overflow:!0}}],key:l.value,staticClass:"btn-item text-ellipsis pointer text-center",class:{active:l.value===e.value},on:{click:function(i){return a.handleClick(l)}}},[e._v(" "+e._s(l.label)+" ")])}),e._l(e.placeholderNum,function(l){return t("i",{key:l+"_",staticClass:"placeholder"})})],2)])},y=[],g=c(m,b,y,!1,null,"27547ddc",null,null);const S=g.exports;function N(n){return n=_(n),o(n)?n.split("").join(","):""}const k=[{value:"",label:"\u5168\u90E8"},{label:"ABCD",value:"ABCD"},{label:"EFGH",value:"EFGH"},{label:"IJKL",value:"IJKL"},{label:"MNOP",value:"MNOP"},{label:"QRST",value:"QRST"},{label:"UVWX",value:"UVWX"},{label:"YZ",value:"YZ"}];export{h as B,S as I,N as a,k as l};
