代码拉取完成,页面将自动刷新
{"pages":[{"title":"About","permalink":"http://blog.ionic.fun/about/index.html","text":"联系方式 GitHub:zerox-v Mail:zero@ionic.fun"}],"posts":[{"title":"LayUI Table 添加禁止选中","date":"2019-05-22T06:16:35.000Z","permalink":"http://blog.ionic.fun/2019/05/22/LayUI-Table-添加禁止选中/","text":"LayUI这几年比较流行,里面的Table组件也比较强大,但是前面的CheckBox没有禁止选中功能,今天就来试试,看看能不能给添加一个禁止选中功能。 Fork LayUI源码 LayUI项目地址 Clone到本地 找到src里面lay下面的modules文件夹里面的table.js 添加字段标记 参照这里我们也添加一个”IS_DISABLE”的标记 添加完如下 12345config: { checkName: 'LAY_CHECKED', //是否选中状态的字段名 indexName: 'LAY_TABLE_INDEX', //下标索引名 disableName: 'LAY_DISABLED' //是否禁用 } //全局配置项 修改代码逻辑 找到区域模板里面的 lay-filter="layTableAllChoose" 在后面添加如下代码 1{{# if(item2[d.data.disableName]){ }} disabled {{# }; }} 添加列渲染 修改选择逻辑 详细修改请点这里 测试 在数据里面添加 "LAY_DISABLED": true, 来看看效果 源码 点这里看源码","categories":[{"name":"LayUI","slug":"LayUI","permalink":"http://blog.ionic.fun/categories/LayUI/"}],"tags":[{"name":"LayUI","slug":"LayUI","permalink":"http://blog.ionic.fun/tags/LayUI/"},{"name":"Table","slug":"Table","permalink":"http://blog.ionic.fun/tags/Table/"}]},{"title":"Hello World","date":"2019-05-20T08:59:28.404Z","permalink":"http://blog.ionic.fun/2019/05/20/hello-world/","text":"Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new \"My New Post\" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment","categories":[{"name":"Hello","slug":"Hello","permalink":"http://blog.ionic.fun/categories/Hello/"}],"tags":[]}]}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。