1 line
13 KiB
Plaintext
1 line
13 KiB
Plaintext
|
{"version":3,"file":"wd-input.js","sources":["../../../../../../../node_modules/wot-design-uni/components/wd-input/wd-input.vue","../../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL25vZGVfbW9kdWxlcy93b3QtZGVzaWduLXVuaS9jb21wb25lbnRzL3dkLWlucHV0L3dkLWlucHV0LnZ1ZQ"],"sourcesContent":["<template>\n <view :class=\"rootClass\" :style=\"customStyle\" @click=\"handleClick\">\n <view v-if=\"label || useLabelSlot\" :class=\"labelClass\" :style=\"labelStyle\">\n <view v-if=\"prefixIcon || usePrefixSlot\" class=\"wd-input__prefix\">\n <wd-icon v-if=\"prefixIcon && !usePrefixSlot\" custom-class=\"wd-input__icon\" :name=\"prefixIcon\" @click=\"onClickPrefixIcon\" />\n <slot v-else name=\"prefix\"></slot>\n </view>\n <view class=\"wd-input__label-inner\">\n <template v-if=\"label\">{{ label }}</template>\n <slot v-else name=\"label\"></slot>\n </view>\n </view>\n <!-- 输入域 -->\n <view class=\"wd-input__body\">\n <view class=\"wd-input__value\">\n <view v-if=\"(prefixIcon || usePrefixSlot) && !label\" class=\"wd-input__prefix\">\n <wd-icon v-if=\"prefixIcon\" custom-class=\"wd-input__icon\" :name=\"prefixIcon\" @click=\"onClickPrefixIcon\" />\n <slot name=\"prefix\"></slot>\n </view>\n <input\n :class=\"[\n 'wd-input__inner',\n prefixIcon ? 'wd-input__inner--prefix' : '',\n showWordCount ? 'wd-input__inner--count' : '',\n alignRight ? 'is-align-right' : '',\n customInputClass\n ]\"\n :type=\"type\"\n :password=\"showPassword && !isPwdVisible\"\n v-model=\"inputValue\"\n :placeholder=\"placeholder || translate('placeholder')\"\n :disabled=\"disabled\"\n :maxlength=\"maxlength\"\n :focus=\"isFocus\"\n :confirm-type=\"confirmType\"\n :confirm-hold=\"confirmHold\"\n :cursor=\"cursor\"\n :cursor-spacing=\"cursorSpacing\"\n :placeholder-style=\"placeholderStyle\"\n :selection-start=\"selectionStart\"\n :selection-end=\"selectionEnd\"\n :adjust-position=\"adjustPosition\"\n :hold-keyboard=\"holdKeyboard\"\n :always-embed=\"alwaysEmbed\"\n :placeholder-class=\"inputPlaceholderClass\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @confirm=\"handleConfirm\"\n @keyboardheightchange=\"handleKeyboardheightchange\"\n />\n <view v-if=\"readonly\" class=\"wd-input__readonly-mask\" />\n <view v-if=\"showClear || showPassword || suffixIcon || showWordCount || useSuffixSlot\" class=\"wd-input__suffix\">\n <wd-icon v-if=\"showClear\" custom-class=\"wd-input__clear\" name=\"error-fill\" @click=\"clear\" />\n <wd-icon v-if=\"showPassword\" custom-class=\"wd-input__icon\" :name=\"isPwdVisible ? 'view' : 'eye-close'\" @click=\"togglePwdVisible\" />\n <view v-if=\"showWordCount\" class=\"wd-input__count\">\n <text\n :class=\"[\n inputValue && String(inputValue).length > 0 ? 'wd-input__count-current' : '',\n String(inputValue).length > maxlength! ? 'is-error' : ''\n ]\"\n >\n {{ String(inputValue).length }}\n </text>\n /{{ maxlength }}\n </view>\n <wd-icon v-if=\"suffixIcon\" custom-class=\"wd-input__icon\" :name=\"suffixIcon\" @click=\"onClickSuffixIcon\" />\n <slot name=\"suffix\"></slot>\n </view>\n </view>\n <view v-if=\"errorMessage\" class=\"wd-input__error-message\">{{ errorMessage }}</view>\n </view>\n </view>\n</template>\n\n<script lang=\"ts\">\nexport default {\n name: 'wd-input',\n options: {\n virtualHost: true,\n addGlobalClass: true,\n styleIsolation: 'shared'\n }\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport { computed, onBeforeMount, ref, watch } from 'vue'\nimport { objToStyle, requestAnimati
|