5 Star 30 Fork 13

un-pany/mobvue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
postcss.config.ts 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
pany-ang 提交于 2025-04-02 18:46 +08:00 . refactor: 适配 postcss-mobile-forever 5.0
// 修改配置后重启服务生效
export default {
plugins: {
// 自动添加浏览器前缀
"autoprefixer": {},
// 移动端适配插件
"postcss-mobile-forever": {
// UI 设计稿宽度
viewportWidth: (file: string) => file.includes("vant") ? 375 : 375,
// 限制视图的最大宽度
maxDisplayWidth: 750,
// 页面最外层选择器
appSelector: "#app",
// 是否对「页面最外层选择器」对应的元素进行描边
border: true,
// 转换单位后保留的小数点位数
unitPrecision: 3,
// 转换后的单位
mobileUnit: "vw",
// 需要转换的属性
propList: ["*"],
// 忽略的选择器
selectorBlackList: [".ignore", ".keep-px"],
// 忽略的属性
propertyBlackList: {
".van-icon": "font"
},
// 忽略的属性值
valueBlackList: ["1px"],
// 忽略的目录或文件
exclude: [],
// 包含块是根元素的选择器列表
rootContainingBlockSelectorList: [".van-tabbar", ".van-popup"]
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/un-pany/mobvue.git
git@gitee.com:un-pany/mobvue.git
un-pany
mobvue
mobvue
main

搜索帮助