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

数据表格固定栏minWidth跟width功能一样? #1818

Open
4 tasks done
ChZhg123 opened this issue Apr 22, 2024 · 4 comments
Open
4 tasks done

数据表格固定栏minWidth跟width功能一样? #1818

ChZhg123 opened this issue Apr 22, 2024 · 4 comments
Labels
enhancement 改进或增强

Comments

@ChZhg123
Copy link

议题条件

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

议题类型

疑是 BUG

使用版本

v2.9.8

问题描述

table固定栏设置最小宽度minWidth为150,实际效果是宽度固定为150,导致中英文切换按钮只显示一半

业务代码

业务代码:{fixed: 'right', align: 'center', title: '操作', minWidth: 150, toolbar: '#barDemo'}
实际效果:
.laytable-cell-1-0-15 {
    width: 150px;
}

截图补充

image
image
image

浏览器

Chrome

演示地址

No response

友好承诺

  • 我承诺将本着相互尊重、理解和友善的态度进行交流,共同维护 Layui 良好的社区氛围。
@Sight-wcg Sight-wcg added the need reproduce 需要提供最小化的重现示例 label Apr 22, 2024
Copy link

@ChZhg123 你好,请提供一个最小化的重现,以便我们为你协助排查问题。良好的重现应当包括但不仅限于:

  • 产生问题的详细步骤
  • 与问题相关的完整代码
  • 在线 Demo (推荐通过 stackblitzcodepen 创建)

详见:🍀 Layui Issue 贡献指南
延伸:👉 为什么要提供最小化重现?

@ChZhg123
Copy link
Author

@ChZhg123 你好,请提供一个最小化的重现,以便我们为你协助排查问题。良好的重现应当包括但不仅限于:

  • 产生问题的详细步骤
  • 与问题相关的完整代码
  • 在线 Demo (推荐通过 stackblitzcodepen 创建)

详见:🍀 Layui Issue 贡献指南
延伸:👉 为什么要提供最小化重现?

https://codepen.io/ChZhg123/pen/PogVNBX

@Sight-wcg
Copy link
Collaborator

目前不支持根据单元格内容的实际大小来分配宽度,只能预留好足够的宽度来解决

@Sight-wcg Sight-wcg added enhancement 改进或增强 and removed need reproduce 需要提供最小化的重现示例 labels Apr 24, 2024
@ChZhg123
Copy link
Author

目前不支持根据单元格内容的实际大小来分配宽度,只能预留好足够的宽度来解决

.laytable-cell-1-0-15 {
width: 150px;
}
就目前查看样式来说,minWidth设置的宽度是固定的,所以width和minWidth的功能是一致的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 改进或增强
Projects
None yet
Development

No branches or pull requests

2 participants