Skip to content

Commit

Permalink
revert(textarea): 修复autosize类型错误
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohe0601 committed Mar 4, 2024
1 parent 745a19c commit bc02ceb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/nutui/components/textarea/textarea.ts
@@ -1,9 +1,9 @@
import type { ExtractPropTypes, PropType } from 'vue'
import type { TextareaOnBlurEvent, TextareaOnConfirmEvent, TextareaOnFocusEvent, TextareaOnInputEvent } from '@uni-helper/uni-app-types'
import { commonProps, isString, makeNumberProp, makeObjectProp, makeStringProp, truthProp } from '../_utils'
import { commonProps, isString, makeNumberProp, makeStringProp, truthProp } from '../_utils'
import { BLUR_EVENT, CHANGE_EVENT, CONFIRM_EVENT, FOCUS_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from '../_constants'
import type { InputAlignType } from '../input'
import type { TextareaAdjustKeyboardTo, TextareaAutosizeObject, TextareaConfirmType } from './type'
import type { TextareaAdjustKeyboardTo, TextareaConfirmType } from './type'

export const textareaProps = {
...commonProps,
Expand Down Expand Up @@ -50,7 +50,10 @@ export const textareaProps = {
/**
* @description 是否自适应内容高度,也可传入对象
*/
autosize: makeObjectProp<boolean | TextareaAutosizeObject>(false),
autosize: {
type: [Boolean, Object],
default: false,
},
/**
* @description 自动获取焦点
*/
Expand Down

0 comments on commit bc02ceb

Please sign in to comment.