el-date-picker 绑定两个字段
时间: 2023-08-16 20:09:52 浏览: 224
在el-date-picker组件中绑定两个字段的方法是使用this.$set方法来设置数据。具体的代码如下所示:
this.$set(this.formModelBaseInfo, 'cooperatePeriod', \[this.formModelBaseInfo.starttime, this.formModelBaseInfo.endtime\])。\[1\]这样就可以将starttime和endtime两个字段绑定到cooperatePeriod字段上了。
#### 引用[.reference_title]
- *1* [vue 使用element的el-date-picker组件绑定数据回显后,不能再次选择的问题](https://blog.csdn.net/zfengfei/article/details/115454638)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [el-time-picker绑定数据遇到的问题](https://blog.csdn.net/weixin_44326167/article/details/129454051)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文