fix: 处理表单双向绑定失效问题
This commit is contained in:
@@ -66,7 +66,14 @@ export default defineComponent({
|
||||
>
|
||||
<Form ref={formRef} layout="vertical" model={formData} class={styles.form} requiredMark>
|
||||
<Form.Item label="新密码" name="newPassword" rules={newPasswordRules}>
|
||||
<Input.Password placeholder="至少8位,含字母+数字" allowClear />
|
||||
<Input.Password
|
||||
value={formData.newPassword}
|
||||
onUpdate:value={(val: any) => {
|
||||
formData.newPassword = val;
|
||||
}}
|
||||
placeholder="至少8位,含字母+数字"
|
||||
allowClear
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
@@ -74,7 +81,14 @@ export default defineComponent({
|
||||
name="confirmPassword"
|
||||
rules={confirmNewPasswordRules(() => formData.newPassword)}
|
||||
>
|
||||
<Input.Password placeholder="再次输入新密码" allowClear />
|
||||
<Input.Password
|
||||
value={formData.confirmPassword}
|
||||
onUpdate:value={(val: any) => {
|
||||
formData.confirmPassword = val;
|
||||
}}
|
||||
placeholder="再次输入新密码"
|
||||
allowClear
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
<div class={styles.tip}>{TIPS_TEXT}</div>
|
||||
|
||||
Reference in New Issue
Block a user