1.0.1 • Published 2 years ago
@winner-fed/convert-rem v1.0.1
@winner-fed/convert-rem
选项
默认选项
const defaultOptions = {
screenWidth: 375,
rootFontSize: 50,
maxRootFontSize: 64,
widthQueryKey: '',
supportLandscape: false,
useRootFontSizeBeyondMax: false
};介绍
| 名称 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| rootFontSize | number | 50 | 根元素字体值 |
| maxRootFontSize | number | 64 | 最大根元素字体值 |
| widthQueryKey | string | '' | 根据 widthQueryKey 的值去 url query 中取 client width |
| screenWidth | number | 375 | UI 设计图宽度 |
| supportLandscape | boolean | false | 横屏时使用 height 计算 rem |
| useRootFontSizeBeyondMax | boolean | false | 超过 maxRootFontSize 时,是否使用 rootFontSize |
参考
fork from rsbuild-plugin-rem