UNPKG

ideaz-element

Version:

<p align="center"> <a href="" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/logo.svg" alt="Ideaz Element" width="180" style="width: 180px;" /> </a> </p>

1 lines 1.82 kB
{"version":3,"file":"index.cjs","sources":["../../../../../packages/element/input/src/index.tsx"],"sourcesContent":["import { ElInput } from 'element-plus'\nimport { omit } from 'lodash-unified'\nimport { useInputMethods } from './hooks'\nimport { FILTER_INPUT_PROPS, INPUT_SLOTS, inputEmits, zInputProps } from './input'\n\nexport default defineComponent({\n name: 'ZInput',\n inheritAttrs: false,\n props: zInputProps,\n emits: inputEmits,\n setup: (props, { emit, slots, expose }) => {\n const { vModelVal } = useVModel(props, emit)\n const { scopedSlots } = useFormComponentSlots(props, slots, INPUT_SLOTS)\n const { focus, blur, select, clear, resizeTextarea } = useInputMethods()\n const size = useFormSize()\n const attrs = useAttrs()\n expose({ focus, blur, select, clear, resizeTextarea })\n\n return () => {\n return (\n <ElInput\n ref=\"inputRef\"\n {...omit(props, FILTER_INPUT_PROPS)}\n {...attrs}\n size={size.value}\n modelValue={vModelVal.value}\n onUpdate:modelValue={(val: string) => (vModelVal.value = val)}\n v-slots={scopedSlots.value}\n />\n )\n }\n },\n})\n"],"names":["Input","vue","name","inheritAttrs","props","emits","expose","vModelVal","useVModel","emit","scopedSlots","resizeTextarea","size","useFormSize","attrs","elementPlus","omit","input","val"],"mappings":"uiBAKAA,EAAAC,EAAA,gBAAA,CACEC,KAAAA,SACAC,aAAAA,GACAC,MAAAA,EAAAA,YACAC,MAAAA,EAAAA,oCAC8BC,OAAAA,CAAO,IAAA,OAC3BC,UAAAA,CAAU,EAAAC,EAAA,UAAAJ,EAAAK,CAAA,GACVC,YAAAA,+EAC4BC,eAAAA,uBACpCC,EAAAC,EAAA,YAAA,EACAC,EAAAb,EAAA,SAAA,EACAK,OAAAA,EAAAA,iCAAqCK,eAAAA,CAAe,CAAA,EAEpD,IACEV,EAAA,YAAAc,EAAA,QAAAd,EAAA,WAAA,CAAA,IAAA,UAAA,EAAAe,EAAAZ,EAAAa,EAAA,kBAAA,EAAAH,EAAA,iCAM+B,sBAAAI,GAAAX,EAAA,MAAAW,YAMnC,CACF,CAAA"}