Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The input-number component change event is not monitored by the form component to trigger rules verification #4831

Closed
1 task
menkeydyvh opened this issue Nov 1, 2021 · 1 comment
Labels

Comments

@menkeydyvh
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.0.0-alpha.7

Steps to reproduce

---简易的代码块

<template>
<div>
    <a-form :model="model" :rules="rules">
        <a-form-item label="Name" name="name">
            <a-input v-model:value="model.name" />
        </a-form-item>
        <a-form-item label="Age" name="age">
             <a-input-number v-model:value="model.age" />
        </a-form-item>
       <a-form-item>
           <a-button type="primary" html-type="submit">Submit</a-button>
        </a-form-item>
    </a-form>
</div>
</template>
<script>
import { defineComponent, ref } from "vue";
export default defineComponent({
    setup() {
        const model = ref({
            name: null,
            age: null,
         });
        const rules = ref({
            name: [{ required: true, message: "必须填写名称", trigger: "change" }],
            age: [{ required: true, message: "必须填写年龄", trigger: "change" }],
        });
        return {
            model,
            rules,
        };
    },
});
</script>

---操作步骤
操作Name输入框,输入后在删除内容会提示‘必须填写名称’
操作Age输入框,输入后再删除内容无触发验证

What is expected?

input-number的change事件未触发验证

What is actually happening?

如上描述

@github-actions github-actions bot changed the title input-number组件change事件未被form组件监听触发rules校验 The input-number component change event is not monitored by the form component to trigger rules verification Nov 1, 2021
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant