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

安卓端(手机/平板)无法触发mdui-col-md-x(及以上) #165

Closed
1 of 3 tasks
Student414 opened this issue Jul 30, 2018 · 5 comments
Closed
1 of 3 tasks

安卓端(手机/平板)无法触发mdui-col-md-x(及以上) #165

Student414 opened this issue Jul 30, 2018 · 5 comments

Comments

@Student414
Copy link

Student414 commented Jul 30, 2018

  • 在提交 issue 之前,请搜索相关内容是否已被提出。
  • 请确保你使用的是最新版的 mdui,当前最新版为 0.4.1

这是一个(可多选)

  • bug 反馈
  • 功能建议
  • 新组件或新特性

  • 使用平台:Android
  • 浏览器及版本:QQ浏览器,UC浏览器,Chrome浏览器,Via浏览器

如何操作

在安卓端打开在电脑端编写测试运行正常的页面,任意切换横竖屏以及分辨率,始终无法触发mdui-col-xx-x变换

预期结果

预期与PC端响应式结果一致

实际结果

并无响应式动作发生~~~

@zdhxiong
Copy link
Owner

mdui-col-md-x 需要 1024px 以上才能生效,手机/平板上当然不能生效。

@Student414
Copy link
Author

@zdhxiong 已经换成2k屏手机而且横屏了,依然无法触发。测试了一下,sm好像也触发不了了。现在怀疑是手机浏览器渲染策略的问题。

@zdhxiong
Copy link
Owner

这跟手机分辨率无关,你可以用 window.innerWidth 获取宽度,这才是 CSS 中使用的宽度。

@Student414
Copy link
Author

@zdhxiong Android部分ROM中移除了对window.innerWidth的支持,或者得到的数值不正确。可能这就是造成这个现象的原因吧。我尝试手动设置该值试试。谢谢作者。

@zdhxiong
Copy link
Owner

window.innerWidth 是个 JS 的只读属性,任何 ROM 都无法移除它,你也没法设置这个值。
mdui-col-md-x 的目的就是只在 PC 上生效。

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

No branches or pull requests

2 participants