<el-form class="pl13" :rules="rules" ref="ruleForm" :model="searchKey">
<el-form-item prop="daterange">
<el-date-picker
v-model="value1"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-form>
<el-form class="pl13" :rules="rules" ref="ruleForm" :model="searchKey">
<el-form-item prop="daterange">
<a-range-picker v-model="daterange"></a-range-picker>
</el-form-item>
</el-form>
rules: {
dateRange: [
{
type: 'array',
required: true,
message: '请选择日期区间',
fields: {
0: { type: 'date', required: true, message: '请选择开始日期' },
1: { type: 'date', required: true, message: '请选择结束日期' },
},
},
],
}