Commit d8d0a1b7 by 李伟康

fix(verbal-trick): 修复品牌列表数据为空时的错误

- 修复 getCarBrandsList 方法中缺少空值判断导致的潜在错误
- 防止当接口返回空数据时程序出现异常情况
1 parent 14b16fa4
......@@ -329,8 +329,7 @@ export default {
methods: {
async getCarBrandsList() {
const res = await getCarBrandsList()
this.showFormData.find(item => item.name === 'carBrandId').optionList = res
console.log(res)
this.showFormData.find(item => item.name === 'carBrandId').optionList = res || []
},
handleDetail(data) {
this.id = data.batchId
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!