{"hidden":false,"children":[{"configs":{"serverScript":"//把当前用户是否可以对用户删除和角色更新模块进行访问的布尔值设置到attribute属性，以便在客户端使用该变量\n//userDelete和roleUpdate变量分别在userDeleteButton.hidden属性和viewport1.afterrender事件中使用\napp.set({\n  userDelete: app.perm('m?xwl=admin/user/delete'),\n  roleUpdate: app.perm('m?xwl=admin/role/update')\n});","itemId":"module"},"expanded":true,"children":[{"configs":{"layout":"border","itemId":"viewport1"},"expanded":true,"children":[{"configs":{"itemId":"toolbar1","region":"north"},"expanded":true,"children":[{"configs":{"itemId":"bindModuleButton","bindModule":"m?xwl=admin/user/delete","tooltip":"如果当前用户不能访问bindModule属性指定的模块则按钮不可见","text":"绑定模块"},"expanded":false,"children":[],"type":"item"},{"configs":{"itemId":"userDeleteButton","hidden":"!{#userDelete#}","tooltip":"如果当前用户不能访问userDelete模块则按钮不可见","text":"属性控制隐藏"},"expanded":false,"children":[],"type":"item"},{"configs":{"itemId":"roleUpdateButton","tooltip":"如果当前用户不能访问roleUpdate模块使用代码控制按钮禁用","text":"代码控制禁用"},"expanded":false,"children":[],"type":"item"}],"type":"toolbar"},{"configs":{"itemId":"panel1","region":"center"},"expanded":false,"children":[],"type":"panel"}],"type":"viewport","events":{"afterrender":"var roleUpdate = Wb.parseBool('{#roleUpdate#}');\napp.roleUpdateButton.setDisabled(!roleUpdate);"}}],"type":"module"}],"roles":{"demo":1},"title":"界面绑定模块","iconCls":"","inframe":false,"pageLink":""}