vue Js对象结构函数使用方法

发布时间 2023-05-26 14:29:45作者: yuanyuanyang

写了三行不如一行搞定

原先的

 const inComeTypeId = this.queryForm.inComeTypeId
 const currentPage = this.queryForm.currentPage
 const pageSize = this.queryForm.pageSize

现在的

const { inComeTypeId, currentPage, pageSize } = this.queryForm

一行代码实现变量命名及从对象中取值,比较的爽哈。