移动端配置多个列菜单项
C#
//列菜单集合
JSONArray columnMenus = new JSONArray();
//列菜单项:排序
var menu = new JSONObject();
menu.Put("id", "date_sort");
menu.Put("name", "默认排序");
//排序选项1
var columnMenuOptions = new JSONArray();
var option = new JSONObject();
option.Put("id", "desc");
option.Put("name", "降序");
option.Put("selected", true); //默认降序
columnMenuOptions.add(option);
//排序选项2
option = new JSONObject();
option.Put("id", "asc");
option.Put("name", "升序");
option.Put("selected", true);
columnMenuOptions.add(option);
//添加到所属列菜单
menu.add(columnMenuOptions);
//将排序添加到列菜单集合
columnMenus.add(menu);
this.View.GetControl("FList").SetCustomPropertyValue("columnMenus", columnMenus)
python
columnMenus =[{"id":"date_sort", "name": "默认排序", "options": [{"id":"desc", "name": "降序", "selected": True}, {"id":"asc", "name": "升序", "selected": True}]}];
this.View.GetControl("FList").SetCustomPropertyValue("columnMenus", columnMenus);