本文介绍了Combobox需要很长时间才能显示清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 在我的页面上,有超过6k的列表。 js中的代码 Ext.define('DCT.ComboField',{ 扩展:'Ext.form.ComboBox', shadow:false, typeAhead:true, forceSelection:true, queryMode:'local', valueField:'code', displayField:'display', valueNotFoundText:'', inputXType: 'dctcombofield', dctControl:true, keyDownValue:, anyMatch:true, xtype :'dctcombofield', defaultListConfig:{ loadingHeight:70, minWidth:30, maxHeight: 300, 影子:'双方' }, 显示列表需要很长时间。超过2秒。 我尝试了什么: i想要添加minLength。但是需要询问位置。解决方案 世界上没有用户会欣赏有一个组合框,里面有6k个条目!找到一种方法来限制列表中的内容,就好像魔术表现会提高一样。可以限制具有级联组合框的方法的示例(从第一个中选择类别显示第二个中的列表),第一个字母复选框,分页显示(即仅以100个块显示列表)等等 on my page, there is list of nearby than 6k. the code in jsExt.define('DCT.ComboField', { extend: 'Ext.form.ComboBox',shadow: false,typeAhead: true,forceSelection: true, queryMode: 'local', valueField: 'code', displayField: 'display', valueNotFoundText: '', inputXType: 'dctcombofield', dctControl: true,keyDownValue: "",anyMatch: true,xtype: 'dctcombofield',defaultListConfig: {loadingHeight: 70,minWidth: 30,maxHeight: 300,shadow: 'sides'},it takes long time to display list. more than 2 sec.What I have tried:i want to add minLength . but need ask the find position. 解决方案 No user in the world is going to appreciate having a combobox with 6k entries in it! Find a way to limit what is in the list and as if by magic performance will improve. Examples of ways you can limit what is there is to have cascading comboboxes (selecting a category from the first shows the list in the 2nd), First-letter checkboxes, paged display (i.e. only show the list in chunks of 100) etc etc 这篇关于Combobox需要很长时间才能显示清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-24 15:38