{"hidden":false,"children":[{"configs":{"itemId":"module"},"expanded":true,"children":[{"configs":{"layout":"border","itemId":"viewport1"},"expanded":true,"children":[{"configs":{"itemId":"toolbar1","region":"north"},"expanded":true,"children":[{"configs":{"itemId":"newBtn","text":"添加","iconCls":"record_add_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"app.store.add({\n  name: '消息聊天',\n  icon: 'message'\n})[0].commit();\n//建议使用Wb.add(app.dataview1,{name: '消息聊天',icon: 'message'});"}},{"configs":{"itemId":"editBtn","text":"修改","iconCls":"record_edit_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"var rec = app.store.getAt(0);\nrec.set('name', '修改的项');\nrec.commit();\n//建议使用Wb.update(rec,{name:'修改的项'});\nWb.toast('第一项已经被修改');"}},{"configs":{"itemId":"delBtn","text":"删除","iconCls":"record_delete_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"var recs = app.dataview1.getSelection();\nif (recs.length)\n  app.store.remove(recs);\nelse Wb.toast('请选择至少一项。');\n//建议使用Wb.remove(app.dataview1);"}},{"configs":{"itemId":"item1","text":"-"},"expanded":false,"children":[],"type":"item"},{"configs":{"itemId":"getBtn","tooltip":"提取选择项的信息","text":"选择项","iconCls":"message_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"var recs = app.dataview1.getSelection(),\n  names = [];\nif (recs.length)\n  Wb.info('你选择了：' + Wb.pluck(recs, 'name').join('，'));\nelse\n  Wb.info('请选择至少 1 项。');"}}],"type":"toolbar"},{"configs":{"tpl":"<tpl for='.'>\n<div class='wb_item' style='width:80px;text-align:center;'>\n<img src='wb/images/icon/{icon}.png'>\n<p>{name}<\/p>\n<\/div>\n<\/tpl>","itemId":"dataview1","overItemCls":"wb_hover","itemSelector":"div.wb_item","style":"background:white;","selectedItemCls":"wb_selected","dragSelector":"true","region":"center","autoScroll":"true","multiSelect":"true"},"expanded":true,"children":[{"configs":{"itemId":"store","data":"[{\n  name: '数据库管理',\n  icon: 'db'\n}, {\n  name: '文件管理器',\n  icon: 'explorer'\n}, {\n  name: '我的消息',\n  icon: 'message'\n}, {\n  name: '音乐播放器',\n  icon: 'play'\n}, {\n  name: '应用设置',\n  icon: 'set'\n}, {\n  name: '方案配置',\n  icon: 'theme'\n}, {\n  name: '用户管理',\n  icon: 'user'\n}, {\n  name: '网络浏览器',\n  icon: 'web'\n}]","fields":"['name', 'icon']"},"expanded":false,"children":[],"type":"store"}],"type":"dataview"}],"type":"viewport"}],"type":"module"}],"roles":{"demo":1},"title":"dataview","iconCls":"","inframe":false,"pageLink":""}