layui-select-multiple icon indicating copy to clipboard operation
layui-select-multiple copied to clipboard

多选时用layui.form.render("select")渲染下拉框的选项显示不出来

Open HAY0526 opened this issue 4 years ago • 2 comments

多选时用layui.form.render("select")渲染下拉框的选项显示不出来

HAY0526 avatar Jun 23 '20 09:06 HAY0526

相同的问题,只有勾选全选框之后才会出来,请问题主有没有找到别的方法

gaofeicm avatar Sep 29 '20 02:09 gaofeicm

用到了这个组件,偶然遇到了这个问题,也解决了。解决的思路是先让页面结构渲染,判断完成后再执行form.render('select'); 例如,用promise. return new Promise(function(resolve, reject) { //渲染select }) .then(function(){ form.render('select'); });

chenbf0713 avatar Mar 28 '23 09:03 chenbf0713