Skip to content

Commit

Permalink
perf: 移除多余属性优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Dec 20, 2020
1 parent a1f4d31 commit 2f13b7a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions packages/form-designer/src/GenerateFormItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,9 @@ export default class GenerateFormItem extends Vue {
// 子表在只读模式下隐藏增删改按钮
get visibleList() {
const view = {
conditionTitle: false,
btnExport: false,
...this.widget.options.visibleList,
btnAdd: false,
btnAddOnColumnHeader: this.widget.options.visibleList.btnAdd,
btnImport: this.widget.options.visibleList.btnImport,
};
if ((this.readOnly && Object.keys(this.readOnly).length === 0) || this.widget.options.readonly) {
view.btnAddOnColumnHeader = false;
Expand Down
5 changes: 0 additions & 5 deletions packages/form-designer/src/WidgetConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -580,11 +580,6 @@
style="margin-right:10px"></el-switch>
<el-switch v-model="data.options.visibleList.searchForm"
inactive-text="查询区域"></el-switch>
<el-switch v-model="data.options.visibleList.btnExport"
inactive-text="导出按钮"
style="margin-right:10px"></el-switch>
<el-switch v-model="data.options.visibleList.btnImport"
inactive-text="上传按钮" style="margin-right:10px"></el-switch>
</el-form-item>
</template>
<template v-if="data.type === 'treeselect'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
:promiseForSelect="promiseForSelect"
:fullHeight="fullHeight"
:visibleList="{
conditionTitle: false,
searchForm: true,
btnAdd: false,
btnExport: false,
actionColumnBtnEdit: false,
actionColumnBtnDel: false,
tableTitle: false,
Expand Down
3 changes: 0 additions & 3 deletions packages/form-designer/src/componentsConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,6 @@ export const advanceComponents = [
tableTitle: false,
searchForm: false,
actionColumnBtnDel: true,
conditionTitle: false,
btnExport: false,
btnImport: false,
},
tableParams: '',
prefill: '',
Expand Down

0 comments on commit 2f13b7a

Please sign in to comment.