From 3ea1aa5cf6741bd6fc3210fca0e2409a4255f15a Mon Sep 17 00:00:00 2001 From: YYJeffrey <501934027@qq.com> Date: Sun, 30 Jan 2022 12:33:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix(Album):=20=E4=BF=AE=E5=A4=8D=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=95=B0=E9=87=8F=E4=B8=BA4=E5=BC=A0=E6=97=B6?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=8D=A2=E8=A1=8C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/album/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/album/index.js b/src/album/index.js index 6873106e..6a637140 100644 --- a/src/album/index.js +++ b/src/album/index.js @@ -100,7 +100,7 @@ Component({ if (!this.data.customRowNumber) { let urlLength = this.data.showUrls.length; - if (urlLength > 1 && urlLength < 5) { + if (urlLength > 1 && urlLength < 5 && urlLength !== 3) { this.setData({ everyRowNumber: 2 }); From 817e43b9817ec0fa42f04fa319eae709c8b38610 Mon Sep 17 00:00:00 2001 From: YYJeffrey <501934027@qq.com> Date: Sun, 30 Jan 2022 12:43:31 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix(Album):=20=E4=BF=AE=E5=A4=8D=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E6=A0=B7=E5=BC=8F=E7=B1=BB=E6=97=A0=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/album/index.wxml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/album/index.wxml b/src/album/index.wxml index 8293cbc5..288ccc40 100644 --- a/src/album/index.wxml +++ b/src/album/index.wxml @@ -1,10 +1,10 @@ - + - + +{{urls.length-maxNumber}} From 5bf59b9a53a57a304482c4d83ddc93967666696c Mon Sep 17 00:00:00 2001 From: Juzi Date: Mon, 28 Feb 2022 19:24:11 +0800 Subject: [PATCH 3/4] build: Travis CI automatic compilation --- dist/album/index.js | 2 +- dist/album/index.wxml | 4 ++-- examples/dist/album/index.js | 2 +- examples/dist/album/index.wxml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/album/index.js b/dist/album/index.js index ea03b607..33508006 100644 --- a/dist/album/index.js +++ b/dist/album/index.js @@ -1 +1 @@ -Component({externalClasses:["l-class","l-single-image-class","l-multi-image-class"],properties:{urls:{type:Array},preview:{type:Boolean,value:!0},gapRow:{type:Number,value:10},gapColumn:{type:Number,value:10},singleSize:{type:Number,value:360},multipleSize:{type:Number,value:158},singleMode:{type:String,value:"aspectFit"},multipleMode:{type:String,value:"aspectFill"},key:{type:String,value:"url"},maxNumber:{type:Number,value:9},customRowNumber:{type:Boolean,value:!1},everyRowNumber:{type:Number,value:3},previewFullImage:{type:Boolean,value:!0}},data:{newType:!0,shortSideValue:0,showUrls:[],isLong:!1},observers:{urls:function(){this.init()}},methods:{init(){let{urls:e,maxNumber:t,key:a}=this.data;if(e.length>t&&(e=e.slice(0,t),this.setData({isLong:!0})),this.setData({showUrls:e}),!this.data.customRowNumber){let e=this.data.showUrls.length;e>1&&e<5?this.setData({everyRowNumber:2}):this.setData({everyRowNumber:3})}const s=this.judgeType();this.setData({newType:s}),1===e.length&&this.horizontalOrVertical(s?e[0][a]:e[0])},judgeType(){const e=this.data.urls;return 0===e.length||"object"==typeof e[0]},horizontalOrVertical:function(e){wx.getImageInfo({src:e,success:e=>{const t=e.width>=e.height?e.width:e.height,a=e.width>=e.height?e.height:e.width;this.setData({horizontalScreen:e.width>=e.height,shortSideValue:a*this.data.singleSize/t})}})},onPreviewTap(e){const t=e.currentTarget.id;let a;a=this.data.previewFullImage?this.data.urls:this.data.showUrls;let s="",i=[];const l=this.data.newType,r=this.data.key;if(l){s=a[t][r];for(let e=0;et&&(e=e.slice(0,t),this.setData({isLong:!0})),this.setData({showUrls:e}),!this.data.customRowNumber){let e=this.data.showUrls.length;e>1&&e<5&&3!==e?this.setData({everyRowNumber:2}):this.setData({everyRowNumber:3})}const s=this.judgeType();this.setData({newType:s}),1===e.length&&this.horizontalOrVertical(s?e[0][a]:e[0])},judgeType(){const e=this.data.urls;return 0===e.length||"object"==typeof e[0]},horizontalOrVertical:function(e){wx.getImageInfo({src:e,success:e=>{const t=e.width>=e.height?e.width:e.height,a=e.width>=e.height?e.height:e.width;this.setData({horizontalScreen:e.width>=e.height,shortSideValue:a*this.data.singleSize/t})}})},onPreviewTap(e){const t=e.currentTarget.id;let a;a=this.data.previewFullImage?this.data.urls:this.data.showUrls;let s="",i=[];const l=this.data.newType,r=this.data.key;if(l){s=a[t][r];for(let e=0;e - + - + +{{urls.length-maxNumber}} diff --git a/examples/dist/album/index.js b/examples/dist/album/index.js index 6873106e..6a637140 100644 --- a/examples/dist/album/index.js +++ b/examples/dist/album/index.js @@ -100,7 +100,7 @@ Component({ if (!this.data.customRowNumber) { let urlLength = this.data.showUrls.length; - if (urlLength > 1 && urlLength < 5) { + if (urlLength > 1 && urlLength < 5 && urlLength !== 3) { this.setData({ everyRowNumber: 2 }); diff --git a/examples/dist/album/index.wxml b/examples/dist/album/index.wxml index 8293cbc5..288ccc40 100644 --- a/examples/dist/album/index.wxml +++ b/examples/dist/album/index.wxml @@ -1,10 +1,10 @@ - + - + +{{urls.length-maxNumber}} From 2c385d3142634c0bf2073c0421c09c8ba5231b24 Mon Sep 17 00:00:00 2001 From: qiushiming Date: Mon, 28 Feb 2022 19:25:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?chore(package.json):=20=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E7=89=88=E6=9C=AC=200.9.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e28b88a1..f0393ada 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lin-ui", - "version": "0.9.7", + "version": "0.9.8", "description": "A high quality UI components library with MiniProgram", "main": "app.js", "directories": {