Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
fix: 修复导入数据问题
Browse files Browse the repository at this point in the history
  • Loading branch information
dream2023 committed Apr 17, 2020
1 parent c8665e5 commit 52abbc0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ npm run lint
npm run build
npx standard-version
npm publish --registry http://registry.npmjs.org
git push
git push --follow-tags origin master
git push gitee
npx gren release --override
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export default defineComponent({
if (jsonData.value && jsonData.value.formDesc) {
const keys = Object.keys(formAttrDefault);
formAttr.value = Object.assign(
{},
formAttrDefault,
_.pick(jsonData.value, keys)
);
Expand Down
14 changes: 7 additions & 7 deletions src/components/app-main/components/main-center.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,11 @@
</el-form-item>

<!-- 删除按钮 -->
<el-button
<i
@click.stop="handleDelete(index)"
class="form-item-delete-btn"
icon="el-icon-delete"
size="mini"
style="border-radius: 0"
type="primary"
class="el-icon-delete form-item-delete-btn"
v-if="currentFormItemIndex === index"
></el-button>
></i>
</el-col>
</template>
</template>
Expand Down Expand Up @@ -217,6 +213,10 @@ export default defineComponent({
right: 0;
bottom: 0;
z-index: 3;
cursor: pointer;
padding: 7px 15px;
color: white;
background: #409eff;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const store = new Vuex.Store<StateData>({
// 表单名称
name: "示例表单",
// 表单属性
formAttr: formAttrDefault,
formAttr: _.cloneDeep(formAttrDefault),
// 表单项列表
formItemList: listDefault
}
Expand Down Expand Up @@ -146,7 +146,7 @@ const store = new Vuex.Store<StateData>({
// 新增 form
createForm(state, { projectIndex, form }) {
form.formItemList = [];
form.formAttr = formAttrDefault;
form.formAttr = _.cloneDeep(formAttrDefault);
state.projectList[projectIndex].formList.push(form);
},
// 新增 formItem
Expand Down Expand Up @@ -236,7 +236,7 @@ const store = new Vuex.Store<StateData>({
clearCurrentForm(state) {
store.commit("updateCurrentForm", {
formItemList: [],
formAttr: formAttrDefault
formAttr: _.cloneDeep(formAttrDefault)
});
state.currentFormItemIndex = null;
},
Expand Down

0 comments on commit 52abbc0

Please sign in to comment.