Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lineStyle 新增适配max-height min-height 以及 单/复选框新增颜色样式 #1592

Open
4 tasks done
JactyChan opened this issue Jan 25, 2024 · 1 comment
Open
4 tasks done
Labels
feature 功能请求 Feature Request

Comments

@JactyChan
Copy link

议题条件

  • 我确认已查看官方使用文档:https://layui.dev ,但没有找到相关解决方案。
  • 我确认已在 Issues 中搜索过类似的问题,但没有找到相关解决方案。
  • 我已仔细阅读: 🍀 Layui Issue 贡献指南

议题类型

功能请求

使用版本

v2.9.6

问题描述

2.8更新至2.9后,lineStyle 对单元格 max-height 不生效,查看源码后,发现只适配了height 属性,当不提供height 属性时,cellMaxHeight 被替换成了none,导致行自适应高度不生效。需设置成lineStyle: 'height: 200px; height: auto;' 才生效。
另外,希望单选框、复选框新增颜色样式。

业务代码

// 计算单元格最大高度
      layui.each(rules, function(i, rule) {
        rule = rule.split(':');
        if (rule[0] === 'height') {
          var val = parseFloat(rule[1]);
          if (!isNaN(val)) cellMaxHeight = (val - 1) + 'px';
          return true;
        }
      });

截图补充

No response

浏览器

Chrome 120.0.6099.225(正式版本) (64 位)

演示地址

No response

友好承诺

  • 我承诺将本着相互尊重、理解和友善的态度进行交流,共同维护 Layui 良好的社区氛围。
@sentsim
Copy link
Member

sentsim commented Jan 27, 2024

css 属性替代实现:https://layui.dev/docs/2/table/#options

@sentsim sentsim added the feature 功能请求 Feature Request label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 功能请求 Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants