1 |
- {"version":3,"sources":["webpack:///./node_modules/vant/es/field/index.js","webpack:///./node_modules/vant/es/search/style/index.js","webpack:///./node_modules/vant/es/cell/Cell.js","webpack:///./node_modules/vant/es/cell/index.js","webpack:///./node_modules/vant/es/field/utils.js","webpack:///./node_modules/vant/es/field/Field.js","webpack:///./node_modules/vant/es/search/Search.js","webpack:///./node_modules/vant/es/search/index.js"],"names":["Field","stdin_default","name","bem","cellSharedProps","icon","String","size","title","value","label","center","Boolean","isLink","border","required","iconPrefix","valueClass","labelClass","titleClass","titleStyle","arrowDirection","clickable","type","default","cellProps","props","slots","route","renderLabel","showLabel","renderTitle","renderValue","slot","hasValue","hasTitle","alone","renderLeftIcon","renderRightIcon","name2","_a","_b","classes","borderless","extra","call","Cell","isEmptyValue","Array","isArray","length","runSyncRule","rule","pattern","test","runRuleValidator","Promise","resolve","returnVal","validator","then","getRuleMessage","message","startComposing","target","composing","endComposing","dispatchEvent","Event","resizeTextarea","input","autosize","scrollTop","style","height","scrollHeight","maxHeight","minHeight","Math","min","max","mapInputType","inputmode","getStringLength","str","cutString","maxlength","slice","join","create","fieldSharedProps","id","leftIcon","rightIcon","autofocus","clearable","formatter","Function","clearIcon","modelValue","inputAlign","placeholder","autocomplete","errorMessage","clearTrigger","formatTrigger","error","disabled","readonly","fieldProps","rows","rules","Object","labelWidth","labelAlign","showWordLimit","errorMessageAlign","colon","emits","emit","state","focused","validateFailed","validateMessage","inputRef","customValue","parent","form","getModelValue","getProp","key","showClear","trigger","formValue","runRules","reduce","promise","result","resetValidation","validate","validateWithTrigger","defaultTrigger","validateTrigger","filter","limitValueLength","updateValue","isNumber","format","onInput","event","blur","focus","adjustTextareaSize","onFocus","onBlur","onClickInput","onClickLeftIcon","onClickRightIcon","onClear","showError","labelStyle","width","onKeypress","ENTER_CODE","keyCode","submitOnEnter","getInputId","renderInput","controlClass","custom","inputAttrs","ref","class","onClick","onChange","onCompositionend","onCompositionstart","leftIconSlot","rightIconSlot","renderWordLimit","count","renderMessage","showErrorMessage","renderFieldBody","button","Label","LeftIcon","t","searchProps","shape","actionText","background","showAction","attrs","filedRef","onCancel","action","renderAction","text","fieldPropNames","keys","renderField","fieldAttrs","left","Search"],"mappings":"kKAAA,gGAEA,MAAMA,EAAQ,eAAY,QAC1B,IAAIC,EAAgBD,G,kCCHpB,6D,oCCAA,4JAKA,MAAOE,EAAMC,GAAO,eAAgB,QAC9BC,EAAkB,CACtBC,KAAMC,OACNC,KAAMD,OACNE,MAAO,OACPC,MAAO,OACPC,MAAO,OACPC,OAAQC,QACRC,OAAQD,QACRE,OAAQ,OACRC,SAAUH,QACVI,WAAYV,OACZW,WAAY,OACZC,WAAY,OACZC,WAAY,OACZC,WAAY,KACZC,eAAgBf,OAChBgB,UAAW,CACTC,KAAMX,QACNY,QAAS,OAGPC,EAAY,eAAO,GAAIrB,EAAiB,QAC9C,IAAIH,EAAgB,6BAAgB,CAClCC,OACAwB,MAAOD,EACP,MAAMC,GAAO,MACXC,IAEA,MAAMC,EAAQ,iBACRC,EAAc,KAClB,MAAMC,EAAYH,EAAMjB,OAAS,eAAMgB,EAAMhB,OAC7C,GAAIoB,EACF,OAAO,yBAAa,MAAO,CACzB,MAAS,CAAC3B,EAAI,SAAUuB,EAAMR,aAC7B,CAACS,EAAMjB,MAAQiB,EAAMjB,QAAUgB,EAAMhB,SAGtCqB,EAAc,KAClB,GAAIJ,EAAMnB,OAAS,eAAMkB,EAAMlB,OAC7B,OAAO,yBAAa,MAAO,CACzB,MAAS,CAACL,EAAI,SAAUuB,EAAMP,YAC9B,MAASO,EAAMN,YACd,CAACO,EAAMnB,MAAQmB,EAAMnB,QAAU,yBAAa,OAAQ,KAAM,CAACkB,EAAMlB,QAASqB,OAG3EG,EAAc,KAClB,MAAMC,EAAON,EAAMlB,OAASkB,EAAMH,QAC5BU,EAAWD,GAAQ,eAAMP,EAAMjB,OACrC,GAAIyB,EAAU,CACZ,MAAMC,EAAWR,EAAMnB,OAAS,eAAMkB,EAAMlB,OAC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B,GAC9CO,EAAmBP,GAAU9B,EAAK,kBAAmB8B,GACrDQ,EAAoBR,GAAU9B,EAAK,mBAAoB8B,GACvDkD,EAAiBvF,OAAOwF,KAAK,QAC7BC,EAAc,KAClB,MAAMC,EAAa,eAAO,GAAIT,EAAO,eAAKvK,EAAO6K,GAAiB,CAChE5G,GAAI2E,MAEAlB,EAAW3I,GAAU8G,EAAK,oBAAqB9G,GACrD,OAAO,yBAAa,OAAO,wBAAY,CACrC,IAAOyL,EACP,KAAQ,SACR,MAAS/L,EAAI,SACb,QAAU,EACV,OAAUuJ,EACV,QAAWD,EACX,QAAWK,EACX,WAAcI,EACd,gBAAiBP,EACjB,oBAAqBC,EACrB,qBAAsBC,EACtB,sBAAuBT,GACtBsD,GAAa,eAAK/K,EAAO,CAAC,YAAa,iBAM5C,OAJA,eAAU,CACR4H,QACAD,SAEK,KACL,IAAI9G,EACJ,OAAO,yBAAa,MAAO,CACzB,MAASrC,EAAI,CACX,cAAeuB,EAAMsK,aAEvB,MAAS,CACPD,WAAYrK,EAAMqK,aAEnB,CAAsB,OAApBvJ,EAAKb,EAAMgL,WAAgB,EAASnK,EAAGK,KAAKlB,GAAQ,yBAAa,MAAO,CAC3E,MAASxB,EAAI,UAAWuB,EAAMmK,QAC7B,CAAChK,IAAe4K,MAAiBJ,UC7G1C,MAAMO,EAAS,eAAY,GAC3B,IAAI,EAAgBA,G","file":"static/js/chunk-d758a428.b3f2cd06.js","sourcesContent":["import { withInstall } from \"../utils\";\nimport _Field from \"./Field\";\nconst Field = withInstall(_Field);\nvar stdin_default = Field;\nexport {\n Field,\n stdin_default as default\n};\n","import \"../../style/base.css\";\nimport \"../../badge/index.css\";\nimport \"../../icon/index.css\";\nimport \"../../cell/index.css\";\nimport \"../../field/index.css\";\nimport \"../index.css\";\n","import { createVNode as _createVNode } from \"vue\";\nimport { defineComponent } from \"vue\";\nimport { isDef, extend, truthProp, unknownProp, numericProp, createNamespace } from \"../utils\";\nimport { useRoute, routeProps } from \"../composables/use-route\";\nimport { Icon } from \"../icon\";\nconst [name, bem] = createNamespace(\"cell\");\nconst cellSharedProps = {\n icon: String,\n size: String,\n title: numericProp,\n value: numericProp,\n label: numericProp,\n center: Boolean,\n isLink: Boolean,\n border: truthProp,\n required: Boolean,\n iconPrefix: String,\n valueClass: unknownProp,\n labelClass: unknownProp,\n titleClass: unknownProp,\n titleStyle: null,\n arrowDirection: String,\n clickable: {\n type: Boolean,\n default: null\n }\n};\nconst cellProps = extend({}, cellSharedProps, routeProps);\nvar stdin_default = defineComponent({\n name,\n props: cellProps,\n setup(props, {\n slots\n }) {\n const route = useRoute();\n const renderLabel = () => {\n const showLabel = slots.label || isDef(props.label);\n if (showLabel) {\n return _createVNode(\"div\", {\n \"class\": [bem(\"label\"), props.labelClass]\n }, [slots.label ? slots.label() : props.label]);\n }\n };\n const renderTitle = () => {\n if (slots.title || isDef(props.title)) {\n return _createVNode(\"div\", {\n \"class\": [bem(\"title\"), props.titleClass],\n \"style\": props.titleStyle\n }, [slots.title ? slots.title() : _createVNode(\"span\", null, [props.title]), renderLabel()]);\n }\n };\n const renderValue = () => {\n const slot = slots.value || slots.default;\n const hasValue = slot || isDef(props.value);\n if (hasValue) {\n const hasTitle = slots.title || isDef(props.title);\n return _createVNode(\"div\", {\n \"class\": [bem(\"value\", {\n alone: !hasTitle\n }), props.valueClass]\n }, [slot ? slot() : _createVNode(\"span\", null, [props.value])]);\n }\n };\n const renderLeftIcon = () => {\n if (slots.icon) {\n return slots.icon();\n }\n if (props.icon) {\n return _createVNode(Icon, {\n \"name\": props.icon,\n \"class\": bem(\"left-icon\"),\n \"classPrefix\": props.iconPrefix\n }, null);\n }\n };\n const renderRightIcon = () => {\n if (slots[\"right-icon\"]) {\n return slots[\"right-icon\"]();\n }\n if (props.isLink) {\n const name2 = props.arrowDirection ? `arrow-${props.arrowDirection}` : \"arrow\";\n return _createVNode(Icon, {\n \"name\": name2,\n \"class\": bem(\"right-icon\")\n }, null);\n }\n };\n return () => {\n var _a, _b;\n const {\n size,\n center,\n border,\n isLink,\n required\n } = props;\n const clickable = (_a = props.clickable) != null ? _a : isLink;\n const classes = {\n center,\n required,\n clickable,\n borderless: !border\n };\n if (size) {\n classes[size] = !!size;\n }\n return _createVNode(\"div\", {\n \"class\": bem(classes),\n \"role\": clickable ? \"button\" : void 0,\n \"tabindex\": clickable ? 0 : void 0,\n \"onClick\": route\n }, [renderLeftIcon(), renderTitle(), renderValue(), renderRightIcon(), (_b = slots.extra) == null ? void 0 : _b.call(slots)]);\n };\n }\n});\nexport {\n cellSharedProps,\n stdin_default as default\n};\n","import { withInstall } from \"../utils\";\nimport _Cell from \"./Cell\";\nconst Cell = withInstall(_Cell);\nvar stdin_default = Cell;\nexport {\n Cell,\n stdin_default as default\n};\n","import {\n isObject,\n isPromise,\n isFunction,\n getRootScrollTop,\n setRootScrollTop\n} from \"../utils\";\nfunction isEmptyValue(value) {\n if (Array.isArray(value)) {\n return !value.length;\n }\n if (value === 0) {\n return false;\n }\n return !value;\n}\nfunction runSyncRule(value, rule) {\n if (rule.required && isEmptyValue(value)) {\n return false;\n }\n if (rule.pattern && !rule.pattern.test(String(value))) {\n return false;\n }\n return true;\n}\nfunction runRuleValidator(value, rule) {\n return new Promise((resolve) => {\n const returnVal = rule.validator(value, rule);\n if (isPromise(returnVal)) {\n returnVal.then(resolve);\n return;\n }\n resolve(returnVal);\n });\n}\nfunction getRuleMessage(value, rule) {\n const { message } = rule;\n if (isFunction(message)) {\n return message(value, rule);\n }\n return message || \"\";\n}\nfunction startComposing({ target }) {\n target.composing = true;\n}\nfunction endComposing({ target }) {\n if (target.composing) {\n target.composing = false;\n target.dispatchEvent(new Event(\"input\"));\n }\n}\nfunction resizeTextarea(input, autosize) {\n const scrollTop = getRootScrollTop();\n input.style.height = \"auto\";\n let height = input.scrollHeight;\n if (isObject(autosize)) {\n const { maxHeight, minHeight } = autosize;\n if (maxHeight !== void 0) {\n height = Math.min(height, maxHeight);\n }\n if (minHeight !== void 0) {\n height = Math.max(height, minHeight);\n }\n }\n if (height) {\n input.style.height = `${height}px`;\n setRootScrollTop(scrollTop);\n }\n}\nfunction mapInputType(type) {\n if (type === \"number\") {\n return {\n type: \"text\",\n inputmode: \"decimal\"\n };\n }\n if (type === \"digit\") {\n return {\n type: \"tel\",\n inputmode: \"numeric\"\n };\n }\n return { type };\n}\nfunction getStringLength(str) {\n return [...str].length;\n}\nfunction cutString(str, maxlength) {\n return [...str].slice(0, maxlength).join(\"\");\n}\nexport {\n cutString,\n endComposing,\n getRuleMessage,\n getStringLength,\n mapInputType,\n resizeTextarea,\n runRuleValidator,\n runSyncRule,\n startComposing\n};\n","import { createTextVNode as _createTextVNode, mergeProps as _mergeProps, createVNode as _createVNode } from \"vue\";\nimport { ref, watch, provide, computed, nextTick, reactive, onMounted, defineComponent } from \"vue\";\nimport { isDef, extend, addUnit, FORM_KEY, numericProp, unknownProp, resetScroll, formatNumber, preventDefault, makeStringProp, makeNumericProp, createNamespace } from \"../utils\";\nimport { cutString, runSyncRule, endComposing, mapInputType, startComposing, getRuleMessage, resizeTextarea, getStringLength, runRuleValidator } from \"./utils\";\nimport { cellSharedProps } from \"../cell/Cell\";\nimport { CUSTOM_FIELD_INJECTION_KEY, useParent } from \"@vant/use\";\nimport { useId } from \"../composables/use-id\";\nimport { useExpose } from \"../composables/use-expose\";\nimport { Icon } from \"../icon\";\nimport { Cell } from \"../cell\";\nconst [name, bem] = createNamespace(\"field\");\nconst fieldSharedProps = {\n id: String,\n name: String,\n leftIcon: String,\n rightIcon: String,\n autofocus: Boolean,\n clearable: Boolean,\n maxlength: numericProp,\n formatter: Function,\n clearIcon: makeStringProp(\"clear\"),\n modelValue: makeNumericProp(\"\"),\n inputAlign: String,\n placeholder: String,\n autocomplete: String,\n errorMessage: String,\n clearTrigger: makeStringProp(\"focus\"),\n formatTrigger: makeStringProp(\"onChange\"),\n error: {\n type: Boolean,\n default: null\n },\n disabled: {\n type: Boolean,\n default: null\n },\n readonly: {\n type: Boolean,\n default: null\n }\n};\nconst fieldProps = extend({}, cellSharedProps, fieldSharedProps, {\n rows: numericProp,\n type: makeStringProp(\"text\"),\n rules: Array,\n autosize: [Boolean, Object],\n labelWidth: numericProp,\n labelClass: unknownProp,\n labelAlign: String,\n showWordLimit: Boolean,\n errorMessageAlign: String,\n colon: {\n type: Boolean,\n default: null\n }\n});\nvar stdin_default = defineComponent({\n name,\n props: fieldProps,\n emits: [\"blur\", \"focus\", \"clear\", \"keypress\", \"click-input\", \"click-left-icon\", \"click-right-icon\", \"update:modelValue\"],\n setup(props, {\n emit,\n slots\n }) {\n const id = useId();\n const state = reactive({\n focused: false,\n validateFailed: false,\n validateMessage: \"\"\n });\n const inputRef = ref();\n const customValue = ref();\n const {\n parent: form\n } = useParent(FORM_KEY);\n const getModelValue = () => {\n var _a;\n return String((_a = props.modelValue) != null ? _a : \"\");\n };\n const getProp = (key) => {\n if (isDef(props[key])) {\n return props[key];\n }\n if (form && isDef(form.props[key])) {\n return form.props[key];\n }\n };\n const showClear = computed(() => {\n const readonly = getProp(\"readonly\");\n if (props.clearable && !readonly) {\n const hasValue = getModelValue() !== \"\";\n const trigger = props.clearTrigger === \"always\" || props.clearTrigger === \"focus\" && state.focused;\n return hasValue && trigger;\n }\n return false;\n });\n const formValue = computed(() => {\n if (customValue.value && slots.input) {\n return customValue.value();\n }\n return props.modelValue;\n });\n const runRules = (rules) => rules.reduce((promise, rule) => promise.then(() => {\n if (state.validateFailed) {\n return;\n }\n let {\n value\n } = formValue;\n if (rule.formatter) {\n value = rule.formatter(value, rule);\n }\n if (!runSyncRule(value, rule)) {\n state.validateFailed = true;\n state.validateMessage = getRuleMessage(value, rule);\n return;\n }\n if (rule.validator) {\n return runRuleValidator(value, rule).then((result) => {\n if (result && typeof result === \"string\") {\n state.validateFailed = true;\n state.validateMessage = result;\n } else if (result === false) {\n state.validateFailed = true;\n state.validateMessage = getRuleMessage(value, rule);\n }\n });\n }\n }), Promise.resolve());\n const resetValidation = () => {\n if (state.validateFailed) {\n state.validateFailed = false;\n state.validateMessage = \"\";\n }\n };\n const validate = (rules = props.rules) => new Promise((resolve) => {\n resetValidation();\n if (rules) {\n runRules(rules).then(() => {\n if (state.validateFailed) {\n resolve({\n name: props.name,\n message: state.validateMessage\n });\n } else {\n resolve();\n }\n });\n } else {\n resolve();\n }\n });\n const validateWithTrigger = (trigger) => {\n if (form && props.rules) {\n const defaultTrigger = form.props.validateTrigger === trigger;\n const rules = props.rules.filter((rule) => {\n if (rule.trigger) {\n return rule.trigger === trigger;\n }\n return defaultTrigger;\n });\n if (rules.length) {\n validate(rules);\n }\n }\n };\n const limitValueLength = (value) => {\n const {\n maxlength\n } = props;\n if (isDef(maxlength) && getStringLength(value) > maxlength) {\n const modelValue = getModelValue();\n if (modelValue && getStringLength(modelValue) === +maxlength) {\n return modelValue;\n }\n return cutString(value, +maxlength);\n }\n return value;\n };\n const updateValue = (value, trigger = \"onChange\") => {\n value = limitValueLength(value);\n if (props.type === \"number\" || props.type === \"digit\") {\n const isNumber = props.type === \"number\";\n value = formatNumber(value, isNumber, isNumber);\n }\n if (props.formatter && trigger === props.formatTrigger) {\n value = props.formatter(value);\n }\n if (inputRef.value && inputRef.value.value !== value) {\n inputRef.value.value = value;\n }\n if (value !== props.modelValue) {\n emit(\"update:modelValue\", value);\n }\n };\n const onInput = (event) => {\n if (!event.target.composing) {\n updateValue(event.target.value);\n }\n };\n const blur = () => {\n var _a;\n return (_a = inputRef.value) == null ? void 0 : _a.blur();\n };\n const focus = () => {\n var _a;\n return (_a = inputRef.value) == null ? void 0 : _a.focus();\n };\n const adjustTextareaSize = () => {\n const input = inputRef.value;\n if (props.type === \"textarea\" && props.autosize && input) {\n resizeTextarea(input, props.autosize);\n }\n };\n const onFocus = (event) => {\n state.focused = true;\n emit(\"focus\", event);\n nextTick(adjustTextareaSize);\n if (getProp(\"readonly\")) {\n blur();\n }\n };\n const onBlur = (event) => {\n if (getProp(\"readonly\")) {\n return;\n }\n state.focused = false;\n updateValue(getModelValue(), \"onBlur\");\n emit(\"blur\", event);\n validateWithTrigger(\"onBlur\");\n nextTick(adjustTextareaSize);\n resetScroll();\n };\n const onClickInput = (event) => emit(\"click-input\", event);\n const onClickLeftIcon = (event) => emit(\"click-left-icon\", event);\n const onClickRightIcon = (event) => emit(\"click-right-icon\", event);\n const onClear = (event) => {\n preventDefault(event);\n emit(\"update:modelValue\", \"\");\n emit(\"clear\", event);\n };\n const showError = computed(() => {\n if (typeof props.error === \"boolean\") {\n return props.error;\n }\n if (form && form.props.showError && state.validateFailed) {\n return true;\n }\n });\n const labelStyle = computed(() => {\n const labelWidth = getProp(\"labelWidth\");\n if (labelWidth) {\n return {\n width: addUnit(labelWidth)\n };\n }\n });\n const onKeypress = (event) => {\n const ENTER_CODE = 13;\n if (event.keyCode === ENTER_CODE) {\n const submitOnEnter = form && form.props.submitOnEnter;\n if (!submitOnEnter && props.type !== \"textarea\") {\n preventDefault(event);\n }\n if (props.type === \"search\") {\n blur();\n }\n }\n emit(\"keypress\", event);\n };\n const getInputId = () => props.id || `${id}-input`;\n const renderInput = () => {\n const controlClass = bem(\"control\", [getProp(\"inputAlign\"), {\n error: showError.value,\n custom: !!slots.input,\n \"min-height\": props.type === \"textarea\" && !props.autosize\n }]);\n if (slots.input) {\n return _createVNode(\"div\", {\n \"class\": controlClass,\n \"onClick\": onClickInput\n }, [slots.input()]);\n }\n const inputAttrs = {\n id: getInputId(),\n ref: inputRef,\n name: props.name,\n rows: props.rows !== void 0 ? +props.rows : void 0,\n class: controlClass,\n value: props.modelValue,\n disabled: getProp(\"disabled\"),\n readonly: getProp(\"readonly\"),\n autofocus: props.autofocus,\n placeholder: props.placeholder,\n autocomplete: props.autocomplete,\n \"aria-labelledby\": props.label ? `${id}-label` : void 0,\n onBlur,\n onFocus,\n onInput,\n onClick: onClickInput,\n onChange: endComposing,\n onKeypress,\n onCompositionend: endComposing,\n onCompositionstart: startComposing\n };\n if (props.type === \"textarea\") {\n return _createVNode(\"textarea\", inputAttrs, null);\n }\n return _createVNode(\"input\", _mergeProps(mapInputType(props.type), inputAttrs), null);\n };\n const renderLeftIcon = () => {\n const leftIconSlot = slots[\"left-icon\"];\n if (props.leftIcon || leftIconSlot) {\n return _createVNode(\"div\", {\n \"class\": bem(\"left-icon\"),\n \"onClick\": onClickLeftIcon\n }, [leftIconSlot ? leftIconSlot() : _createVNode(Icon, {\n \"name\": props.leftIcon,\n \"classPrefix\": props.iconPrefix\n }, null)]);\n }\n };\n const renderRightIcon = () => {\n const rightIconSlot = slots[\"right-icon\"];\n if (props.rightIcon || rightIconSlot) {\n return _createVNode(\"div\", {\n \"class\": bem(\"right-icon\"),\n \"onClick\": onClickRightIcon\n }, [rightIconSlot ? rightIconSlot() : _createVNode(Icon, {\n \"name\": props.rightIcon,\n \"classPrefix\": props.iconPrefix\n }, null)]);\n }\n };\n const renderWordLimit = () => {\n if (props.showWordLimit && props.maxlength) {\n const count = getStringLength(getModelValue());\n return _createVNode(\"div\", {\n \"class\": bem(\"word-limit\")\n }, [_createVNode(\"span\", {\n \"class\": bem(\"word-num\")\n }, [count]), _createTextVNode(\"/\"), props.maxlength]);\n }\n };\n const renderMessage = () => {\n if (form && form.props.showErrorMessage === false) {\n return;\n }\n const message = props.errorMessage || state.validateMessage;\n if (message) {\n const slot = slots[\"error-message\"];\n const errorMessageAlign = getProp(\"errorMessageAlign\");\n return _createVNode(\"div\", {\n \"class\": bem(\"error-message\", errorMessageAlign)\n }, [slot ? slot({\n message\n }) : message]);\n }\n };\n const renderLabel = () => {\n const colon = getProp(\"colon\") ? \":\" : \"\";\n if (slots.label) {\n return [slots.label(), colon];\n }\n if (props.label) {\n return _createVNode(\"label\", {\n \"id\": `${id}-label`,\n \"for\": getInputId()\n }, [props.label + colon]);\n }\n };\n const renderFieldBody = () => [_createVNode(\"div\", {\n \"class\": bem(\"body\")\n }, [renderInput(), showClear.value && _createVNode(Icon, {\n \"name\": props.clearIcon,\n \"class\": bem(\"clear\"),\n \"onTouchstart\": onClear\n }, null), renderRightIcon(), slots.button && _createVNode(\"div\", {\n \"class\": bem(\"button\")\n }, [slots.button()])]), renderWordLimit(), renderMessage()];\n useExpose({\n blur,\n focus,\n validate,\n formValue,\n resetValidation\n });\n provide(CUSTOM_FIELD_INJECTION_KEY, {\n customValue,\n resetValidation,\n validateWithTrigger\n });\n watch(() => props.modelValue, () => {\n updateValue(getModelValue());\n resetValidation();\n validateWithTrigger(\"onChange\");\n nextTick(adjustTextareaSize);\n });\n onMounted(() => {\n updateValue(getModelValue(), props.formatTrigger);\n nextTick(adjustTextareaSize);\n });\n return () => {\n const disabled = getProp(\"disabled\");\n const labelAlign = getProp(\"labelAlign\");\n const Label = renderLabel();\n const LeftIcon = renderLeftIcon();\n return _createVNode(Cell, {\n \"size\": props.size,\n \"icon\": props.leftIcon,\n \"class\": bem({\n error: showError.value,\n disabled,\n [`label-${labelAlign}`]: labelAlign\n }),\n \"center\": props.center,\n \"border\": props.border,\n \"isLink\": props.isLink,\n \"clickable\": props.clickable,\n \"titleStyle\": labelStyle.value,\n \"valueClass\": bem(\"value\"),\n \"titleClass\": [bem(\"label\", [labelAlign, {\n required: props.required\n }]), props.labelClass],\n \"arrowDirection\": props.arrowDirection\n }, {\n icon: LeftIcon ? () => LeftIcon : null,\n title: Label ? () => Label : null,\n value: renderFieldBody,\n extra: slots.extra\n });\n };\n }\n});\nexport {\n stdin_default as default,\n fieldSharedProps\n};\n","import { mergeProps as _mergeProps, createVNode as _createVNode } from \"vue\";\nimport { ref, defineComponent } from \"vue\";\nimport { pick, extend, truthProp, preventDefault, makeStringProp, createNamespace } from \"../utils\";\nimport { fieldSharedProps } from \"../field/Field\";\nimport { useId } from \"../composables/use-id\";\nimport { useExpose } from \"../composables/use-expose\";\nimport { Field } from \"../field\";\nconst [name, bem, t] = createNamespace(\"search\");\nconst searchProps = extend({}, fieldSharedProps, {\n label: String,\n shape: makeStringProp(\"square\"),\n leftIcon: makeStringProp(\"search\"),\n clearable: truthProp,\n actionText: String,\n background: String,\n showAction: Boolean\n});\nvar stdin_default = defineComponent({\n name,\n props: searchProps,\n emits: [\"blur\", \"focus\", \"clear\", \"search\", \"cancel\", \"click-input\", \"click-left-icon\", \"click-right-icon\", \"update:modelValue\"],\n setup(props, {\n emit,\n slots,\n attrs\n }) {\n const id = useId();\n const filedRef = ref();\n const onCancel = () => {\n if (!slots.action) {\n emit(\"update:modelValue\", \"\");\n emit(\"cancel\");\n }\n };\n const onKeypress = (event) => {\n const ENTER_CODE = 13;\n if (event.keyCode === ENTER_CODE) {\n preventDefault(event);\n emit(\"search\", props.modelValue);\n }\n };\n const getInputId = () => props.id || `${id}-input`;\n const renderLabel = () => {\n if (slots.label || props.label) {\n return _createVNode(\"label\", {\n \"class\": bem(\"label\"),\n \"for\": getInputId()\n }, [slots.label ? slots.label() : props.label]);\n }\n };\n const renderAction = () => {\n if (props.showAction) {\n const text = props.actionText || t(\"cancel\");\n return _createVNode(\"div\", {\n \"class\": bem(\"action\"),\n \"role\": \"button\",\n \"tabindex\": 0,\n \"onClick\": onCancel\n }, [slots.action ? slots.action() : text]);\n }\n };\n const blur = () => {\n var _a;\n return (_a = filedRef.value) == null ? void 0 : _a.blur();\n };\n const focus = () => {\n var _a;\n return (_a = filedRef.value) == null ? void 0 : _a.focus();\n };\n const onBlur = (event) => emit(\"blur\", event);\n const onFocus = (event) => emit(\"focus\", event);\n const onClear = (event) => emit(\"clear\", event);\n const onClickInput = (event) => emit(\"click-input\", event);\n const onClickLeftIcon = (event) => emit(\"click-left-icon\", event);\n const onClickRightIcon = (event) => emit(\"click-right-icon\", event);\n const fieldPropNames = Object.keys(fieldSharedProps);\n const renderField = () => {\n const fieldAttrs = extend({}, attrs, pick(props, fieldPropNames), {\n id: getInputId()\n });\n const onInput = (value) => emit(\"update:modelValue\", value);\n return _createVNode(Field, _mergeProps({\n \"ref\": filedRef,\n \"type\": \"search\",\n \"class\": bem(\"field\"),\n \"border\": false,\n \"onBlur\": onBlur,\n \"onFocus\": onFocus,\n \"onClear\": onClear,\n \"onKeypress\": onKeypress,\n \"onClick-input\": onClickInput,\n \"onClick-left-icon\": onClickLeftIcon,\n \"onClick-right-icon\": onClickRightIcon,\n \"onUpdate:modelValue\": onInput\n }, fieldAttrs), pick(slots, [\"left-icon\", \"right-icon\"]));\n };\n useExpose({\n focus,\n blur\n });\n return () => {\n var _a;\n return _createVNode(\"div\", {\n \"class\": bem({\n \"show-action\": props.showAction\n }),\n \"style\": {\n background: props.background\n }\n }, [(_a = slots.left) == null ? void 0 : _a.call(slots), _createVNode(\"div\", {\n \"class\": bem(\"content\", props.shape)\n }, [renderLabel(), renderField()]), renderAction()]);\n };\n }\n});\nexport {\n stdin_default as default\n};\n","import { withInstall } from \"../utils\";\nimport _Search from \"./Search\";\nconst Search = withInstall(_Search);\nvar stdin_default = Search;\nexport {\n Search,\n stdin_default as default\n};\n"],"sourceRoot":""}
|