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 @@
时间
-
+