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

build:app 未转换为 rpx 单位 #26

Open
4 tasks done
Honye opened this issue Jul 13, 2024 · 2 comments
Open
4 tasks done

build:app 未转换为 rpx 单位 #26

Honye opened this issue Jul 13, 2024 · 2 comments

Comments

@Honye
Copy link

Honye commented Jul 13, 2024

描述问题

编译为 app 平台时为将 rem 单位转换为 rpx

复现

uno.config.ts

import { defineConfig } from 'unocss'
import { presetUni } from '@uni-helper/unocss-preset-uni'

export default defineConfig({
    presets: [
        presetUni({
            remRpx: {
                baseFontSize: 2
            },
            attributify: {
                deleteAttributes: false
            }
        })
    ]
})

系统信息

uni: 3.0.0-alpha-3081220230802001
@uni-helper/unocss-preset-uni: 0.2.9

使用的包管理器

yarn

核对

  • 遵循我们的 行为准则
  • 检查是否已经有一个报告相同错误的问题,以避免重复创建。
  • 这是一个具体的错误。请开启 GitHub 讨论你的疑问。
  • 所提供的复现是这个问题的 最小复现
@Skiyee
Copy link
Member

Skiyee commented Jul 14, 2024

你好,可以提供一下最小复现?这样才得以确认问题,谢谢

@Honye
Copy link
Author

Honye commented Jul 29, 2024

你好,可以提供一下最小复现?这样才得以确认问题,谢谢

新建项目,使用我提供的版本和 uno.config.ts 即可

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