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

style: date picker panel row main axis between #565

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

yangxiaolang
Copy link
Collaborator

@yangxiaolang yangxiaolang commented Jun 12, 2024

  1. 增加了基本 date-picker-panel header 区 年月 之间的分隔符, 通过一个 div.separator 的 margin: 0 use-var(spacing-s) 填充, 当 年和月 都不存在 suffix 的时候, div 内部会显示一个 /

    之所以使用 div.separator 去填充间隙而不是通过翻译文本自己设置分隔符, 是因为这样做 分隔符文本 也会被当成按钮的一部分显示 hover 样式以及响应点击事件

  1. 原本的充当按钮作用的 <a> 替换为正常的 button[aui-button="text"], 并且 header 区增加 flex-wrap: warp

    使用 button 后 年/月 区块内部不会单独折行(符合预期),而是整行去折.但是仍会有单个区块过长的溢出问题, 要处理的话就要取消 tooltip-info 的 max-width: 400px , 但是大部分场景应该不需要

TODO:

  1. 不同语言地区的 年月 顺序不同,可以参照 antd 使用的 rc-picker 的实现
    const monthYearNodes = locale.monthBeforeYear ? [monthNode, yearNode] : [yearNode, monthNode];
  2. aui-range-picker 也会遇到类似 header 过长的溢出问题,需要之后一起解决

Copy link

changeset-bot bot commented Jun 12, 2024

🦋 Changeset detected

Latest commit: 65c6c0a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@alauda/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@yangxiaolang yangxiaolang requested review from zangguodong and removed request for zangguodong June 12, 2024 10:34
@yangxiaolang yangxiaolang merged commit 98c3372 into master Jun 13, 2024
8 checks passed
@yangxiaolang yangxiaolang deleted the style/date-picker-panel-row-main-axis-between branch June 13, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants