Commit Graph

521 Commits (78609d97458dc54cef909d03654f7c5be02c2015)

Author SHA1 Message Date
贤心 105540efb8 新增 laydate 的 `onConfirm/onNow/onClear` 回调 2023-02-16 09:23:31 +08:00
贤心 10c55087c2 新增 `layer.closeLast(type)` 方法 2023-02-16 08:31:50 +08:00
贤心 08dce68a70 优化 `select` 开启搜索时,在清空搜索框文本后重置选中项 2023-02-16 00:29:01 +08:00
贤心 efbd528efe 优化 select 的搜索框输入事件 2023-02-15 20:45:36 +08:00
贤心 005586b1f0 优化 table 合计行的导出功能 2023-02-15 20:25:32 +08:00
贤心 68e334db78 优化 table 的 `update` 方法,以解除对非原始字段的限制 2023-02-15 20:14:31 +08:00
贤心 d4fb5d05b0 优化 checkbox 的 `title` 对 `lay-text` 属性的兼容 2023-02-14 15:56:27 +08:00
贤心 c6c6adb09b 更新 version 2023-02-14 00:44:03 +08:00
贤心 b9119c10c4 修复 colorpicker 因上个版本 `pr` 导致的选择候选色值异常问题 2023-02-14 00:42:42 +08:00
贤心 a622ca5444 更新 version 2023-02-13 13:19:40 +08:00
贤心 a47b9eae2e Merge branch '2.x' of github.com:layui/layui into 2.x 2023-02-13 13:12:13 +08:00
贤心 2973f04833 优化 table 偶数行及触发事件时的背景色 2023-02-13 13:05:56 +08:00
贤心 edad983efa 微调 部分浅色主题色值 2023-02-13 12:51:51 +08:00
mek 3361b3238e 代码优化 2023-02-09 11:02:05 +08:00
贤心 00b1f0683a 新增 `table.setRowChecked(opts)` 方法 2023-02-07 08:57:59 +08:00
贤心 51b48c8c2b 优化 checkbox 的 skin 属性相关判断 2023-02-07 08:56:37 +08:00
贤心 8c885010c7 更新 code 的字体类型顺序 2023-02-04 17:28:19 +08:00
贤心 7214a9a6cc 优化 checkbox 的 `title` 以向下兼容 2023-02-03 18:21:16 +08:00
sunxb d3f112160c 调整复选框默认效果跟2.8.0-rc.6一致,微调复选skin的值的细节处理 2023-01-31 10:55:18 +08:00
sunxb f267138550 修复表单和日期选择的一些小问题 2023-01-30 17:58:48 +08:00
贤心 38a579fa38 Merge branch '2.x' of github.com:layui/layui into 2.x 2023-01-29 01:18:14 +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
贤心 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
贤心 926522da29 调整 checkbox 的默认风格为 `primary` 风格 2023-01-25 19:07:41 +08:00
贤心 61637f260c 新增 table 的合计行模板 `TOTAL_ROW` 特定字段 2023-01-25 19:05:49 +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
贤心 3a090f6c83 微调 css 中的注释 2023-01-07 22:38:06 +08:00
贤心 6e6034f100 修改 form 中部分属性的驼峰结构为一般结构 2023-01-07 22:37:24 +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
贤心 e415579191 优化 laydate 日期值预览的颜色渐变 2022-12-12 23:09:01 +08:00
贤心 a14d88d754 更新 version 2022-12-12 23:08:55 +08:00
sunxiaobin89 a4c7269bad laydate调整预览的逻辑,让从无到有内容变的时候文本颜色不要有一个变化过程,只有在原先有文本然后换成另外的内容的时候才会有变化过程让用户对于变化更有感 2022-12-12 14:15:47 +08:00
sunxiaobin89 b2766cae72 laydate调整预览的逻辑,让从无到有内容变的时候文本颜色不要有一个变化过程,只有在原先有文本然后换成另外的内容的时候才会有变化过程让用户对于变化更有感 2022-12-12 12:48:41 +08:00