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

现在官方的稳定版提供的是基于px布局的,我看官网提供的例子却是基于rem布局的,基于rem布局的版本能下载到么 #299

Closed
minzhang2 opened this issue Sep 22, 2016 · 15 comments

Comments

@minzhang2
Copy link

本地环境

  • antd-mobile 版本:
  • 操作系统及其版本:
  • 浏览器及其版本:

你做了什么?

你期待的结果是:

实际上的结果:

可重现的在线演示

@afc163
Copy link
Member

afc163 commented Sep 22, 2016

config.postcss.push(pxtorem({
rootValue: 100,
propWhiteList: [],
selectorBlackList: [/^html$/, /^\.ant-/, /^\.github-/, /^\.gh-/],
}));

@minzhang2
Copy link
Author

现在基于mobile的框架配置说明太少了,能否适当的增加些说明文档

@pingan1927
Copy link
Contributor

会陆续完善相关文档

@minzhang2
Copy link
Author

minzhang2 commented Sep 22, 2016

用移动端遇到按需加载ant-mobile的相应组件的问题,能帮助解决下么,现在用的是官方的配置。还有一个问题是计算rem的配置进去的问题
srahg nmblg q n7jme 7z5

@pingan1927
Copy link
Contributor

const pxtorem = require('postcss-pxtorem');

  webpackConfig.postcss.push(pxtorem({
    rootValue: 100,
    propWhiteList: [],
  }));

@minzhang2
Copy link
Author

js依赖模块按需加载时怎么处理的,我搞了半天没搞出来
image

@pingan1927
Copy link
Contributor

  webpackConfig.babel.plugins.push(['antd', {
    style: true, // if true, use less
    libraryName: 'antd-mobile'
  }]);

@minzhang2
Copy link
Author

minzhang2 commented Sep 23, 2016

我现在是这样配置的所有的ant-design-mobile还是打包到了index.js下,这样index.js大小还是比较大的,想动态去加载antd-design-mobile的一些模块
image
我想做到官网demo的这种方式,想请教下怎么配置
image

@yiminghe
Copy link
Contributor

参考 #56

@offbye
Copy link

offbye commented Oct 11, 2016

同问,我们webapp也是用rem

@silentcloud
Copy link
Contributor

@offbye 最新版本已经有 rem 版本了

@SynChron1zed
Copy link

@pingan1927
const pxtorem = require('postcss-pxtorem');

webpackConfig.postcss.push(pxtorem({
rootValue: 100,
propWhiteList: [],
}));

为什么我配置这个项目就报错

@pingan1927
Copy link
Contributor

install 这个模块了吗

@lock
Copy link

lock bot commented May 28, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants