From a19b20afeacf84c1c743c76b5018bcfbddac2270 Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Fri, 15 Nov 2024 09:10:12 +0800 Subject: [PATCH] fix: 国控站 --- src/components/Form/HourPicker.vue | 37 ++++++++++++++++++++++++------------- 1 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/components/Form/HourPicker.vue b/src/components/Form/HourPicker.vue index 623a5ff..fd045f6 100644 --- a/src/components/Form/HourPicker.vue +++ b/src/components/Form/HourPicker.vue @@ -1,10 +1,20 @@ <template> - <el-date-picker + <!-- <el-date-picker v-model="value1" type="date" placeholder="������������" value-format="yyyy-MM-dd" - /> + /> --> + <el-date-picker + v-model="value1" + type="daterange" + range-separator="���" + start-placeholder="������������" + value-format="yyyy-MM-dd HH" + end-placeholder="������������" + :picker-options="pickerOptions" + > + </el-date-picker> </template> <script> @@ -12,7 +22,7 @@ // ���������import������������������from'������������������'; export default { -// import ��������������������������������������������������� + // import ��������������������������������������������������� components: {}, props: { // value1: String @@ -21,7 +31,12 @@ // ������������������ return { // newValue1: '' - value1: '' + value1: '', + pickerOptions: { + disabledDate: (time) => { + return time.getTime() > new Date() + }, + }, } }, // ������������ ���������data������ @@ -31,16 +46,13 @@ value1(nv, ov) { // this.newValue1 = nv this.sendPicker() - } + }, }, // ������������ - ��������������������������������� this ��������� - created() { - - }, + created() {}, // ������������ - ��������������������������� DOM ��������� - mounted() { + mounted() {}, - }, beforeCreate() {}, // ������������ - ������������ beforeMount() {}, // ������������ - ������������ beforeUpdate() {}, // ������������ - ������������ @@ -52,10 +64,9 @@ methods: { sendPicker() { this.$emit('sendPickerChild', this.value1) - } - } // ���������������keep-alive������������������������������������ + }, + }, // ���������������keep-alive������������������������������������ } </script> <style scoped> - </style> -- Gitblit v1.8.0