tk-eui-plus
Version:
2 lines (1 loc) • 1.08 kB
JavaScript
(function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e.index=l(e.Vue))})(this,function(e){"use strict";const l=e.defineComponent({__name:"index",props:{placeholder:{type:String,default:"请选择"}},setup(o){const t=e.ref(""),a=[{value:"Option1",label:"Option1"},{value:"Option2",label:"Option2"},{value:"Option3",label:"Option3"},{value:"Option4",label:"Option4"},{value:"Option5",label:"Option5"}];return(i,p)=>{const r=e.resolveComponent("el-option"),d=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(d,e.mergeProps({modelValue:t.value,"onUpdate:modelValue":p[0]||(p[0]=n=>t.value=n),placeholder:o.placeholder},i.$attrs,{style:{width:"240px"}}),{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(a,n=>e.createVNode(r,{key:n.value,label:n.label,value:n.value},null,8,["label","value"])),64))]),_:1},16,["modelValue","placeholder"])}}});return{install(o){o.component("tkSelect",l)}}});