Jelajahi Sumber

测风动画

15103416783 1 tahun lalu
induk
melakukan
7e08d43c83

+ 6 - 0
pages.json

@@ -180,6 +180,12 @@
       },
 	  {
 	  	"path" : "pages/home/detail/windowAnimate/windowAnimate"
+	  },
+	  {
+	  	"path" : "pages/home/detail/windrectAnimate/windrectAnimate"
+	  },
+	  {
+	  	"path" : "pages/home/detail/fanlocalAnimate/fanlocalAnimate"
 	  }
 	    
     ],

+ 16 - 1
pages/home/detail/autodoor/autodoor.vue

@@ -83,6 +83,15 @@
             :doorcount="ndoorcount"
           ></doorAnimate>
         </div>
+        <div class="flcard" v-if="this.TabCur == 'windrect'">
+          <windrectAnimate
+            :state="state"
+            :title="title"
+            :videoURL="viedeoUrl"
+            :height="height"
+            :type="deviceType"
+          ></windrectAnimate>
+        </div>
         <div
           class="flcard"
           v-if="this.TabCur == 'window' && this.nwindownum == 1"
@@ -209,6 +218,8 @@
 import api from "@/api/api";
 import doorAnimate from "../doorAnimate/doorAnimate.vue";
 import windowAnimate from "../windowAnimate/windowAnimate.vue";
