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

[t-tagInput] 在有@submit的表单中回车会触发表单提交 #963

Closed
ql2023 opened this issue Jun 7, 2022 · 3 comments
Closed

[t-tagInput] 在有@submit的表单中回车会触发表单提交 #963

ql2023 opened this issue Jun 7, 2022 · 3 comments
Labels
to be published fixed, not be published

Comments

@ql2023
Copy link

ql2023 commented Jun 7, 2022

tdesign-vue 版本

0.41.7

重现链接

https://codesandbox.io/s/tdesign-vue-demo-forked-bio1p9?file=/src/demo.vue

重现步骤

<template>
  <div style="width: 350px; padding: 50px">
    <t-form
      ref="form"
      :data="formData"
      @reset="onReset"
      @submit="onSubmit"
      :colon="true"
      :labelWidth="0"
    >
      <t-form-item name="account">
        <t-tagInput />
      </t-form-item>
      <t-form-item style="margin-left: 100px">
        <t-button theme="primary" type="submit" block>登录</t-button>
      </t-form-item>
    </t-form>
  </div>
</template>
<script>
export default {
  data() {
    return {
      formData: {},
    };
  },
  methods: {
    onReset() {
      this.$message.success("重置成功");
    },
    onSubmit({ validateResult, firstError }) {
      if (validateResult === true) {
        this.$message.success("提交成功");
      } else {
        console.log("Errors: ", validateResult);
        this.$message.warning(firstError);
      }
    },
  },
};
</script>

实际结果

image

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2022

👋 @ccfjzf2022,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@chaishi
Copy link
Collaborator

chaishi commented Jun 11, 2022

resolved in #983

待发布

@chaishi chaishi added the to be published fixed, not be published label Jun 11, 2022
@uyarn
Copy link
Collaborator

uyarn commented Jun 14, 2022

fixed in 0.42.1

@uyarn uyarn closed this as completed Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

3 participants