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

使用重新渲染后,点击下拉框会 #93

Open
TanLinRu opened this issue Jan 17, 2020 · 7 comments
Open

使用重新渲染后,点击下拉框会 #93

TanLinRu opened this issue Jan 17, 2020 · 7 comments

Comments

@TanLinRu
Copy link

$('#personal-hope-form')[0].reset();
layui.form.render();
category.reload({});

@TanLinRu
Copy link
Author

点击下拉框会闪退

@hsiangleev
Copy link
Owner

@TanLinRu 是cascader组件吗,代码是最新的吗

@wu1601
Copy link

wu1601 commented Jan 17, 2020

@hsiangleev 确实出现这个问题了,我这边是在layui的弹窗里。
弹窗分两部分,上半部分是数据,下半部分是表格,输入数据后,点击添加,回进入下半部分的表格。这时我就需要重新渲染级联,保证下次添加数据时,下一个数据不会使用上一个数据的信息。
但是reload后,点击闪现……
代码是最新的。

@hsiangleev
Copy link
Owner

@TanLinRu 我这边测试reload确实没有出现这个情况,你可以把这个模块拿出来,单独测试一下这个模块的reload,看会不会出现

@wu1601
Copy link

wu1601 commented Jan 19, 2020

@hsiangleev 原来的问题解决了,是因为我这边写的不对。
但如果一个页面上有多个级联,使用reload方法就是:
A.reload({});
B.reload({});
C.reload({});
能被重新渲染的永远只有最后渲染的那个。C之前的都会变为原有样式。

@hsiangleev
Copy link
Owner

@TanLinRu 好像确实有点问题,我改了一下,应该可以了

@wu1601
Copy link

wu1601 commented Jan 19, 2020

@hsiangleev 成功了,多谢,嘿嘿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants