From a72add8a584fc017da11b6f6e05a749ad7f2f4f7 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期一, 08 七月 2024 17:35:34 +0800 Subject: [PATCH] 1 --- main.js | 40 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 38 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 2069687..691a3d3 100644 --- a/main.js +++ b/main.js @@ -19,9 +19,45 @@ Vue.mixin(mixinsCommon) +// main.js +import uView from 'uview-ui' +Vue.use(uView) -import farmerfooter from '@/components/footer/farmer-footer' -Vue.component('farmer-footer', farmerfooter) +// 调用setConfig方法,方法内部会进行对象属性深度合并,可以放心嵌套配置 +// 需要在Vue.use(uView)之后执行 +uni.$u.setConfig({ + // 修改$u.config对象的属性 + config: { + // 修改默认单位为rpx,相当于执行 uni.$u.config.unit = 'rpx' + unit: 'rpx' + }, + // 修改$u.props对象的属性 + props: { + // 修改radio组件的size参数的默认值,相当于执行 uni.$u.props.radio.size = 30 + radio: { + size: 32, + labelSize:32 + }, + picker:{ + confirmColor:'#20613D' + } + // 其他组件属性配置 + // ...... + } +}) + + + +// #ifdef PUB_CUSTOMER +import customerFooter from '@/components/footer/customer-footer' +Vue.component('common-footer', customerFooter) +// #endif + +// #ifndef PUB_CUSTOMER +import supplierfooter from '@/components/footer/supplier-footer' +Vue.component('common-footer', supplierfooter) +// #endif + import nodata from '@/components/no-data' Vue.component('no-data', nodata) // import bfooter from '@/components/footer/bussincess-footer' -- Gitblit v1.9.3