当接口返回的dishType为number类型且为0,为了避免假值判断陷阱可使用以下方法this.form.dishType = detail.dishType !== null && detail.dishType !== undefined ? Number(detail.dishType) : '';