Commit Graph

862 Commits

Author SHA1 Message Date
sunxb
4140fbfb7a Merge remote-tracking branch 'origin/main' into main
# Conflicts:
#	src/modules/table.js
2023-01-29 14:07:00 +08:00
贤心
8bd6ac6618
Merge pull request #1195 from layui/2.x
release v2.8.0-rc.6
2023-01-29 01:41:35 +08:00
贤心
4be40bd447 发布 v2.8.0-rc.6 2023-01-29 01:39:38 +08:00
贤心
cca7f88e96
Merge pull request #1194 from layui/2.x
2.8.0-rc.6 分支合并
2023-01-29 01:36:23 +08:00
贤心
71ddfe2b57 更新 introduce 2023-01-29 01:30:21 +08:00
贤心
38a579fa38 Merge branch '2.x' of github.com:layui/layui into 2.x 2023-01-29 01:18:14 +08:00
贤心
cc0b67d27a
Merge pull request #1193 from layui/main
同步近期 PR 到 2.x 分支
2023-01-29 01:17:03 +08:00
贤心
81062fccf0 更新 version 2023-01-29 01:14:57 +08:00
贤心
dc5c965894 优化 若干组件样式 2023-01-29 01:13:11 +08:00
贤心
067a9a4c78 加强 code 代码预览组件功能 2023-01-29 01:12:39 +08:00
贤心
7be36d05c6 更新 table 示例 2023-01-29 01:12:02 +08:00
贤心
6877685754 优化 table 文件导出功能,避免打开文件后内容显示的若干异常 2023-01-29 01:10:56 +08:00
贤心
a23e7c67c5 修复 dropdown 在移动设备下点击其他元素无法关闭面板的问题 2023-01-28 22:08:22 +08:00
贤心
d37a36778b 优化 form 代码尾部细节 2023-01-28 22:07:13 +08:00
贤心
9c8a632b46 优化 table 的edit 事件,新增返回 obj.getCol() 方法 2023-01-28 22:06:38 +08:00
贤心
3c1a9a41bc 新增 table 事件返回的 obj.setRowChecked() 公共方法,用于设置当前选中行状态 2023-01-28 22:06:07 +08:00
贤心
62e6d682b4 优化 table 的单元格编辑标识 2023-01-28 22:04:44 +08:00
贤心
ea5676265f 修复 table 点击排序后导致 scrollPos:'fixed' 失效的问题 2023-01-28 22:04:04 +08:00
贤心
e68bb91b02 更新 form 示例 2023-01-25 19:08:27 +08:00
贤心
926522da29 调整 checkbox 的默认风格为 primary 风格 2023-01-25 19:07:41 +08:00
贤心
61637f260c 新增 table 的合计行模板 TOTAL_ROW 特定字段 2023-01-25 19:05:49 +08:00
sunxiaobin89
210ef42f6b
Merge branch 'layui:main' into main 2023-01-16 16:39:10 +08:00
贤心
a490402531
Merge pull request #1191 from zhoujiahua/fix_css_and_js_brotli_size_icon
更新 readme 文件中 JS 和 CSS 的 Brotli size 图标在 github 中无法显示问题。
2023-01-15 23:33:56 +08:00
贤心
7438d1f967
Merge pull request #1188 from big-dream/patch-1
增加行的上下文菜单事件
2023-01-15 23:31:12 +08:00
贤心
366968e2b1 更新 form 示例 2023-01-13 03:45:44 +08:00
贤心
a3154b6623 优化 form.render() 方法 2023-01-13 03:45:30 +08:00
贤心
a9a2b24f49 优化 输入框动态点缀 组件 2023-01-13 03:44:43 +08:00
贤心
54eab77bab 优化 all 注释格式 2023-01-13 03:42:49 +08:00
贤心
fec0f19515 新增 util.openWin() 方法 2023-01-13 03:42:12 +08:00
sunxb
676a3df878 修复表格和下拉菜单一些小问题 2023-01-12 15:24:10 +08:00
sunxb
618c62a68b 修复之前提交的修改导致排序之后点击分页切换页数的时候滚动条没有回零的问题 2023-01-10 09:38:06 +08:00
jerry.zhou
b80b1038eb 更新readme文件中JS和CSS的Brotli size图标在github中无法显示问题。 2023-01-09 18:08:35 +08:00
贤心
3a090f6c83 微调 css 中的注释 2023-01-07 22:38:06 +08:00
贤心
6e6034f100 修改 form 中部分属性的驼峰结构为一般结构 2023-01-07 22:37:24 +08:00
sunxb
21f89d1d95 table修复排序之后reloadData设置固定滚动条的情况下还是发生滚动条回零现象;新增table.refresh支持将cache信息重新渲染。 2023-01-06 17:32:10 +08:00
蒋文健
be35ed0b55
增加行的上下文菜单事件
增加行的上下文菜单事件和是否显示系统默认上下文菜单事件的配置,方便在表格行上使用`layui.dropdown`组件。
```html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>开始使用 layui</title>
  <link href="./layui/css/layui.css" rel="stylesheet">
</head>
<body>
 
<!-- 你的 HTML 代码 -->
<table id="demo" lay-filter="test"></table>
 
<script src="./layui/layui.js"></script>
<script>
layui.use(['layer', 'table', 'dropdown'], function(){
  var layer = layui.layer;
  var table = layui.table;
  
  //第一个实例
  table.render({
    elem: '#demo'
    // 不显示系统默认上下文菜单
    ,defaultContextmenu: false
    ,height: 312
    ,data: [
      {"id":10000,"username":"user-0","sex":"女","city":"城市-0","sign":"签名-0","experience":255,"logins":24,"words":82830700,"classify":"作家","score":57}
      ,{"id":10001,"username":"user-1","sex":"男","city":"城市-1","sign":"签名-1","experience":884,"logins":58,"words":64928690,"classify":"词人","score":70.5}
      ,{"id":10002,"username":"user-2","sex":"女","city":"城市-2","sign":"签名-2","experience":650,"logins":77,"words":6298078,"classify":"酱油","score":31}
      ,{"id":10003,"username":"user-3","sex":"女","city":"城市-3","sign":"签名-3","experience":362,"logins":157,"words":37117017,"classify":"诗人","score":68}
      ,{"id":10004,"username":"user-4","sex":"男","city":"城市-4","sign":"签名-4","experience":807,"logins":51,"words":76263262,"classify":"作家","score":6}
      ,{"id":10005,"username":"user-5","sex":"女","city":"城市-5","sign":"签名-5","experience":173,"logins":68,"words":60344147,"classify":"作家","score":87}
      ,{"id":10006,"username":"user-6","sex":"女","city":"城市-6","sign":"签名-6","experience":982,"logins":37,"words":57768166,"classify":"作家","score":34}
      ,{"id":10007,"username":"user-7","sex":"男","city":"城市-7","sign":"签名-7","experience":727,"logins":150,"words":82030578,"classify":"作家","score":28}
      ,{"id":10008,"username":"user-8","sex":"男","city":"城市-8","sign":"签名-8","experience":951,"logins":133,"words":16503371,"classify":"词人","score":14}
      ,{"id":10009,"username":"user-9","sex":"女","city":"城市-9","sign":"签名-9","experience":484,"logins":25,"words":86801934,"classify":"词人","score":75}
    ]
    ,page: true //开启分页
    ,limit: 2
    ,limits: [2, 5, 10]
    ,cols: [[ //表头
      {field: 'id', title: 'ID', width:80, sort: true, fixed: 'left'}
      ,{field: 'username', title: '用户名', width:80}
      ,{field: 'sex', title: '性别', width:80, sort: true}
      ,{field: 'city', title: '城市', width:80} 
      ,{field: 'sign', title: '签名', width: 177}
      ,{field: 'experience', title: '积分', width: 80, sort: true}
      ,{field: 'score', title: '评分', width: 80, sort: true}
      ,{field: 'classify', title: '职业', width: 80}
      ,{field: 'words', title: '字数', width: 135, sort: true}
    ]]
  });
  table.on('contextmenu(test)', function(obj){
    // 下拉菜单组件
    layui.dropdown.render({
      show: true
      ,trigger: 'contextmenu'
      ,data: [
        {title: '操作1', id: 'event1'},
        {title: '操作2', id: 'event2'}
      ],
      click(data, othis) {
        console.log(data)
      }
    });
    });
});
</script> 
</body>
</html>
```
2023-01-04 16:08:54 +08:00
贤心
e4df5b8688 修改 lay 注释标题 2023-01-03 02:00:39 +08:00
贤心
493cd53e7c 优化 text 文本样式 2023-01-03 02:00:02 +08:00
贤心
1d1ed086f1 优化 table 局部 UI 2023-01-03 01:58:43 +08:00
贤心
753dd49e87 新增 scollbar 强制隐藏样式 2023-01-03 01:58:03 +08:00
贤心
1ff6cd423c 增加 font 更多内置字体大小 2022-12-19 23:00:20 +08:00
贤心
9b5a6231c8 优化 table 导出的数据量很大时可能存在的卡顿问题 2022-12-16 17:19:50 +08:00
贤心
f20875a2ba
Merge pull request #1187 from layui/2.x
release v2.8.0-rc.5
2022-12-12 23:12:41 +08:00
贤心
b8da0b0a2f 发布 v2.8.0-rc.5 2022-12-12 23:10:55 +08:00
贤心
e415579191 优化 laydate 日期值预览的颜色渐变 2022-12-12 23:09:01 +08:00
贤心
a14d88d754 更新 version 2022-12-12 23:08:55 +08:00
贤心
04ada93093
Merge pull request #1186 from layui/main
修复 v2.8.0-rc.3 升级导致的问题
2022-12-12 22:53:53 +08:00
贤心
69fee7146d
Merge pull request #1185 from sunxiaobin89/main
laydate修复bug以及调整预览文本颜色变化的细节效果
2022-12-12 22:52:17 +08:00
sunxiaobin89
a4c7269bad laydate调整预览的逻辑,让从无到有内容变的时候文本颜色不要有一个变化过程,只有在原先有文本然后换成另外的内容的时候才会有变化过程让用户对于变化更有感 2022-12-12 14:15:47 +08:00
sunxiaobin89
b2766cae72 laydate调整预览的逻辑,让从无到有内容变的时候文本颜色不要有一个变化过程,只有在原先有文本然后换成另外的内容的时候才会有变化过程让用户对于变化更有感 2022-12-12 12:48:41 +08:00