Skip to content

Commit

Permalink
[fix]{GenerateForm}: 修复默认值赋值的一处bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Jun 11, 2019
1 parent c684b44 commit a9ebbca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/FormDesigner/GenerateForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default {
if (typeof (defaultValue) === 'string' && defaultValue.includes('$')) {
defaultValue = this.$store.getters[defaultValue.replace('$', '')];
}
this.models[genList[i].model] = defaultValue;
this.models[genList[i].model] = typeof (defaultValue) === 'boolean' ? '' : defaultValue;
}
// 多选下拉框初始化需要为Array,故此处单独处理
if (genList[i].type === 'checkbox') {
Expand Down

0 comments on commit a9ebbca

Please sign in to comment.