/
githubmirror
/
taro
Обзор
Документация
Войти
/
githubmirror
/
taro
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/taro-components-library-react/src/component-lib/input.ts
21 строка
449 B
Zakary
feat(components): 同步 react 适配器中 input 组件特性
26 окт 2022, 11:54
26 окт 2022, 11:54
d382b52
Код
Авторство
О чём код?
import React from 'react' import reactifyWc from './reactify-wc' const Input = reactifyWc('taro-input-core') const h = React.createElement // eslint-disable-next-line react/display-name export default React.forwardRef((props, ref) => { const args: Record<string, unknown> = { ...props } if (args.hasOwnProperty('focus')) { args.autoFocus = Boolean(args.focus) delete args.focus } return ( h(Input, { ...args, ref }) ) })