fix: 移除多余的uview-plus SCSS导入,使用正确的JS配置方式
Some checks failed
构建并部署前端到生产环境 / build-and-deploy (push) Failing after 22s
Some checks failed
构建并部署前端到生产环境 / build-and-deploy (push) Failing after 22s
This commit is contained in:
2
App.vue
2
App.vue
@@ -5,8 +5,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "uview-plus/index.scss";
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
/* 主色 */
|
/* 主色 */
|
||||||
--primary: #0A84FF;
|
--primary: #0A84FF;
|
||||||
|
|||||||
15
main.js
15
main.js
@@ -16,7 +16,20 @@ app.$mount()
|
|||||||
import { createSSRApp } from 'vue'
|
import { createSSRApp } from 'vue'
|
||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App)
|
const app = createSSRApp(App)
|
||||||
app.use(uviewPlus)
|
// 使用 uview-plus (版本 3.4.0+)
|
||||||
|
app.use(uviewPlus, () => {
|
||||||
|
return {
|
||||||
|
options: {
|
||||||
|
config: {
|
||||||
|
// 默认单位 rpx
|
||||||
|
unit: 'rpx'
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
// 可以在这里配置组件默认属性
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
app
|
app
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user