src/components/search-option/FYOptionTime.vue
@@ -1,9 +1,9 @@ <template> <el-form-item label="时间" :prop="prop"> <el-date-picker :model-value="value" v-model="date" @change="handleChange" type="month" :type="type" placeholder="选择时间" style="width: 150px" /> @@ -32,7 +32,11 @@ }, emits: ['update:value'], data() { return {}; return { date: this.value }; }, computed:{ }, methods: { handleChange(value) { @@ -49,7 +53,8 @@ }, mounted() { if (this.initValue) { this.handleChange(new Date()); this.date = new Date() this.handleChange(this.date); } } };