/*! * FormCreate 低代码表单渲染器 * @form-create/component-elm-select v2.6.3 * (c) 2018-2024 xaboy * Github https://github.com/xaboy/form-create * Site https://form-create.com/ * Released under the MIT License. */ (function(l,s){typeof exports=="object"&&typeof module!="undefined"?module.exports=s():typeof define=="function"&&define.amd?define(s):(l=typeof globalThis!="undefined"?globalThis:l||self,l.FcSelect=s())})(this,function(){"use strict";function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t,n=1;n0},Function(e){const t=this.getType(e);return t==="Function"||t==="AsyncFunction"},getType(e){const t=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(t)[1]},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e=="string"&&!e}};["Date","Object","String","Boolean","Array","Number"].forEach(e=>{a[e]=function(t){return a.type(t,e)}});function j(e,t){return{}.hasOwnProperty.call(e,t)}return{name:"fcSelect",functional:!0,props:{formCreateInject:{type:Object,required:!0}},render(e,t){const n=(i,o)=>{const u=i.slot;return e("ElOption",y([{},{props:i},{key:""+o+"-"+i.value}]),[u?e("template",{slot:i.slotName||"default"},[a.Function(u)?i.slot(e):u]):null])},r=(i,o)=>e("ElOptionGroup",{attrs:{label:i.label},key:""+o+"-"+i.label},[a.trueArray(i.options)&&i.options.map((u,p)=>n(u,p))]),c=t.props.formCreateInject.options;return e("ElSelect",y([{},t.data,{ref:"el"}]),[(Array.isArray(c)?c:[]).map((i,o)=>j(i||"","options")?r(i,o):n(i,o)),t.children])},mounted(){this.$emit("fc.el",this.$refs.el)}}});