Skip to content

Commit f6853c7

Browse files
committed
fix: input showWordLimit parameter observer inactive
1 parent c5cfe31 commit f6853c7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/components/src/input/index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@ import { connect, mapProps, mapReadPretty, h } from '@formily/vue'
44
import { defineComponent } from '@vue/composition-api'
55
import type { Field as VanInputProps } from 'vant'
66
import { Field as VanInput } from 'vant'
7+
import { transformComponent } from '../__builtins__/shared'
78
import { resolveComponent } from '../__builtins__/shared'
89
import { stylePrefix } from '../__builtins__/configs'
910
import { PreviewText } from '../preview-text'
1011

1112
export type InputProps = VanInputProps
1213

14+
const TransformVanInput = transformComponent<InputProps>(VanInput, {
15+
change: 'input',
16+
})
17+
1318
export const BaseInput = observer(
1419
defineComponent({
1520
name: 'FBaseInput',
@@ -19,7 +24,7 @@ export const BaseInput = observer(
1924
setup(props, { attrs, slots, listeners }) {
2025
return () => {
2126
return h(
22-
VanInput,
27+
TransformVanInput,
2328
{
2429
class: { [`${stylePrefix}-input-asterisk`]: attrs.asterisk },
2530
attrs: { ...attrs, ...props },

0 commit comments

Comments
 (0)