shuchang пре 4 месеци
родитељ
комит
7eedadc384
28 измењених фајлова са 489 додато и 69 уклоњено
  1. 6 1
      pages/subpack/pages/bindInfo/bindInfo.vue
  2. 34 0
      uni_modules/uview-plus/changelog.md
  3. 4 2
      uni_modules/uview-plus/components/u-alert/u-alert.vue
  4. 313 0
      uni_modules/uview-plus/components/u-cate-tab/u-cate-tab.vue
  5. 4 0
      uni_modules/uview-plus/components/u-datetime-picker/props.js
  6. 8 1
      uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue
  7. 3 3
      uni_modules/uview-plus/components/u-dropdown/u-dropdown.vue
  8. 8 7
      uni_modules/uview-plus/components/u-index-list/u-index-list.vue
  9. 2 2
      uni_modules/uview-plus/components/u-list-item/u-list-item.vue
  10. 2 2
      uni_modules/uview-plus/components/u-list/u-list.vue
  11. 3 3
      uni_modules/uview-plus/components/u-navbar/u-navbar.vue
  12. 2 2
      uni_modules/uview-plus/components/u-no-network/u-no-network.vue
  13. 1 1
      uni_modules/uview-plus/components/u-parse/node/node.vue
  14. 6 2
      uni_modules/uview-plus/components/u-parse/parser.js
  15. 1 0
      uni_modules/uview-plus/components/u-picker/u-picker.vue
  16. 2 2
      uni_modules/uview-plus/components/u-popup/u-popup.vue
  17. 25 16
      uni_modules/uview-plus/components/u-qrcode/u-qrcode.vue
  18. 2 2
      uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue
  19. 11 7
      uni_modules/uview-plus/components/u-slider/u-slider.vue
  20. 9 2
      uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue
  21. 2 2
      uni_modules/uview-plus/components/u-sticky/u-sticky.vue
  22. 2 1
      uni_modules/uview-plus/components/u-swiper/u-swiper.vue
  23. 5 3
      uni_modules/uview-plus/components/u-tabs/u-tabs.vue
  24. 2 2
      uni_modules/uview-plus/components/u-toast/u-toast.vue
  25. 2 2
      uni_modules/uview-plus/components/u-tooltip/u-tooltip.vue
  26. 26 0
      uni_modules/uview-plus/libs/function/index.js
  27. 2 2
      uni_modules/uview-plus/package.json
  28. 2 2
      uni_modules/uview-plus/types/comps/actionSheet.d.ts

+ 6 - 1
pages/subpack/pages/bindInfo/bindInfo.vue

@@ -67,7 +67,7 @@
 				console.log('头像选择', e);
 				this.avatarImg = e.detail.avatarUrl
 			},
-			handleLogin() {
+			handleLogin() {     
 				if (!this.nickName) {
 					return uni.$u.toast('请输入昵称')
 				}
@@ -77,6 +77,11 @@
 				if (!uni.$u.test.mobile(this.phone)) {
 					return uni.$u.toast('请输入正确的手机号码')
 				}
+
+				// 跳转
+				uni.switchTab({
+					url: '/pages/tabbar/application/application'
+				})
 			},
 		}
 	}

+ 34 - 0
uni_modules/uview-plus/changelog.md

@@ -1,3 +1,37 @@
+## 3.3.61(2024-12-31)
+fix: 修复微信getSystemInfoSync接口废弃警告
+
+fix: 'u-status-bar' symbol missing
+
+## 3.3.60(2024-12-30)
+feat: 日期组件支持禁用
+
+fix: ts定义修复 #600
+
+feat: Tabs组件选中时增加一个active的class #595
+
+## 3.3.59(2024-12-30)
+fix: Property "isH5" was accessed during render
+
+## 3.3.58(2024-12-26)
+fix: slider组件change事件传参
+
+## 3.3.57(2024-12-23)
+fix: slider组件change事件传参
+
+feat: 更新u-picker组件增加当前选中class类名
+
+## 3.3.56(2024-12-18)
+feat: 在u-alert组件中添加关闭事件
+
+## 3.3.55(2024-12-17)
+add: swiper增加双向绑定
+
+## 3.3.54(2024-12-11)
+add: qrcode支持props控制是否开启点击预览
+
+add: 新增cate-tab垂直分类组件
+
 ## 3.3.53(2024-12-10)
 fix: 修复popup居中模式点击内容区域触发关闭
 

+ 4 - 2
uni_modules/uview-plus/components/u-alert/u-alert.vue

@@ -79,6 +79,7 @@
 	 * @property {String | Number}	fontSize    字体大小  (默认 14 )
 	 * @property {Object}			customStyle	定义需要用到的外部样式
 	 * @event    {Function}        click       点击组件时触发
