fix: 移除多余的uview-plus SCSS导入,使用正确的JS配置方式
Some checks failed
构建并部署前端到生产环境 / build-and-deploy (push) Failing after 22s

This commit is contained in:
sexygoat
2026-04-17 14:51:26 +08:00
parent 2d27f55d69
commit 379ac883f0
3 changed files with 15 additions and 4 deletions

View File

@@ -5,8 +5,6 @@
</template>
<style lang="scss">
@import "uview-plus/index.scss";
:root {
/* 主色 */
--primary: #0A84FF;

15
main.js
View File

@@ -16,7 +16,20 @@ app.$mount()
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
app.use(uviewPlus)
// 使用 uview-plus (版本 3.4.0+)
app.use(uviewPlus, () => {
return {
options: {
config: {
// 默认单位 rpx
unit: 'rpx'
},
props: {
// 可以在这里配置组件默认属性
}
}
}
})
return {
app
}

View File

@@ -13,7 +13,7 @@
*/
/* 颜色变量 */
// @import 'uview-plus/theme.scss';
@import 'uview-plus/theme.scss';
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;