• easyui easyui-combotree 模糊查询


    <input id="select" type="text" class="easyui-combotree" data-options=" 
    	    url: 'url地址',
    	    method:'get',
    	    checkbox:true,
    	    lines:true,
    	    multiple:true,
    	    panelHeight:150,
                panelWidth:250,
    	    clickNodeForSpan:true, 
    	    
                editable : true,
                onLoadSuccess: function (row, data) {
                        //$('this').combotree('tree').tree("collapseAll");     
                         $('this').combotree('tree').tree("expandAll");  //这个必须写,否则查询不正确    
                    }
                keyHandler : {
                    query : function(q) {
    		    var t = $(this).combotree('tree');  
    		    var nodes = t.tree('getChildren');  
    		    for(var i=0; i<nodes.length; i++){  
    		        var node = nodes[i];  
    		        if (node.text.indexOf(q) >= 0){  
                                $(node.target).show();  
    		        } else {  
                                $(node.target).hide();  
    		        }  
    		        var opts = $(this).combotree('options');  
    		        if (!opts.hasSetEvents){  
                            opts.hasSetEvents = true;  
                            var onShowPanel = opts.onShowPanel;  
                            opts.onShowPanel = function(){  
                            var nodes = t.tree('getChildren');  
                            for(var i=0; i<nodes.length; i++){  
                                $(nodes[i].target).show();  
                            }  
                            onShowPanel.call(this);  
                        };  
                        $(this).combo('options').onShowPanel = opts.onShowPanel;  
    	        }  
    	        }
    	   }
         " />
    
  • 相关阅读:
    mysql pt-osc
    mysql表分区,mysql分区表
    mysql5.5无法启动,Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 问题的解决方法
    mysql压缩表,mysql行压缩与页压缩
    mybase7破解
    (1.5)es集群部署运维【最佳实践】
    kafka基础概念
    midway日志体系
    midwayjs 使用egg-mysql
    midway mysql egg-mysql 配置 基础操作 增删改查
  • 原文地址:https://www.cnblogs.com/zwgblogs/p/12097940.html
Copyright © 2020-2023  润新知