1 Star 0 Fork 0

TaroAltman / zerox-v.github.io

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
content.json 2.18 KB
一键复制 编辑 原始数据 按行查看 历史
TaroAltman 提交于 2019-05-22 17:35 . Site updated: 2019-05-22 17:35:55
{"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":[]}]}
HTML
1
https://gitee.com/zhangxuanzhi/zerox-v.github.io.git
git@gitee.com:zhangxuanzhi/zerox-v.github.io.git
zhangxuanzhi
zerox-v.github.io
zerox-v.github.io
master

搜索帮助