Skip to content

[Form 表单] 使用 amfe-flexible 后,表单内 label 字体大小错乱 #1986

@moselikk

Description

@moselikk

tdesign-mobile-vue 版本

1.10.1

重现链接

No response

重现步骤

在使用 amfe-flexible 及 postcss-pxtorem,配置如下
// vite.config.ts

export default defineConfig({
plugins: [vue()],
css: {
postcss: {
plugins: [
pxtorem({
rootValue: 37.5,
propList: ["*"],
minPixelValue: 1,
}),
],
},
},
});

// main.ts
import { createApp } from "vue";
import "amfe-flexible";
import "./style.css";
import App from "./App.vue";
import TDesign from "tdesign-mobile-vue";
import "tdesign-mobile-vue/es/style/index.css";

const app = createApp(App);
app.use(TDesign);

app.mount("#app");

// index.html
...

...

现象如图:

Image

期望结果

在使用 amfe-flexible 及 postcss-pxtorem 的项目中,label 字体大小和如官方演示部分一致。

实际结果

在使用 amfe-flexible 及 postcss-pxtorem 的项目中,label 字体过大。

框架版本

Vue(3.5.18)

浏览器版本

Chrome(139.0.7258.127)

系统版本

Windows11

Node版本

20.18.0

补充说明

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions