遇到选择了时间但是时间组件却没有变化
代码:
<el-form :inline="true" ref="uploadForm1"
:model="uploadForm1">
<el-form-item label="日期:" prop="reportDate">
<el-date-picker
:type="fileType"
v-model="uploadForm1.reportDate"
value-format="yyyy-M-dd"
placeholder="请选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="区域名称:" prop="area_ID">
<el-select v-model="uploadForm1.area_ID" placeholder="请选择">
<el-option v-for="item in areaList" :value="item.area_ID" :label="item.area_Name"></el-option>
</el-select>
</el-form-item>
<el-form-item label-width="0">
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-search"-->
<!-- native-type="submit"-->
<!-- @click="handleUpload('uploadForm')"-->
<!-- >上传-->
<!-- </el-button>-->
<el-button type="primary" @click="uploadDateInfo('uploadForm1')" icon="el-icon-search" style="margin-left: 30px">查询</el-button>
</el-form-item>
</el-form>
ts:
image.png
解决办法:
uploadForm1: any = {
reportDate: "",
area_ID: 1
};
给对象里面加入属性,他就能找到属性名就能够回显示
网友评论