Skip to content

Commit

Permalink
fix(input): 修复 Input 组件 切换 type 后不生效的问题
Browse files Browse the repository at this point in the history
修复 Input 组件 切换 type 后不生效的问题
  • Loading branch information
hi-zhaoyeqing committed Jul 11, 2022
1 parent 63b83ea commit 9846fe9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/input/useInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ export default function useInput(props: TdInputProps, expose: (exposed: Record<s
{ immediate: true },
);

watch(
() => props.type,
(v) => {
renderType.value = v;
},
{ immediate: true },
);

expose({
focus,
blur,
Expand Down

0 comments on commit 9846fe9

Please sign in to comment.