+import windrectAnimate from "../windrectAnimate/windrectAnimate.vue";
+import fanlocalAnimate from "../fanlocalAnimate/fanlocalAnimate.vue";
 export default {
   data() {
     return {
@@ -240,6 +251,8 @@ export default {
       windowAngle1: 0, //后窗打开角度
       windowArea: "", //风窗面积设定值
       viedeoUrl: "", //监控url
+	  sign:"",
+	  title:"测风设备"
     };
   },
   onLoad(query) {
@@ -250,7 +263,7 @@ export default {
     this.getShowList();
     this.ndoorcount = 2;
   },
-  components: { doorAnimate, windowAnimate },
+  components: { doorAnimate, windowAnimate,windrectAnimate,fanlocalAnimate },
   created() {
     this.getDeviceInfo(this.itemId);
     this.getVideoUrlById(this.itemId);
@@ -325,6 +338,8 @@ export default {
                 response.data.result.msgTxt[0].datalist[0].ndoorcount;
               this.deviceType =
                 response.data.result.msgTxt[0].datalist[0].deviceType;
+              this.state =
+                response.data.result.msgTxt[0].datalist[0].readData.sign;
               this.frontGateStatus = this.tableData.frontGateOpen;
               this.rearGateStatus = this.tableData.rearGateOpen;
               var maxarea = response.data.result.msgTxt[0].datalist[0].maxarea;

+ 1 - 1
pages/home/firstmodel.vue

@@ -243,7 +243,7 @@ export default {
       this.menushow = false;
     },
     openNewPage(params) {
-      this.$destroy();
+      // this.$destroy();
       uni.navigateTo({
         url: `/pages/home/detail/autodoor/autodoor?id=${params.deviceID}&name=${params.strinstallpos}&type=${this.TabCur}`,
       });

+ 12 - 0
uni_modules/uview-ui/changelog.md

@@ -1,3 +1,15 @@
+## 2.0.37(2024-03-17)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复表单校验`trigger`触发器参数无效问题
+2. 修复`u-input`组件的`password`属性在动态切换为`false`时失效的问题
+3. 添加微信小程序用户同意隐私协议事件回调
+4. 修复支付宝小程序picker样式问题
+5. `u-modal`添加`duration`字段控制动画过度时间
+6. 修复`picker` `lastIndex`异常导致的`column`异常问题
+7. `tabs`增加长按事件支持
+8. 修复`u-avatar` `square`属性在小程序`open-data`下无效问题
+9. 其他一些修复
 ## 2.0.36(2023-03-27)
 # uView2.0重磅发布,利剑出鞘,一统江湖
 

+ 2 - 2
uni_modules/uview-ui/components/u--form/u--form.vue

@@ -52,11 +52,11 @@
 				// #endif
 				return this.$refs.uForm.validate()
 			},
-			validateField(value, callback) {
+			validateField(value, callback, event) {
 				// #ifdef MP-WEIXIN
 				this.setMpData()
 				// #endif
-				return this.$refs.uForm.validateField(value, callback)
+				return this.$refs.uForm.validateField(value, callback, event)
 			},
 			resetFields() {
 				// #ifdef MP-WEIXIN

+ 0 - 5
uni_modules/uview-ui/components/u-avatar/props.js

@@ -30,11 +30,6 @@ export default {
             type: String,
             default: uni.$u.props.avatar.bgColor
         },
-        // 背景色
-        bgImage: {
-            type: String,
-            default: ''
-        },
         // 文字颜色
         color: {
             type: String,

+ 1 - 0
uni_modules/uview-ui/components/u-avatar/u-avatar.vue

@@ -162,6 +162,7 @@
 		&__image {
 			&--circle {
 				border-radius: 100px;
+				overflow: hidden;
 			}
 
 			&--square {

+ 5 - 0
uni_modules/uview-ui/components/u-button/u-button.vue

@@ -19,6 +19,7 @@
         @error="error"
         @opensetting="opensetting"
         @launchapp="launchapp"
+        @agreeprivacyauthorization="agreeprivacyauthorization"
         :hover-class="!disabled && !loading ? 'u-button--active' : ''"
         class="u-button u-reset-button"
         :style="[baseColor, $u.addStyle(customStyle)]"
@@ -153,6 +154,7 @@ import props from "./props.js";
  * @event {Function}	error			当使用开放能力时,发生错误的回调
  * @event {Function}	opensetting		在打开授权设置页并关闭后回调
  * @event {Function}	launchapp		打开 APP 成功的回调
+ * @event {Function}	agreeprivacyauthorization	用户同意隐私协议事件回调
  * @example <u-button>月落</u-button>
  */
 export default {
@@ -286,6 +288,9 @@ export default {
         launchapp(res) {
             this.$emit("launchapp", res);
         },
+        agreeprivacyauthorization(res) {
+            this.$emit("agreeprivacyauthorization", res);
+        },
     },
 };
 </script>

+ 1 - 1
uni_modules/uview-ui/components/u-input/u-input.vue

@@ -37,7 +37,7 @@
             	    :adjust-position="adjustPosition"
             	    :selection-end="selectionEnd"
             	    :selection-start="selectionStart"
-            	    :password="password || type === 'password' || undefined"
+            	    :password="password || type === 'password' || false"
                     :ignoreCompositionEvent="ignoreCompositionEvent"
             	    @input="onInput"
             	    @blur="onBlur"

+ 6 - 1
uni_modules/uview-ui/components/u-modal/props.js

@@ -79,6 +79,11 @@ export default {
         confirmButtonShape: {
             type: String,
             default: uni.$u.props.modal.confirmButtonShape
-        }
+        },
+		// 弹窗动画过度时间
+		duration:{
+			type:String | Number,
+			default: uni.$u.props.modal.duration
+		}
     }
 }

+ 5 - 4
uni_modules/uview-ui/components/u-modal/u-modal.vue

@@ -4,13 +4,13 @@
 		:zoom="zoom"
 		:show="show"
 		:customStyle="{
-			borderRadius: '6px', 
+			borderRadius: '6px',
 			overflow: 'hidden',
 			marginTop: `-${$u.addUnit(negativeTop)}`
 		}"
 		:closeOnClickOverlay="closeOnClickOverlay"
 		:safeAreaInsetBottom="false"
-		:duration="400"
+		:duration="duration"
 		@click="clickHandler"
 	>
 		<view
@@ -104,6 +104,7 @@
 	 * @property {Boolean}			showCancelButton	是否显示取消按钮 (默认 false )
 	 * @property {String}			confirmColor		确认按钮的颜色 (默认 '#2979ff' )
 	 * @property {String}			cancelColor			取消按钮的颜色 (默认 '#606266' )
+	 * @property {Number}			duration			弹窗动画过度时间 (默认 400 )
 	 * @property {Boolean}			buttonReverse		对调确认和取消的位置 (默认 false )
 	 * @property {Boolean}			zoom				是否开启缩放模式 (默认 true )
 	 * @property {Boolean}			asyncClose			是否异步关闭,只对确定按钮有效,见上方说明 (默认 false )
@@ -201,12 +202,12 @@
 				justify-content: center;
 				align-items: center;
 				height: 48px;
-				
+
 				&--confirm,
 				&--only-cancel {
 					border-bottom-right-radius: $u-modal-border-radius;
 				}
-				
+
 				&--cancel,
 				&--only-confirm {
 					border-bottom-left-radius: $u-modal-border-radius;

+ 0 - 5
uni_modules/uview-ui/components/u-navbar/props.js

@@ -50,11 +50,6 @@ export default {
 			type: String,
 			default: uni.$u.props.navbar.bgColor
 		},
-		// 背景颜色
-		bgImage: {
-			type: String,
-			default: ''
-		},
 		// 标题的宽度
 		titleWidth: {
 			type: [String, Number],

+ 0 - 2
uni_modules/uview-ui/components/u-navbar/u-navbar.vue

@@ -11,7 +11,6 @@
 			<u-status-bar
 				v-if="safeAreaInsetTop"
 				:bgColor="bgColor"
-				:bgImage="bgImage"
 			></u-status-bar>
 			<view
 				class="u-navbar__content"
@@ -19,7 +18,6 @@
 				:style="{
 					height: $u.addUnit(height),
 					backgroundColor: bgColor,
-					backgroundImage: bgImage,
 				}"
 			>
 				<view

+ 4 - 1
uni_modules/uview-ui/components/u-picker/u-picker.vue

@@ -37,7 +37,8 @@
 						:style="{
 							height: $u.addUnit(itemHeight),
 							lineHeight: $u.addUnit(itemHeight),
-							fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal'
+							fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal',
+							display: 'block'
 						}"
 					>{{ getItemText(item1) }}</text>
 				</picker-view-column>
@@ -189,6 +190,8 @@ export default {
 		setColumnValues(columnIndex, values) {
 			// 替换innerColumns数组中columnIndex索引的值为values,使用的是数组的splice方法
 			this.innerColumns.splice(columnIndex, 1, values)
+			// 替换完成之后将修改列之后的已选值置空
+			this.setLastIndex(this.innerIndex.slice(0,columnIndex))
 			// 拷贝一份原有的innerIndex做临时变量,将大于当前变化列的所有的列的默认索引设置为0
 			let tmpIndex = uni.$u.deepClone(this.innerIndex)
 			for (let i = 0; i < this.innerColumns.length; i++) {

+ 10 - 1
uni_modules/uview-ui/components/u-tabs/u-tabs.vue

@@ -20,6 +20,7 @@
 							v-for="(item, index) in list"
 							:key="index"
 							@tap="clickHandler(item, index)"
+							@longpress="longPressHandler(item,index)"
 							:ref="`u-tabs__wrapper__nav__item-${index}`"
 							:style="[$u.addStyle(itemStyle), {flex: scrollable ? '' : 1}]"
 							:class="[`u-tabs__wrapper__nav__item-${index}`, item.disabled && 'u-tabs__wrapper__nav__item--disabled']"
@@ -94,7 +95,8 @@
 	 * @property {String}	keyName	 从`list`元素对象中读取的键名(默认 'name' )
 	 * @event {Function(index)} change 标签改变时触发 index: 点击了第几个tab,索引从0开始
 	 * @event {Function(index)} click 点击标签时触发 index: 点击了第几个tab,索引从0开始
-	 * @example <u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
+  	 * @event {Function(index)} longPress 长按标签时触发 index: 点击了第几个tab,索引从0开始
+	 * @example <u-tabs :list="list" :is-scroll="false" :current="current" @change="change" @longPress="longPress"></u-tabs>
 	 */
 	export default {
 		name: 'u-tabs',
@@ -208,6 +210,13 @@
 					index
 				})
 			},
+			// 长按事件
+			longPressHandler(item, index) {
+				this.$emit('longPress', {
+					...item,
+					index
+				})
+			},
 			init() {
 				uni.$u.sleep().then(() => {
 					this.resize()

+ 2 - 2
uni_modules/uview-ui/libs/config/config.js

@@ -1,5 +1,5 @@
-// 此版本发布于2023-03-27
-const version = '2.0.36'
+// 此版本发布于2024-03-17
+const version = '2.0.37'
 
 // 开发环境才提示,生产环境不会提示
 if (process.env.NODE_ENV === 'development') {

+ 2 - 1
uni_modules/uview-ui/libs/config/props/modal.js

@@ -25,6 +25,7 @@ export default {
         closeOnClickOverlay: false,
         negativeTop: 0,
         width: '650rpx',
-        confirmButtonShape: ''
+        confirmButtonShape: '',
+		duration:400,
     }
 }

+ 1 - 1
uni_modules/uview-ui/package.json

@@ -2,7 +2,7 @@
 	"id": "uview-ui",
 	"name": "uview-ui",
 	"displayName": "uView2.0重磅发布,利剑出鞘,一统江湖",
-	"version": "2.0.36",
+	"version": "2.0.37",
 	"description": "uView UI已完美兼容nvue,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
 	"keywords": [
         "uview",