uview-plus组件库全面升级更新,订单结算判断支付方式是否可用代码调整,公众号关注二维码修改

This commit is contained in:
2025-10-21 10:44:31 +08:00
parent 5d98b7efc2
commit 5f3a307fec
395 changed files with 31264 additions and 2477 deletions

View File

@@ -58,6 +58,11 @@ export const props = defineMixin({
type: String,
default: () => defProps.navbar.bgColor
},
// 状态栏背景颜色 不写会使用背景颜色bgColor
statusBarBgColor: {
type: String,
default: () => ''
},
// 标题的宽度
titleWidth: {
type: [String, Number],

View File

@@ -10,7 +10,7 @@
<view :class="[fixed && 'u-navbar--fixed']">
<u-status-bar
v-if="safeAreaInsetTop"
:bgColor="bgColor"
:bgColor="statusBarBgColor ? statusBarBgColor : bgColor"
></u-status-bar>
<view
class="u-navbar__content"
@@ -27,12 +27,12 @@
@tap="leftClick"
>
<slot name="left">
<u-icon
<up-icon
v-if="leftIcon"
:name="leftIcon"
:size="leftIconSize"
:color="leftIconColor"
></u-icon>
></up-icon>
<text
v-if="leftText"
:style="{
@@ -57,11 +57,11 @@
@tap="rightClick"
>
<slot name="right">
<u-icon
<up-icon
v-if="rightIcon"
:name="rightIcon"
size="20"
></u-icon>
></up-icon>
<text
v-if="rightText"
class="u-navbar__content__right__text"
@@ -77,6 +77,7 @@
import { props } from './props';
import { mpMixin } from '../../libs/mixin/mpMixin';
import { mixin } from '../../libs/mixin/mixin';
import config from '../../libs/config/config';
import { addUnit, addStyle, getPx, getWindowInfo } from '../../libs/function/index';
/**
* Navbar 自定义导航栏
@@ -93,6 +94,7 @@
* @property {String} title 导航栏标题,如设置为空字符,将会隐藏标题占位区域
* @property {String} titleColor 文字颜色 (默认 ''
* @property {String} bgColor 导航栏背景设置 (默认 '#ffffff'
* @property {String} statusBarBgColor 状态栏背景颜色 不写同导航栏背景设置
* @property {String | Number} titleWidth 导航栏标题的最大宽度,内容超出会以省略号隐藏 (默认 '400rpx'
* @property {String | Number} height 导航栏高度(不包括状态栏高度在内,内部自动加上)(默认 '44px'
* @property {String | Number} leftIconSize 左侧返回图标的大小(默认 20px
@@ -120,8 +122,12 @@
leftClick() {
// 如果配置了autoBack自动返回上一页
this.$emit('leftClick')
if(this.autoBack) {
uni.navigateBack()
if (config.interceptor.navbarLeftClick != null) {
config.interceptor.navbarLeftClick()
} else {
if(this.autoBack) {
uni.navigateBack()
}
}
},
// 点击右侧区域
@@ -133,7 +139,6 @@
</script>
<style lang="scss" scoped>
@import "../../libs/css/components.scss";
.u-navbar {
@@ -165,7 +170,7 @@
&__left {
left: 0;
&--hover {
opacity: 0.7;
}