简体   繁体   English

手机屏幕上的Ng-Zorro nz-range-picker溢出

[英]Ng-Zorro nz-range-picker overflow on mobile screen

I'm using ng-zorro-antd 7.0.0 rc3 with angular 7.2.4. 我正在使用角度为7.2.4的ng-zorro-antd 7.0.0 rc3。

My problem is: I can not scroll horizontal while using the nz-range-picker on mobile browser, it seem the element was too large with the screen, but the parent of nz-range-picker has "over-flow-x: hidden", or "over-flow: hidden" attribute. 我的问题是:在移动浏览器上使用nz-range-picker时,我无法水平滚动,似乎该元素在屏幕上太大了,但是nz-range-picker的父级有“ over-flow-x:隐藏”或“溢出:隐藏”属性。

But i can't find what element to fix this. 但是我找不到解决此问题的元素。

I went to the documents of Ng-Zorro and it seem that they have had this problem too: https://ng.ant.design/components/date-picker/en#header 我去看了Ng-Zorro的文档,似乎他们也遇到了这个问题: https : //ng.ant.design/components/date-picker/en#header

I also seen the react version of Ant Design and it doesn't have this problem: https://ant.design/components/date-picker/#header 我还看到了Ant Design的React版本,它没有这个问题: https : //ant.design/components/date-picker/#header

Can any one help me with this? 谁能帮我这个?

Range picker cannot scroll when over-flow-x on mobile screen 移动屏幕上的x溢出时,范围选择器无法滚动

Thank to AlokeT, I have resolved this problem. 感谢AlokeT,我已经解决了这个问题。

I make the picker display vertical when responsive to mobile. 当响应移动设备时,我使选择器显示为垂直。

Add this to src/styles.less (or css | scss) 将此添加到src / styles.less(或css | scss)

// @screen-sm-min = 576px, or you can choose another break point
@media only screen and (max-width: @screen-sm-min + 100px) {
  .ant-calendar-range {
    width: 276px;
    .ant-calendar-range-part {
      width: 100%;
    }
    .ant-calendar-range-right {
      float: left;
      border-top: 1px solid #e8e8e8;
    }
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM