用户2738456
用户2738456
  • 发布:2025-02-13 18:43
  • 更新:2025-02-13 18:43
  • 阅读:11

dev模式中的button样式会被自动替换成uni-button

分类:uni-app
  1. 根目录新建 button.css, 填入 button { height: 10px; } 保存
  2. index.html 引用 <link href="/button.css" rel="stylesheet" />
  3. npm run dev

切换到页面开发者工具,查看button.css的请求,preview里是 uni-button { height: 10px; },button被自动替换成了uni-button

项目内部由于用的是第三方控件,无法修改button为uni-button,想问下如何避免上述css文件中的button被自动替换

2025-02-13 18:43 负责人:无 分享
已邀请:

要回复问题请先登录注册