Browse Source

提交时间处理

chenrui 2 năm trước cách đây
mục cha
commit
5f7d520fa8
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  1. 9 0
      src/views/common/rangeDate.vue

+ 9 - 0
src/views/common/rangeDate.vue

@@ -22,6 +22,10 @@ export default {
     size: {
       type: String,
       default: 'default'
+    },
+    showTime: {
+      type: Boolean,
+      default: true
     }
   },
   data () {
@@ -55,6 +59,11 @@ export default {
       this.date = date
       if (dateStrings[0] == '' && dateStrings[1] == '') {
         dateStrings = []
+      } else {
+        if (this.showTime) {
+          dateStrings[0] = dateStrings[0] + ' 00:00:00'
+          dateStrings[1] = dateStrings[1] + ' 23:59:59'
+        }
       }
       this.$emit('change', dateStrings)
     },