UNPKG

yk-element-components-v2

Version:

2 lines (1 loc) 5.85 kB
(function(a,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(a=typeof globalThis<"u"?globalThis:a||self,a.index=i())})(this,function(){"use strict";function a(t,e,r,u,s,f,c,w){var n=typeof t=="function"?t.options:t;e&&(n.render=e,n.staticRenderFns=r,n._compiled=!0),u&&(n.functional=!0),f&&(n._scopeId="data-v-"+f);var o;if(c?(o=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),s&&s.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(c)},n._ssrRegister=o):s&&(o=w?function(){s.call(this,(n.functional?this.parent:this).$root.$options.shadowRoot)}:s),o)if(n.functional){n._injectStyles=o;var B=n.render;n.render=function($,h){return o.call(h),B($,h)}}else{var m=n.beforeCreate;n.beforeCreate=m?[].concat(m,o):[o]}return{exports:t,options:n}}const i={name:"yk-input",props:{max:null,min:null,step:null,maxlength:Number,minlength:Number,value:[String,Number],size:String,resize:String,form:String,autofocus:Boolean,disabled:Boolean,readonly:Boolean,placeholder:String,type:{type:String,default:"text"},autosize:{type:[Boolean,Object],default:!1},autocomplete:{type:String,default:"off"},autoComplete:{type:String,validator(t){return process.env.NODE_ENV!=="production"&&console.warn("[Element Warn][Input]'auto-complete' property will be deprecated in next major version. please use 'autocomplete' instead."),!0}},validateEvent:{type:Boolean,default:!0},suffixIcon:String,prefixIcon:String,label:String,clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},tabindex:String,rows:Number,name:String},data(){return{inputValue:this.value}},methods:{inpuBlur(t){this.$emit("blur",t)},inpuFocus(t){this.$emit("focus",t)},inpuChange(t){this.$emit("change",t)},inpuInput(t){this.$emit("input",t)},inpuClear(t){this.$emit("clear",t)},inpuSelect(t){this.$emit("select",t)},focus(){this.$refs.input.focus()},blur(){this.$refs.input.blur()},select(){this.$refs.input.select()}}};var g=function(){var e=this,r=e._self._c;return r("el-input",{ref:"input",attrs:{size:e.size,resize:e.resize,form:e.form,disabled:e.disabled,readonly:e.readonly,type:e.type,autosize:e.autosize,autocomplete:e.autocomplete,validateEvent:e.validateEvent,suffixIcon:e.suffixIcon,prefixIcon:e.prefixIcon,label:e.label,clearable:e.clearable,showPassword:e.showPassword,showWordLimit:e.showWordLimit,tabindex:e.tabindex,maxlength:e.maxlength,minlength:e.minlength,placeholder:e.placeholder,rows:e.rows,name:e.name,autofocus:e.autofocus},on:{blur:e.inpuBlur,focus:e.inpuFocus,change:e.inpuChange,input:e.inpuInput,clear:e.inpuClear,select:e.inpuSelect},model:{value:e.inputValue,callback:function(u){e.inputValue=u},expression:"inputValue"}},[e._t("prefix",null,{slot:"prefix"}),e._t("suffix",null,{slot:"suffix"}),e._t("prepend",null,{slot:"prepend"}),e._t("append",null,{slot:"append"})],2)},_=[],b=a(i,g,_,!1,null,null,null,null);const p=b.exports,v={name:"yk-autocomplete",props:{valueKey:String,debounce:{type:Number,default:300},placement:{type:String,default:"bottom-start"},fetchSuggestions:null,popperClass:String,triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:{type:Boolean,default:!1},hideLoading:{type:Boolean,default:!1},popperAppendToBody:{type:Boolean,default:!0},highlightFirstItem:{type:Boolean,default:!1},max:null,min:null,step:null,maxlength:null,minlength:null,value:[String,Number],size:String,resize:String,form:String,autofocus:Boolean,disabled:Boolean,readonly:Boolean,placeholder:String,type:{type:String,default:"text"},autosize:{type:[Boolean,Object],default:!1},autocomplete:{type:String,default:"off"},autoComplete:{type:String,validator(t){return process.env.NODE_ENV!=="production"&&console.warn("[Element Warn][Input]'auto-complete' property will be deprecated in next major version. please use 'autocomplete' instead."),!0}},validateEvent:{type:Boolean,default:!0},suffixIcon:String,prefixIcon:String,label:String,clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},tabindex:String,rows:Number,name:String},data(){return{inputValue:this.value}},methods:{inpuBlur(t){this.$emit("blur",t)},inpuFocus(t){this.$emit("focus",t)},inpuChange(t){this.$emit("change",t)},inpuInput(t){this.$emit("input",t)},inpuClear(t){this.$emit("clear",t)},inpuSelect(t){this.$emit("select",t)},focus(){this.$refs.input.focus()}}};var y=function(){var e=this,r=e._self._c;return r("el-autocomplete",{ref:"input",attrs:{size:e.size,resize:e.resize,form:e.form,disabled:e.disabled,readonly:e.readonly,type:e.type,autosize:e.autosize,autocomplete:e.autocomplete,validateEvent:e.validateEvent,suffixIcon:e.suffixIcon,prefixIcon:e.prefixIcon,label:e.label,clearable:e.clearable,showPassword:e.showPassword,showWordLimit:e.showWordLimit,tabindex:e.tabindex,maxlength:e.maxlength,minlength:e.minlength,placeholder:e.placeholder,rows:e.rows,name:e.name,autofocus:e.autofocus,debounce:e.debounce,highlightFirstItem:e.highlightFirstItem,popperAppendToBody:e.popperAppendToBody,hideLoading:e.hideLoading,selectWhenUnmatched:e.selectWhenUnmatched,triggerOnFocus:e.triggerOnFocus,popperClass:e.popperClass,fetchSuggestions:e.fetchSuggestions,placement:e.placement},on:{blur:e.inpuBlur,focus:e.inpuFocus,change:e.inpuChange,input:e.inpuInput,clear:e.inpuClear,select:e.inpuSelect},model:{value:e.inputValue,callback:function(u){e.inputValue=u},expression:"inputValue"}},[e._t("prefix",null,{slot:"prefix"}),e._t("suffix",null,{slot:"suffix"}),e._t("prepend",null,{slot:"prepend"}),e._t("append",null,{slot:"append"})],2)},x=[],S=a(v,y,x,!1,null,null,null,null);const d=S.exports;return{install(t){t.component(p.name,p),t.component(d.name,d)}}});