jd-opensource / jd-opensource/taro-ui

taro项目designWidth: 390, taro-ui 所有组件都无法自适应缩放了.

Open
#1,813 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

**问题描述**
taro项目designWidth: 390, taro-ui 所有组件都无法自适应缩放了.

**复现步骤**

1. 设计师提供的原型图是 390 尺寸;
2. 配置项目config/index.js;
designWidth: 390,
deviceRatio: {
640: 2.34 / 2,
750: 1,
375: 2,
390: 3.85 / 2,
828: 1.81 / 2,
}
3. 引入taro-ui后, 缩放比例不对了, 所有组件直接放大了两倍左右;

**期望行为**

能够提供解决方案, 目前尝试过全局修改scss变量
$hd: 1; 仅能解决文字大小问题, 组件中的其他属性都还是放大后的效果

**系统信息**

Taro 版本 3.6.14
Taro 版本 3.3.0
出问题的平台: weapp
**补充信息**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.