Skip to content

Commit

Permalink
fix: input showWordLimit parameter observer inactive
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoleyaotouoO committed Mar 24, 2022
1 parent c5cfe31 commit f6853c7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/components/src/input/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ import { connect, mapProps, mapReadPretty, h } from '@formily/vue'
import { defineComponent } from '@vue/composition-api'
import type { Field as VanInputProps } from 'vant'
import { Field as VanInput } from 'vant'
import { transformComponent } from '../__builtins__/shared'
import { resolveComponent } from '../__builtins__/shared'
import { stylePrefix } from '../__builtins__/configs'
import { PreviewText } from '../preview-text'

export type InputProps = VanInputProps

const TransformVanInput = transformComponent<InputProps>(VanInput, {
change: 'input',
})

export const BaseInput = observer(
defineComponent({
name: 'FBaseInput',
Expand All @@ -19,7 +24,7 @@ export const BaseInput = observer(
setup(props, { attrs, slots, listeners }) {
return () => {
return h(
VanInput,
TransformVanInput,
{
class: { [`${stylePrefix}-input-asterisk`]: attrs.asterisk },
attrs: { ...attrs, ...props },
Expand Down

0 comments on commit f6853c7

Please sign in to comment.