From 435d9b243da6c770df2819e2102af5bf7501fcfa Mon Sep 17 00:00:00 2001
From: QlQl <2458371920@qq.com>
Date: Fri, 17 Sep 2021 17:54:30 +0800
Subject: [PATCH] -1.4.1
---
src/components/time/time.js | 9 +++++++--
src/components/time/time.wxml | 7 ++++++-
src/pages/editor/editor.wxml | 2 +-
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/components/time/time.js b/src/components/time/time.js
index 623ba55..9b275a8 100644
--- a/src/components/time/time.js
+++ b/src/components/time/time.js
@@ -4,7 +4,12 @@ Component({
*/
properties: {
// 世界时间格式
- defaultTime: String
+ defaultTime: String,
+ // 显示日期的长度
+ timeLength: {
+ type: Number,
+ value: 30
+ }
},
/**
@@ -125,7 +130,7 @@ Component({
let {multiArray, multiIndex} = this.data;
// 月-日
let defaultMD = month + '-' + day;
- for (let i = 0, oneDay = 24 * 60 * 60 * 1000; i <= 180; i++) {
+ for (let i = 0, oneDay = 24 * 60 * 60 * 1000; i <= this.properties.timeLength; i++) {
let tmpMD = date.getUTCMonth() + 1 + "-" + date.getUTCDate();
if(defaultMD === tmpMD)
multiIndex[0] = i;
diff --git a/src/components/time/time.wxml b/src/components/time/time.wxml
index cad891c..e1d97e1 100644
--- a/src/components/time/time.wxml
+++ b/src/components/time/time.wxml
@@ -1,6 +1,11 @@
+
+
- {{startDate}}
+ {{ startDate }}
diff --git a/src/pages/editor/editor.wxml b/src/pages/editor/editor.wxml
index c817fd3..032e19a 100644
--- a/src/pages/editor/editor.wxml
+++ b/src/pages/editor/editor.wxml
@@ -31,7 +31,7 @@
时间
-
+