baidu / baidu/amis

关于移动端定制的疑问

Open
#4,835 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

doc
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

https://aisuda.bce.baidu.com/amis/zh-CN/docs/extend/mobile
文档中有提到
对于移动端的判断是根据页面宽度,和 CSS 保持一致,所以即便是在 PC 上,如果页面宽度很小也会切换到 mobile 配置
但在实际测试时,感觉有些配置只有在文档右上角,切换为移动端才体现出来.
比方说
https://aisuda.bce.baidu.com/amis/zh-CN/components/property
属性表-基本用法
我希望在pc端展示默认3列,手机端展示1列
然后编辑代码
添加
"mobile":{
"column":1
}
即使页面很窄效果也没出来,
但是右上角切成移动端,效果确实我理想状态
所以想问
到底什么条件满足移动端配置
"mobile":{}才会激活
或者说 文档右上角的 pc端/移动端的切换 到底是什么差异能让ui认为当前处于移动端状态
最终目的就是想一个页面一套代码,既能在pc使用,也能再移动端展示出适合移动端看的效果

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the mobile configuration guide and the Property component's basic-use example linked in the issue. Trace how the documentation preview switches between PC and mobile and how viewport width is evaluated for the mobile configuration. Done means explaining the difference or updating the behavior and documentation so the responsive result is consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.