+	 * @event    {Function}        close       点击关闭按钮时触发
 	 * @example  <u-alert :title="title"  type = "warning" :closable="closable" :description = "description"></u-alert>
 	 */
 	export default {
@@ -116,7 +117,7 @@
 				}
 			}
 		},
-		emits: ["click"],
+		emits: ["click","close"],
 		methods: {
 			addUnit,
 			addStyle,
@@ -126,7 +127,8 @@
 			},
 			// 点击关闭按钮
 			closeHandler() {
-				this.show = false
+				this.show = false   
+				this.$emit('close')
 			}
 		}
 	}

+ 313 - 0
uni_modules/uview-plus/components/u-cate-tab/u-cate-tab.vue

@@ -0,0 +1,313 @@
+<template>
+	<view class="u-cate-tab">
+		<view class="u-cate-tab__wrap">
+			<scroll-view class="u-cate-tab__view u-cate-tab__menu-scroll-view"
+                scroll-y scroll-with-animation :scroll-top="scrollTop"
+			    :scroll-into-view="itemId">
+				<view v-for="(item, index) in tabList" :key="index" class="u-cate-tab__item"
+                    :class="[current == index ? 'u-cate-tab__item-active' : '']"
+				 @tap.stop="swichMenu(index)">
+                    <slot name="tabItem" :item="item">
+                        <text class="u-line-1">{{item[tabKeyName]}}</text>
+                    </slot>
+				</view>
+			</scroll-view>
+			<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="u-cate-tab__right-box" @scroll="rightScroll">
+				<view class="u-cate-tab__page-view">
+					<view class="u-cate-tab__page-item" :id="'item' + index" v-for="(item , index) in tabList" :key="index">
+                        <slot name="itemList" :item="item">
+                            <view class="item-title">
+                                <text>{{item[tabKeyName]}}</text>
+                            </view>
+                            <view class="item-container">
+                                <template v-for="(item1, index1) in item.children" :key="index1">
+                                    <slot name="pageItem" :pageItem="item1">
+                                        <view class="thumb-box" >
+                                            <image class="item-menu-image" :src="item1.icon" mode=""></image>
+                                            <view class="item-menu-name">{{item1[itemKeyName]}}</view>
+                                        </view>
+                                    </slot>
+                                </template>
+                            </view>
+                        </slot>
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+        props: {
+            tabList: {
+                type: Array,
+                default: () => {
+                    return []
+                }
+            },
+            tabKeyName: {
+                type: String,
+                default: 'name'
+            },
+            itemKeyName: {
+                type: String,
+                default: 'name'
+            }
+        },
+        watch: {
+            tabList() {
+                this.getMenuItemTop()
+            }
+        },
+		data() {
+			return {
+				scrollTop: 0, //tab标题的滚动条位置
+				oldScrollTop: 0,
+				current: 0, // 预设当前项的值
+				menuHeight: 0, // 左边菜单的高度
+				menuItemHeight: 0, // 左边菜单item的高度
+				itemId: '', // 栏目右边scroll-view用于滚动的id
+				menuItemPos: [],
+                rects: [],
+				arr: [],
+				scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
+				timer: null, // 定时器
+			}
+		},
+		onMounted() {
+			this.getMenuItemTop()
+		},
+		methods: {
+			// 点击左边的栏目切换
+			async swichMenu(index) {
+				if(this.arr.length == 0) {
+					await this.getMenuItemTop();
+				}
+				if (index == this.current) return;
+				this.scrollRightTop = this.oldScrollTop;
+				this.$nextTick(function(){
+					this.scrollRightTop = this.arr[index];
+					this.current = index;
+					this.leftMenuStatus(index);
+				})
+			},
+			// 获取一个目标元素的高度
+			getElRect(elClass, dataVal) {
+				new Promise((resolve, reject) => {
+					const query = uni.createSelectorQuery().in(this);
+					query.select('.' + elClass).fields({
+						size: true
+					}, res => {
+						// 如果节点尚未生成,res值为null,循环调用执行
+						if (!res) {
+							setTimeout(() => {
+								this.getElRect(elClass);
+							}, 10);
+							return;
+						}
+						this[dataVal] = res.height;
+						resolve();
+					}).exec();
+				})
+			},
+			// 观测元素相交状态
+			async observer() {
+				this.tabList.map((val, index) => {
+					let observer = uni.createIntersectionObserver(this);
+					// 检测右边scroll-view的id为itemxx的元素与u-cate-tab__right-box的相交状态
+					// 如果跟.u-cate-tab__right-box底部相交,就动态设置左边栏目的活动状态
+					observer.relativeTo('.u-cate-tab__right-box', {
+						top: 0
+					}).observe('#item' + index, res => {
+						if (res.intersectionRatio > 0) {
+							let id = res.id.substring(4);
+							this.leftMenuStatus(id);
+						}
+					})
+				})
+			},
+			// 设置左边菜单的滚动状态
+			async leftMenuStatus(index) {
+				this.current = index;
+				// 如果为0,意味着尚未初始化
+				if (this.menuHeight == 0 || this.menuItemHeight == 0) {
+					await this.getElRect('u-cate-tab__menu-scroll-view', 'menuHeight');
+					await this.getElRect('u-cate-tab__item', 'menuItemHeight');
+				}
+				// 将菜单活动item垂直居中
+				this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
+			},
+			// 获取右边菜单每个item到顶部的距离
+			getMenuItemTop() {
+				new Promise(resolve => {
+					let selectorQuery = uni.createSelectorQuery();
+					selectorQuery.selectAll('.u-cate-tab__page-item').boundingClientRect((rects) => {
+						// 如果节点尚未生成,rects值为[](因为用selectAll,所以返回的是数组),循环调用执行
+						if(!rects.length) {
+							setTimeout(() => {
+								this.getMenuItemTop();
+							}, 10);
+							return ;
+						}
+                        this.rects = rects;
+						rects.forEach((rect) => {
+							// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况)
+							this.arr.push(rect.top - rects[0].top);
+							resolve();
+						})
+					}).exec()
+				})
+			},
+			// 右边菜单滚动
+			async rightScroll(e) {
+				this.oldScrollTop = e.detail.scrollTop;
+                // console.log(e.detail.scrollTop)
+                // console.log(JSON.stringify(this.arr))
+				if(this.arr.length == 0) {
+					await this.getMenuItemTop();
+				}
+				if(this.timer) return ;
+				if(!this.menuHeight) {
+					await this.getElRect('u-cate-tab__menu-scroll-view', 'menuHeight');
+				}
+				setTimeout(() => { // 节流
+					this.timer = null;
+					// scrollHeight为右边菜单垂直中点位置
+					let scrollHeight = e.detail.scrollTop + 1;
+                    // console.log(e.detail.scrollTop)
+					for (let i = 0; i < this.arr.length; i++) {
+						let height1 = this.arr[i];
+						let height2 = this.arr[i + 1];
+                        // console.log('i', i)
+                        // console.log('height1', height1)
+                        // console.log('height2', height2)
+						// 如果不存在height2,意味着数据循环已经到了最后一个,设置左边菜单为最后一项即可
+						if (!height2 || scrollHeight >= height1 && scrollHeight <= height2) {
+                            // console.log('scrollHeight', scrollHeight)
+                            // console.log('height1', height1)
+                            // console.log('height2', height2)
+							this.leftMenuStatus(i);
+							return ;
+						}
+					}
+				}, 10)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.u-cate-tab {
+		display: flex;
+		flex-direction: column;
+	}
+
+	.u-cate-tab__wrap {
+		flex: 1;
+		display: flex;
+		overflow: hidden;
+	}
+
+	.u-search-inner {
+		background-color: rgb(234, 234, 234);
+		border-radius: 100rpx;
+		display: flex;
+		align-items: center;
+		padding: 10rpx 16rpx;
+	}
+
+	.u-search-text {
+		font-size: 26rpx;
+		color: $u-tips-color;
+		margin-left: 10rpx;
+	}
+
+	.u-cate-tab__view {
+		width: 200rpx;
+		height: 100%;
+	}
+
+	.u-cate-tab__item {
+		height: 110rpx;
+		background: #f6f6f6;
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		font-size: 26rpx;
+		color: #444;
+		font-weight: 400;
+		line-height: 1;
+	}
+
+	.u-cate-tab__item-active {
+		position: relative;
+		color: #000;
+		font-size: 30rpx;
+		font-weight: 600;
+		background: #fff;
+	}
+
+	.u-cate-tab__item-active::before {
+		content: "";
+		position: absolute;
+		border-left: 4px solid $u-primary;
+		height: 32rpx;
+		left: 0;
+		top: 39rpx;
+	}
+
+	.u-cate-tab__view {
+		height: 100%;
+	}
+
+	.u-cate-tab__right-box {
+		background-color: rgb(250, 250, 250);
+	}
+
+	.u-cate-tab__page-view {
+		padding: 16rpx;
+	}
+
+	.u-cate-tab__page-item {
+		margin-bottom: 30rpx;
+		background-color: #fff;
+		padding: 16rpx;
+		border-radius: 8rpx;
+	}
+
+	.u-cate-tab__page-item:last-child {
+		min-height: 100vh;
+	}
+
+	.item-title {
+		font-size: 26rpx;
+		color: $u-main-color;
+		font-weight: bold;
+	}
+
+	.item-menu-name {
+		font-weight: normal;
+		font-size: 24rpx;
+		color: $u-main-color;
+	}
+
+	.item-container {
+		display: flex;
+		flex-wrap: wrap;
+	}
+
+	.thumb-box {
+		width: 33.333333%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		flex-direction: column;
+		margin-top: 20rpx;
+	}
+
+	.item-menu-image {
+		width: 120rpx;
+		height: 120rpx;
+	}
+</style>

+ 4 - 0
uni_modules/uview-plus/components/u-datetime-picker/props.js

@@ -6,6 +6,10 @@ export const props = defineMixin({
         hasInput: {
             type: Boolean,
             default: () => false
+        },
+		disabled: {
+            type: Boolean,
+            default: () => false
         },
         placeholder: {
             type: String,

+ 8 - 1
uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue

@@ -1,7 +1,7 @@
 <template>
     <view class="u-datetime-picker">
         <view v-if="hasInput" class="u-datetime-picker__has-input"
-            @click="showByClickInput = !showByClickInput"
+            @click="onShowByClickInput" 
         >
             <slot name="trigger" :value="inputValue">
 				<up-input
@@ -9,6 +9,7 @@
 					:readonly="!!showByClickInput"
 					border="surround"
 					v-model="inputValue"
+					:disabled="disabled"
 				></up-input>
 				<div class="input-cover">
 				</div>
@@ -461,6 +462,12 @@
 			        [`${type}Hour`]: hour,
 			        [`${type}Minute`]: minute
 			    }
+			},
+			onShowByClickInput(){
+				if(!this.disabled){
+					this.showByClickInput = !this.showByClickInput
+				}
+				
 			}
 		}
 	}

+ 3 - 3
uni_modules/uview-plus/components/u-dropdown/u-dropdown.vue

@@ -37,7 +37,7 @@
     import { props } from './props';
     import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { addUnit, sys} from '../../libs/function/index';
+	import { addUnit, getWindowInfo} from '../../libs/function/index';
 	/**
 	 * dropdown 下拉菜单
 	 * @description 该组件一般用于向下展开菜单,同时可切换多个选项卡的场景
@@ -166,8 +166,8 @@
 			getContentHeight() {
 				// 这里的原理为,因为dropdown组件是相对定位的,它的下拉出来的内容,必须给定一个高度
 				// 才能让遮罩占满菜单一下,直到屏幕底部的高度
-				// sys()为uview-plus封装的获取设备信息的方法
-				let windowHeight = sys().windowHeight;
+				// getWindowInfo()为uview-plus封装的获取设备信息的方法
+				let windowHeight = getWindowInfo().windowHeight;
 				this.$uGetRect('.u-dropdown__menu').then(res => {
 					// 这里获取的是dropdown的尺寸,在H5上,uniapp获取尺寸是有bug的(以前提出修复过,后来又出现了此bug,目前hx2.8.11版本)
 					// H5端bug表现为元素尺寸的top值为导航栏底部到到元素的上边沿的距离,但是元素的bottom值确是导航栏顶部到元素底部的距离

+ 8 - 7
uni_modules/uview-plus/components/u-index-list/u-index-list.vue

@@ -105,7 +105,7 @@
 	import { props } from './props';
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { addUnit, sys, sleep, getPx } from '../../libs/function/index';
+	import { addUnit, getWindowInfo, sleep, getPx } from '../../libs/function/index';
 
 	// #ifdef APP-NVUE
 	// 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度
@@ -152,7 +152,7 @@
 				// scroll-view的高度
 				scrollViewHeight: 0,
 				// 系统信息
-				sys: sys(),
+				sys: {},
 				scrolling: false,
 				scrollIntoView: '',
 				pageY: 0,
@@ -188,6 +188,7 @@
 		created() {
 			this.children = []
 			this.anchors = []
+			this.sys = getWindowInfo()
 		},
 		mounted() {
 			this.init()
@@ -320,7 +321,7 @@
 					const {
 						height
 					} = size
-					const sysData = sys()
+					const sysData = getWindowInfo()
 					const windowHeight = sysData.windowHeight
 					let customNavHeight = 0
 					// 消除各端导航栏非原生和原生导致的差异,让索引列表字母对屏幕垂直居中
@@ -358,7 +359,7 @@
 				let index = this.currentIndex;
 				// 对H5的pageY进行修正,这是由于uni-app自作多情在H5中将触摸点的坐标跟H5的导航栏结合导致的问题
 				// #ifdef H5
-				// pageY += sys().windowTop
+				// pageY += getWindowInfo().windowTop
 				// #endif
 				// 对第一和最后一个字母做边界处理,因为用户可能在字母列表上触摸到两端的尽头后依然继续滑动
 				// console.log('top1', top)
@@ -476,8 +477,8 @@
 				let children = this.children
 				// #ifdef APP-NVUE
 				// nvue下获取的滚动条偏移为负数,需要转为正数
-				let sys = uni.getSystemInfoSync()
-				scrollTop = Math.abs(e.contentOffset.y) / 10	
+				let sys = getWindowInfo()
+				scrollTop = Math.abs(e.contentOffset.y) / 10
 				// console.log('native', e)
 				// #endif
 
@@ -515,7 +516,7 @@
 					if (scrollTop <= children[0].top || scrollTop >= children[len - 1].top + children[len - 1].height) {
 						this.activeIndex = -1
 						break
-					} else if (!nextItem) { 
+					} else if (!nextItem) {
 						// 当不存在下一个item时,意味着历遍到了最后一个
 						this.activeIndex = len - 1
 						break

+ 2 - 2
uni_modules/uview-plus/components/u-list-item/u-list-item.vue

@@ -19,7 +19,7 @@
 	import { props } from './props';
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { sys } from '../../libs/function/index';
+	import { getWindowInfo } from '../../libs/function/index';
 	// #ifdef APP-NVUE
 	const dom = uni.requireNativePlugin('dom')
 	// #endif
@@ -39,7 +39,7 @@
 				rect: {},
 				index: 0,
 				show: true,
-				sys: sys()
+				sys: getWindowInfo()
 			}
 		},
 		computed: {

+ 2 - 2
uni_modules/uview-plus/components/u-list/u-list.vue

@@ -50,7 +50,7 @@
 	import { props } from './props';
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { addUnit, addStyle, deepMerge, sleep, sys } from '../../libs/function/index';
+	import { addUnit, addStyle, deepMerge, sleep, getWindowInfo } from '../../libs/function/index';
 	// #ifdef APP-NVUE
 	const dom = uni.requireNativePlugin('dom')
 	// #endif
@@ -90,7 +90,7 @@
 				innerScrollTop: 0,
 				// vue下,scroll-view在上拉加载时的偏移值
 				offset: 0,
-				sys: sys()
+				sys: getWindowInfo()
 			}
 		},
 		computed: {

+ 3 - 3
uni_modules/uview-plus/components/u-navbar/u-navbar.vue

@@ -4,7 +4,7 @@
 			class="u-navbar__placeholder"
 			v-if="fixed && placeholder"
 			:style="{
-				height: addUnit(getPx(height) + sys().statusBarHeight,'px'),
+				height: addUnit(getPx(height) + getWindowInfo().statusBarHeight,'px'),
 			}"
 		></view>
 		<view :class="[fixed && 'u-navbar--fixed']">
@@ -77,7 +77,7 @@
 	import { props } from './props';
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { addUnit, addStyle, getPx, sys } from '../../libs/function/index';
+	import { addUnit, addStyle, getPx, getWindowInfo } from '../../libs/function/index';
 	/**
 	 * Navbar 自定义导航栏
 	 * @description 此组件一般用于在特殊情况下,需要自定义导航栏的时候用到,一般建议使用uni-app带的导航栏。
@@ -114,7 +114,7 @@
 		methods: {
 			addStyle,
 			addUnit,
-			sys,
+			getWindowInfo,
 			getPx,
 			// 点击左侧区域
 			leftClick() {

+ 2 - 2
uni_modules/uview-plus/components/u-no-network/u-no-network.vue

@@ -46,7 +46,7 @@
 	import { props } from './props';
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { toast } from '../../libs/function/index';
+	import { toast, getDeviceInfo } from '../../libs/function/index';
 	/**
 	 * noNetwork 无网络提示
 	 * @description 该组件无需任何配置,引入即可,内部自动处理所有功能和事件。
@@ -67,7 +67,7 @@
 			}
 		},
 		mounted() {
-			this.isIOS = (uni.getSystemInfoSync().platform === 'ios')
+			this.isIOS = (getDeviceInfo().platform === 'ios')
 			uni.onNetworkStatusChange((res) => {
 				this.isConnected = res.isConnected
 				this.networkType = res.networkType

+ 1 - 1
uni_modules/uview-plus/components/u-parse/node/node.vue

@@ -122,7 +122,7 @@ export default {
     return {
       ctrl: {},
       // #ifdef MP-WEIXIN
-      isiOS: uni.getSystemInfoSync().system.includes('iOS')
+      isiOS: uni.getDeviceInfo().system.includes('iOS')
       // #endif
     }
   },

+ 6 - 2
uni_modules/uview-plus/components/u-parse/parser.js

@@ -75,12 +75,16 @@ const config = {
   }
 }
 const tagSelector={}
+// #ifdef APP || H5 || MP-WEIXIN
+const { windowWidth } = uni.getWindowInfo()
+const { system } = uni.getDeviceInfo()
+// #endif
+// #ifndef APP || H5 || MP-WEIXIN
 const {
   windowWidth,
-  // #ifdef MP-WEIXIN
   system
-  // #endif
 } = uni.getSystemInfoSync()
+// #endif
 const blankChar = makeMap(' ,\r,\n,\t,\f')
 let idIndex = 0
 

+ 1 - 0
uni_modules/uview-plus/components/u-picker/u-picker.vue

@@ -48,6 +48,7 @@
 						<view
 							v-if="testArray(item)"
 							class="u-picker__view__column__item u-line-1"
+							:class="[index1 === innerIndex[index] && 'u-picker__view__column__item--selected']"
 							v-for="(item1, index1) in item"
 							:key="index1"
 							:style="{

+ 2 - 2
uni_modules/uview-plus/components/u-popup/u-popup.vue

@@ -51,7 +51,7 @@
 	import { props } from './props';
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { addUnit, addStyle, deepMerge, sleep, sys } from '../../libs/function/index';
+	import { addUnit, addStyle, deepMerge, sleep, getWindowInfo } from '../../libs/function/index';
 	/**
 	 * popup 弹窗
 	 * @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义
@@ -139,7 +139,7 @@
 				// 不使用css方案,是因为nvue不支持css的iPhoneX安全区查询属性
 				const {
 					safeAreaInsets
-				} = sys()
+				} = getWindowInfo()
 				if (this.mode !== 'center') {
 					style.flex = 1
 				}

+ 25 - 16
uni_modules/uview-plus/components/u-qrcode/u-qrcode.vue

@@ -99,6 +99,10 @@ export default {
 			type: String,
 			default: '生成中'
 		},
+		allowPreview: {
+			type: Boolean,
+			default: false
+		},
 	},
 	emits: ['result', 'longpress'],
 	data() {
@@ -189,26 +193,31 @@ export default {
 				});
 			}
 		},
-		preview() {
+		preview(e) {
 			// 预览图片
 			// console.log(this.result)
-			uni.previewImage({
-				urls: [this.result],
-				longPressActions: {
-					itemList: ['保存二维码图片'],
-					success: function(data) {
-						// console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
-						switch (data.tapIndex) {
-							case 0:
-								that._saveCode();
-								break;
+			if (this.allowPreview) {
+				uni.previewImage({
+					urls: [this.result],
+					longPressActions: {
+						itemList: ['保存二维码图片'],
+						success: function(data) {
+							// console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+							switch (data.tapIndex) {
+								case 0:
+									that._saveCode();
+									break;
+							}
+						},
+						fail: function(err) {
+							console.log(err.errMsg);
 						}
-					},
-					fail: function(err) {
-						console.log(err.errMsg);
 					}
-				}
-			});
+				});
+			}
+			this.$emit('preview', {
+				url: this.result
+			}, e)
 		},
 		longpress() {
 			this.$emit('longpress', this.result)

+ 2 - 2
uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue

@@ -11,7 +11,7 @@
 	import { props } from "./props.js";
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { addStyle, deepMerge, addUnit, sys } from '../../libs/function/index';
+	import { addStyle, deepMerge, addUnit, getWindowInfo } from '../../libs/function/index';
 	/**
 	 * SafeBottom 底部安全区
 	 * @description 这个适配,主要是针对IPhone X等一些底部带指示条的机型,指示条的操作区域与页面底部存在重合,容易导致用户误操作,因此我们需要针对这些机型进行底部安全区适配。
@@ -36,7 +36,7 @@
 				const style = {};
 				// #ifdef APP-NVUE || MP-TOUTIAO
 				// nvue下,高度使用js计算填充
-				style.height = addUnit(sys().safeAreaInsets.bottom, 'px');
+				style.height = addUnit(getWindowInfo().safeAreaInsets.bottom, 'px');
 				// #endif
 				return deepMerge(style, addStyle(this.customStyle));
 			},

+ 11 - 7
uni_modules/uview-plus/components/u-slider/u-slider.vue

@@ -269,8 +269,8 @@
 				this.newValue = ((this.distanceX / this.sliderRect.width) * (this.max - this.min)) + parseFloat(this.min);
 				this.status = 'moving';
 				// 发出moving事件
-				this.$emit('changing');
-				this.updateValue(this.newValue, true, index);
+				let $crtFmtValue = this.updateValue(this.newValue, true, index);
+				this.$emit('changing', $crtFmtValue);
 			},
 			onTouchMove(event, index = 1) {
 				if (this.disabled) return;
@@ -293,14 +293,14 @@
 				this.newValue = ((this.distanceX / this.sliderRect.width) * (this.max - this.min)) + parseFloat(this.min);
 				this.status = 'moving';
 				// 发出moving事件
-				this.$emit('changing');
-				this.updateValue(this.newValue, true, index);
+				let $crtFmtValue = this.updateValue(this.newValue, true, index);
+				this.$emit('changing', $crtFmtValue);
 			},
 			onTouchEnd(event, index = 1) {
 				if (this.disabled) return;
 				if (this.status === 'moving') {
-					this.updateValue(this.newValue, false, index);
-					this.$emit('change');
+					let $crtFmtValue = this.updateValue(this.newValue, false, index);
+					this.$emit('change', $crtFmtValue);
 				}
 				this.status = 'end';
 			},
@@ -373,7 +373,11 @@
 					default:
 						break;
 				}
-				
+				if (this.isRange) {
+					return this.rangeValue
+				} else {
+					return valueFormat
+				} 
 			},
 			format(value, index = 1) {
 				// 将小数变成整数,为了减少对视图的更新,造成视图层与逻辑层的阻塞

+ 9 - 2
uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue

@@ -2,6 +2,7 @@
 	<view
 	    :style="[style]"
 	    class="u-status-bar"
+		:class="[isH5 && 'u-safe-area-inset-top']"
 	>
 		<slot />
 	</view>
@@ -11,7 +12,7 @@
 	import { props } from './props';
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { addUnit, addStyle, deepMerge, sys } from '../../libs/function/index';
+	import { addUnit, addStyle, deepMerge, getWindowInfo } from '../../libs/function/index';
 	/**
 	 * StatbusBar 状态栏占位
 	 * @description 本组件主要用于状态填充,比如在自定导航栏的时候,它会自动适配一个恰当的状态栏高度。
@@ -25,13 +26,19 @@
 		mixins: [mpMixin, mixin, props],
 		data() {
 			return {
+				isH5: true
 			}
 		},
+		created() {
+			// #ifdef H5
+			this.isH5 = true
+			// #endif
+		},
 		computed: {
 			style() {
 				const style = {}
 				// 状态栏高度,由于某些安卓和微信开发工具无法识别css的顶部状态栏变量,所以使用js获取的方式
-				style.height = addUnit(sys().statusBarHeight, 'px')
+				style.height = addUnit(getWindowInfo().statusBarHeight, 'px')
 				style.backgroundColor = this.bgColor
 				return deepMerge(style, addStyle(this.customStyle))
 			}

+ 2 - 2
uni_modules/uview-plus/components/u-sticky/u-sticky.vue

@@ -17,7 +17,7 @@
 	import { props } from './props';
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { addUnit, addStyle, deepMerge, getPx, guid, sys, os } from '../../libs/function/index';
+	import { addUnit, addStyle, deepMerge, getPx, guid, getDeviceInfo, os } from '../../libs/function/index';
 	import zIndex from '../../libs/config/zIndex';
 	/**
 	 * sticky 吸顶
@@ -150,7 +150,7 @@
 				// #endif
 
 				// 如果安卓版本高于8.0,依然认为是支持css sticky的(因为安卓7在某些机型,可能不支持sticky)
-				if (os() === 'android' && Number(sys().system) > 8) {
+				if (os() === 'android' && Number(getDeviceInfo().system) > 8) {
 					this.cssSticky = true
 				}
 

+ 2 - 1
uni_modules/uview-plus/components/u-swiper/u-swiper.vue

@@ -143,7 +143,7 @@
 				this.currentIndex = val; // 和上游数据关联上
 			}
 		},
-		emits: ["click", "change"],
+		emits: ["click", "change", "update:current"],
 		computed: {
 			itemStyle() {
 				return index => {
@@ -189,6 +189,7 @@
 				} = e.detail
 				this.pauseVideo(this.currentIndex)
 				this.currentIndex = current
+				this.$emit('update:current', this.currentIndex)
 				this.$emit('change', e.detail)
 			},
 			// 切换轮播时,暂停视频播放

+ 5 - 3
uni_modules/uview-plus/components/u-tabs/u-tabs.vue

@@ -23,7 +23,9 @@
 							@longpress="longPressHandler(item,index)"
 							:ref="`u-tabs__wrapper__nav__item-${index}`"
 							:style="[addStyle(itemStyle), {flex: scrollable ? '' : 1}]"
-							:class="[`u-tabs__wrapper__nav__item-${index}`, item.disabled && 'u-tabs__wrapper__nav__item--disabled']"
+							:class="[`u-tabs__wrapper__nav__item-${index}`,
+								item.disabled && 'u-tabs__wrapper__nav__item--disabled',
+								innerCurrent == index ? 'u-tabs__wrapper__nav__item-active' : '']"
 						>
 							<slot v-if="$slots.content" name="content" :item="item" :keyName="keyName" :index="index" />
 							<slot v-else-if="!$slots.content && ($slots.default || $slots.$default)"
@@ -93,7 +95,7 @@
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
 	import defProps from '../../libs/config/props.js'
-	import { addUnit, addStyle, deepMerge, getPx, sleep, sys } from '../../libs/function/index';
+	import { addUnit, addStyle, deepMerge, getPx, sleep, getWindowInfo } from '../../libs/function/index';
 	/**
 	 * Tabs 标签
 	 * @description tabs标签组件,在标签多的时候,可以配置为左右滑动,标签少的时候,可以禁止滑动。 该组件的一个特点是配置为滚动模式时,激活的tab会自动移动到组件的中间位置。
@@ -251,7 +253,7 @@
 						return total + curr.rect.width
 					}, 0)
 				// 此处为屏幕宽度
-				const windowWidth = sys().windowWidth
+				const windowWidth = getWindowInfo().windowWidth
 				// 将活动的tabs-item移动到屏幕正中间,实际上是对scroll-view的移动
 				let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect
 					.right) / 2 + this.tabsRect.left / 2

+ 2 - 2
uni_modules/uview-plus/components/u-toast/u-toast.vue

@@ -42,7 +42,7 @@
 <script>
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { os, sys, deepMerge, type2icon } from '../../libs/function/index';
+	import { os, getWindowInfo, deepMerge, type2icon } from '../../libs/function/index';
 	import color from '../../libs/config/color';
 	import { hexToRgb } from '../../libs/function/colorGradient';
 	/**
@@ -136,7 +136,7 @@
 			},
 			// 内容盒子的样式
 			contentStyle() {
-				const windowHeight = sys().windowHeight, style = {}
+				const windowHeight = getWindowInfo().windowHeight, style = {}
 				let value = 0
 				// 根据top和bottom,对Y轴进行窗体高度的百分比偏移
 				if(this.tmpConfig.position === 'top') {

+ 2 - 2
uni_modules/uview-plus/components/u-tooltip/u-tooltip.vue

@@ -93,7 +93,7 @@
 	import { props } from './props';
 	import { mpMixin } from '../../libs/mixin/mpMixin';
 	import { mixin } from '../../libs/mixin/mixin';
-	import { addStyle, addUnit, getPx, guid, toast, sleep, sys } from '../../libs/function/index';
+	import { addStyle, addUnit, getPx, guid, toast, sleep, getWindowInfo } from '../../libs/function/index';
 	// #ifdef APP-NVUE 
 	const dom = uni.requireNativePlugin('dom')
 	// #endif
@@ -162,7 +162,7 @@
 				const style = {
 						transform: `translateY(${this.direction === 'top' ? '-100%' : '100%'})`,
 					},
-					sysInfo = sys()
+					sysInfo = getWindowInfo()
 				if (this.tooltipInfo.width / 2 > this.textInfo.left + this.textInfo.width / 2 - this.screenGap) {
 					this.indicatorStyle = {}
 					style.left = `-${addUnit(this.textInfo.left - this.screenGap)}`

+ 26 - 0
uni_modules/uview-plus/libs/function/index.js

@@ -50,7 +50,12 @@ export function sleep(value = 30) {
  * @link 运行期判断平台 https://uniapp.dcloud.io/frame?id=判断平台
  */
 export function os() {
+	// #ifdef APP || H5 || MP-WEIXIN
+	return uni.getDeviceInfo().platform.toLowerCase()
+	// #endif
+	// #ifndef APP || H5 || MP-WEIXIN
 	return uni.getSystemInfoSync().platform.toLowerCase()
+	// #endif
 }
 /**
  * @description 获取系统信息同步接口
@@ -59,6 +64,26 @@ export function os() {
 export function sys() {
 	return uni.getSystemInfoSync()
 }
+export function getWindowInfo() {
+	let ret = {}
+	// #ifdef APP || H5 || MP-WEIXIN
+	ret = uni.getWindowInfo()
+	// #endif
+	// #ifndef APP || H5 || MP-WEIXIN
+	ret = sys()
+	// #endif
+	return ret
+}
+export function getDeviceInfo() {
+	let ret = {}
+	// #ifdef APP || H5 || MP-WEIXIN
+	ret = uni.getDeviceInfo()
+	// #endif
+	// #ifndef APP || H5 || MP-WEIXIN
+	ret = sys()
+	// #endif
+	return ret
+}
 
 /**
  * @description 取一个区间数
@@ -711,6 +736,7 @@ export default {
 	sleep,
 	os,
 	sys,
+	getWindowInfo,
 	random,
 	guid,
 	$parent,

+ 2 - 2
uni_modules/uview-plus/package.json

@@ -1,8 +1,8 @@
 {
 	"id": "uview-plus",
 	"name": "uview-plus",
-	"displayName": "uview-plus3.0重磅发布,全面的Vue3鸿蒙移动组件库。",
-	"version": "3.3.53",
+	"displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙移动组件库。",
+	"version": "3.3.61",
 	"description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
 	"keywords": [
         "uview",

+ 2 - 2
uni_modules/uview-plus/types/comps/actionSheet.d.ts

@@ -26,7 +26,7 @@ declare interface ActionSheetProps {
   /**
    * 点击某个菜单项时是否关闭弹窗
    */
-  closeOnClickAction?: string
+  closeOnClickAction?: boolean
   /**
    * 是否开启底部安全区适配
    * @default false
@@ -78,7 +78,7 @@ declare interface ActionSheetProps {
   /**
    * 点击ActionSheet列表项时触发
    */
-  onSelect?: () => any
+  onSelect?: (e: any) => any
   /**
    * 点击取消按钮时触发
    */