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

solt内渲染formItem的组件,放在modal中造成浏览器卡死 #1271

Closed
1 task
wzy4072 opened this issue Oct 12, 2019 · 4 comments
Closed
1 task

solt内渲染formItem的组件,放在modal中造成浏览器卡死 #1271

wzy4072 opened this issue Oct 12, 2019 · 4 comments
Labels

Comments

@wzy4072
Copy link

wzy4072 commented Oct 12, 2019

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

Version

1.3.9

Environment

PC: window7; chrome:76.0.3809.100(正式版本) (64 位),vue:2.6.10

Reproduction link

https://github.com/wzy4072/antdDemo

Steps to reproduce

step 1

// test.vue

<template>
<div>
<a-button @click="validate">validate</a-button>

<a-form :form="form">

<a-form-item>
<a-input placeholder="formIpt" v-decorator="['formIpt', {rules: [{ required: true}] }]" />
</a-form-item>

<slot name="header"></slot>

</a-form>
</div>
</template>

// js ...
// a-form内写插槽

step 2

// testModal.vue

<template>
<a-modal :width="1200" :visible="visible">
<test v-for="(v,idx) in 3" :key="idx">
<template v-slot:header>
<a-form-item>
<a-input
placeholder="modalItp"
v-decorator="['modalItp', {rules: [{ required: true}] }]"
/>
</a-form-item>
</template>
</test>
</a-modal>
</template>

// v-for 使用 test组件

step 3

// app.vue

<template>
<div>
<a-button @click="testmodal">test</a-button>
<test-modal ref="testmodal"></test-modal>
</div>
</template>

// 打开test-modal 输入或者验证表单 浏览器直接卡死

What is expected?

表单能正输入/验证

What is actually happening?

验证或者输入动作,导致浏览器该标签页卡死

@fengyaogit123
Copy link

我也遇到这个问题了

@wzy4072
Copy link
Author

wzy4072 commented Oct 16, 2019

我也遇到这个问题了

我换了一个方案,已经解决了我目前的业务需要。
方案思路:modal组件内只要一个form,子组件内部直接使用form-item。

@tangjinzhou
Copy link
Member

1.4.0 已经解决

@github-actions
Copy link

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 Oct 16, 2020
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

3 participants