EasyUI Forum

General Category => General Discussion => Topic started by: iamjxc on April 11, 2014, 05:02:35 AM



Title: 能否统一(或者简化) API 调用
Post by: iamjxc on April 11, 2014, 05:02:35 AM
在使用 easyui 时, 经常要编写这样的代码:

if (type == "combobox"){            
    dest.combobox("setValue", "");
}else if (type == "combogrid"){
    dest.combogrid("setValue", "");
}else if (type == "combotree"){
    dest.combotree("setValue", "");
}

为什么不统一 API 呢?
dest.combo("setValue", "");