Просмотр исходного кода

【修改】日期区间排版,自动选中等优化。

程志平 4 лет назад
Родитель
Сommit
d1563cf21b

+ 5 - 0
src/components/yongshuiyichang/yongshuiyichang.css

@@ -29,6 +29,7 @@
 }
 }
 
 
 >>>.demo-form-inline {
 >>>.demo-form-inline {
+	white-space: nowrap;
 	padding: 0;
 	padding: 0;
 	margin: 0;
 	margin: 0;
 	display: flex;
 	display: flex;
@@ -335,4 +336,8 @@
 	border: 1px solid #4D4D4D;
 	border: 1px solid #4D4D4D;
 }
 }
 
 
+.el-range-editor.el-input__inner {
+	width: 265px;
+}
+
 /* yongshuiyichang */
 /* yongshuiyichang */

+ 4 - 1
src/components/yongshuiyichang/yongshuiyichang.vue

@@ -99,7 +99,7 @@
 						}
 						}
 					}]
 					}]
 				},
 				},
-				select_datetime: '', // 选择的时间范围
+				select_datetime: [], // 选择的时间范围
 				startTime: '',
 				startTime: '',
 				endTime: '',
 				endTime: '',
 				num: 0.00
 				num: 0.00
@@ -131,6 +131,9 @@
 				this.startTime = this.getDate(year2, mon2, day2)
 				this.startTime = this.getDate(year2, mon2, day2)
 				this.endTime = this.getDate(year1, mon1, day1)
 				this.endTime = this.getDate(year1, mon1, day1)
 				
 				
+				this.select_datetime.push(this.startTime)
+				this.select_datetime.push(this.endTime)
+				
 				this.handleCurrentChange(1)
 				this.handleCurrentChange(1)
 			},
 			},
 			/**
 			/**