mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 16:30:29 +08:00
86fc4eb695
Former-commit-id: 227ec9664fa803a11a731cf5336437c497f17066
2 lines
9.8 KiB
JavaScript
2 lines
9.8 KiB
JavaScript
"76:function(e,t,n){\"use strict\";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(\"div\",{class:[\"textarea\"===e.type?\"el-textarea\":\"el-input\",e.inputSize?\"el-input--\"+e.inputSize:\"\",{\"is-disabled\":e.inputDisabled,\"is-exceed\":e.inputExceed,\"el-input-group\":e.$slots.prepend||e.$slots.append,\"el-input-group--append\":e.$slots.append,\"el-input-group--prepend\":e.$slots.prepend,\"el-input--prefix\":e.$slots.prefix||e.prefixIcon,\"el-input--suffix\":e.$slots.suffix||e.suffixIcon||e.clearable||e.showPassword}],on:{mouseenter:function(t){e.hovering=!0},mouseleave:function(t){e.hovering=!1}}},[\"textarea\"!==e.type?[e.$slots.prepend?n(\"div\",{staticClass:\"el-input-group__prepend\"},[e._t(\"prepend\")],2):e._e(),\"textarea\"!==e.type?n(\"input\",e._b({ref:\"input\",staticClass:\"el-input__inner\",attrs:{tabindex:e.tabindex,type:e.showPassword?e.passwordVisible?\"text\":\"password\":e.type,disabled:e.inputDisabled,readonly:e.readonly,autocomplete:e.autoComplete||e.autocomplete,\"aria-label\":e.label},on:{compositionstart:e.handleCompositionStart,compositionupdate:e.handleCompositionUpdate,compositionend:e.handleCompositionEnd,input:e.handleInput,focus:e.handleFocus,blur:e.handleBlur,change:e.handleChange}},\"input\",e.$attrs,!1)):e._e(),e.$slots.prefix||e.prefixIcon?n(\"span\",{staticClass:\"el-input__prefix\"},[e._t(\"prefix\"),e.prefixIcon?n(\"i\",{staticClass:\"el-input__icon\",class:e.prefixIcon}):e._e()],2):e._e(),e.getSuffixVisible()?n(\"span\",{staticClass:\"el-input__suffix\"},[n(\"span\",{staticClass:\"el-input__suffix-inner\"},[e.showClear&&e.showPwdVisible&&e.isWordLimitVisible?e._e():[e._t(\"suffix\"),e.suffixIcon?n(\"i\",{staticClass:\"el-input__icon\",class:e.suffixIcon}):e._e()],e.showClear?n(\"i\",{staticClass:\"el-input__icon el-icon-circle-close el-input__clear\",on:{mousedown:function(e){e.preventDefault()},click:e.clear}}):e._e(),e.showPwdVisible?n(\"i\",{staticClass:\"el-input__icon el-icon-view el-input__clear\",on:{click:e.handlePasswordVisible}}):e._e(),e.isWordLimitVisible?n(\"span\",{staticClass:\"el-input__count\"},[n(\"span\",{staticClass:\"el-input__count-inner\"},[e._v(\"\\n \"+e._s(e.textLength)+\"/\"+e._s(e.upperLimit)+\"\\n \")])]):e._e()],2),e.validateState?n(\"i\",{staticClass:\"el-input__icon\",class:[\"el-input__validateIcon\",e.validateIcon]}):e._e()]):e._e(),e.$slots.append?n(\"div\",{staticClass:\"el-input-group__append\"},[e._t(\"append\")],2):e._e()]:n(\"textarea\",e._b({ref:\"textarea\",staticClass:\"el-textarea__inner\",style:e.textareaStyle,attrs:{tabindex:e.tabindex,disabled:e.inputDisabled,readonly:e.readonly,autocomplete:e.autoComplete||e.autocomplete,\"aria-label\":e.label},on:{compositionstart:e.handleCompositionStart,compositionupdate:e.handleCompositionUpdate,compositionend:e.handleCompositionEnd,input:e.handleInput,focus:e.handleFocus,blur:e.handleBlur,change:e.handleChange}},\"textarea\",e.$attrs,!1)),e.isWordLimitVisible&&\"textarea\"===e.type?n(\"span\",{staticClass:\"el-input__count\"},[e._v(e._s(e.textLength)+\"/\"+e._s(e.upperLimit))]):e._e()],2)};r._withStripped=!0;var i=n(4),o=n.n(i),a=n(11),s=n.n(a),u=void 0,l=\"\\n height:0 !important;\\n visibility:hidden !important;\\n overflow:hidden !important;\\n position:absolute !important;\\n z-index:-1000 !important;\\n top:0 !important;\\n right:0 !important\\n\",c=[\"letter-spacing\",\"line-height\",\"padding-top\",\"padding-bottom\",\"font-family\",\"font-weight\",\"font-size\",\"text-rendering\",\"text-transform\",\"width\",\"text-indent\",\"padding-left\",\"padding-right\",\"border-width\",\"box-sizing\"];function d(e){var t=window.getComputedStyle(e),n=t.getPropertyValue(\"box-sizing\"),r=parseFloat(t.getPropertyValue(\"padding-bottom\"))+parseFloat(t.getPropertyValue(\"padding-top\")),i=parseFloat(t.getPropertyValue(\"border-bottom-width\"))+parseFloat(t.getPropertyValue(\"border-top-width\"));return{contextStyle:c.map((function(e){return e+\":\"+t.getPropertyValue(e)})).join(\";\"),paddingSize:r,borderSize:i,boxSizing:n}}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;u||(u=document.createElement(\"textarea\"),document.body.appendChild(u));var r=d(e),i=r.paddingSize,o=r.borderSize,a=r.boxSizing,s=r.contextStyle;u.setAttribute(\"style\",s+\";\"+l),u.value=e.value||e.placeholder||\"\";var c=u.scrollHeight,f={};\"border-box\"===a?c+=o:\"content-box\"===a&&(c-=i),u.value=\"\";var h=u.scrollHeight-i;if(null!==t){var p=h*t;\"border-box\"===a&&(p=p+i+o),c=Math.max(p,c),f.minHeight=p+\"px\"}if(null!==n){var m=h*n;\"border-box\"===a&&(m=m+i+o),c=Math.min(m,c)}return f.height=c+\"px\",u.parentNode&&u.parentNode.removeChild(u),u=null,f}var h=n(9),p=n.n(h),m=n(21),y={name:\"ElInput\",componentName:\"ElInput\",mixins:[o.a,s.a],inheritAttrs:!1,inject:{elForm:{default:\"\"},elFormItem:{default:\"\"}},data:function(){return{textareaCalcStyle:{},hovering:!1,focused:!1,isComposing:!1,passwordVisible:!1}},props:{value:[String,Number],size:String,resize:String,form:String,disabled:Boolean,readonly:Boolean,type:{type:String,default:\"text\"},autosize:{type:[Boolean,Object],default:!1},autocomplete:{type:String,default:\"off\"},autoComplete:{type:String,validator:function(e){return!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},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},validateState:function(){return this.elFormItem?this.elFormItem.validateState:\"\"},needStatusIcon:function(){return!!this.elForm&&this.elForm.statusIcon},validateIcon:function(){return{validating:\"el-icon-loading\",success:\"el-icon-circle-check\",error:\"el-icon-circle-close\"}[this.validateState]},textareaStyle:function(){return p()({},this.textareaCalcStyle,{resize:this.resize})},inputSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},inputDisabled:function(){return this.disabled||(this.elForm||{}).disabled},nativeInputValue:function(){return null===this.value||void 0===this.value?\"\":String(this.value)},showClear:function(){return this.clearable&&!this.inputDisabled&&!this.readonly&&this.nativeInputValue&&(this.focused||this.hovering)},showPwdVisible:function(){return this.showPassword&&!this.inputDisabled&&!this.readonly&&(!!this.nativeInputValue||this.focused)},isWordLimitVisible:function(){return this.showWordLimit&&this.$attrs.maxlength&&(\"text\"===this.type||\"textarea\"===this.type)&&!this.inputDisabled&&!this.readonly&&!this.showPassword},upperLimit:function(){return this.$attrs.maxlength},textLength:function(){return\"number\"==typeof this.value?String(this.value).length:(this.value||\"\").length},inputExceed:function(){return this.isWordLimitVisible&&this.textLength>this.upperLimit}},watch:{value:function(e){this.$nextTick(this.resizeTextarea),this.validateEvent&&this.dispatch(\"ElFormItem\",\"el.form.change\",[e])},nativeInputValue:function(){this.setNativeInputValue()},type:function(){var e=this;this.$nextTick((function(){e.setNativeInputValue(),e.resizeTextarea(),e.updateIconOffset()}))}},methods:{focus:function(){this.getInput().focus()},blur:function(){this.getInput().blur()},getMigratingConfig:function(){return{props:{icon:\"icon is removed, use suffix-icon / prefix-icon instead.\",\"on-icon-click\":\"on-icon-click is removed.\"},events:{click:\"click is removed.\"}}},handleBlur:function(e){this.focused=!1,this.$emit(\"blur\",e),this.validateEvent&&this.dispatch(\"ElFormItem\",\"el.form.blur\",[this.value])},select:function(){this.getInput().select()},resizeTextarea:function(){if(!this.$isServer){var e=this.autosize;if(\"textarea\"===this.type)if(e){var t=e.minRows,n=e.maxRows;this.textareaCalcStyle=f(this.$refs.textarea,t,n)}else this.textareaCalcStyle={minHeight:f(this.$refs.textarea).minHeight}}},setNativeInputValue:function(){var e=this.getInput();e&&e.value!==this.nativeInputValue&&(e.value=this.nativeInputValue)},handleFocus:function(e){this.focused=!0,this.$emit(\"focus\",e)},handleCompositionStart:function(){this.isComposing=!0},handleCompositionUpdate:function(e){var t=e.target.value,n=t[t.length-1]||\"\";this.isComposing=!Object(m.isKorean)(n)},handleCompositionEnd:function(e){this.isComposing&&(this.isComposing=!1,this.handleInput(e))},handleInput:function(e){this.isComposing||e.target.value!==this.nativeInputValue&&(this.$emit(\"input\",e.target.value),this.$nextTick(this.setNativeInputValue))},handleChange:function(e){this.$emit(\"change\",e.target.value)},calcIconOffset:function(e){var t=[].slice.call(this.$el.querySelectorAll(\".el-input__\"+e)||[]);if(t.length){for(var n=null,r=0;r<t.length;r++)if(t[r].parentNode===this.$el){n=t[r];break}if(n){var i={suffix:\"append\",prefix:\"prepend\"}[e];this.$slots[i]?n.style.transform=\"translateX(\"+(\"suffix\"===e?\"-\":\"\")+this.$el.querySelector(\".el-input-group__\"+i).offsetWidth+\"px)\":n.removeAttribute(\"style\")}}},updateIconOffset:function(){this.calcIconOffset(\"prefix\"),this.calcIconOffset(\"suffix\")},clear:function(){this.$emit(\"input\",\"\"),this.$emit(\"change\",\"\"),this.$emit(\"clear\")},handlePasswordVisible:function(){this.passwordVisible=!this.passwordVisible,this.focus()},getInput:function(){return this.$refs.input||this.$refs.textarea},getSuffixVisible:function(){return this.$slots.suffix||this.suffixIcon||this.showClear||this.showPassword||this.isWordLimitVisible||this.validateState&&this.needStatusIcon}},created:function(){this.$on(\"inputSelect\",this.select)},mounted:function(){this.setNativeInputValue(),this.resizeTextarea(),this.updateIconOffset()},updated:function(){this.$nextTick(this.updateIconOffset)}},g=n(0),v=Object(g.a)(y,r,[],!1,null,null,null);v.options.__file=\"packages/input/src/input.vue\";var _=v.exports;_.install=function(e){e.component(_.name,_)},t.default=_}";
|