Skip to content

Commit

Permalink
fix: 修复一些bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofan9 committed Mar 31, 2021
1 parent 295ffd1 commit 7961441
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/v-form-engine.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/v-form-engine.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "v-form-engine",
"version": "1.1.6-beta.5",
"version": "1.1.6-beta.6",
"description": "一个基于 vue + element-ui 的 PC 端表单引擎。支持灵活的配置项、编辑/查看两种视图、自定义模板/插槽、溢出隐藏、双击复制等...",
"typings": "dist/index.d.ts",
"main": "dist/v-form-engine.js",
Expand Down
7 changes: 6 additions & 1 deletion src/form-engine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,12 @@ export default class FormEngine extends Vue {
// 当不存在值时,设置一个默认值
this.items.forEach((item: Item) => {
if (item.prop && !this.formData[item.prop]) {
if (
item.prop
&& !this.formData[item.prop]
&& this.formData[item.prop] !== 0
&& this.formData[item.prop] !== false
) {
this.$set(this.newFormData, item.prop, '');
}
});
Expand Down

0 comments on commit 7961441

Please sign in to comment.