Skip to content

Commit

Permalink
perf: 附件,表格组件支持只读属性
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Oct 14, 2020
1 parent 4539b49 commit 195baa9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/FormDesigner/GenerateFormItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ export default class GenerateFormItem extends Vue {
}
}
// 子表在只读模式下隐藏增删改按钮
get visibleList() {
const view = {
conditionTitle: false,
Expand All @@ -439,7 +438,7 @@ export default class GenerateFormItem extends Vue {
btnAddOnColumnHeader: this.widget.options.visibleList.btnAdd,
btnImport: this.widget.options.visibleList.btnImport,
};
if (this.readOnly && Object.keys(this.readOnly).length === 0) {
if ((this.readOnly && Object.keys(this.readOnly).length === 0) || this.widget.options.readonly) {
view.btnAddOnColumnHeader = false;
view.actionColumnBtnDel = false;
view.actionColumnBtnEdit = false;
Expand All @@ -451,8 +450,8 @@ export default class GenerateFormItem extends Vue {
// 附件列表在只读模式下隐藏增删改按钮
get fileVisibleList() {
const view:any = {};
if (this.readOnly && Object.keys(this.readOnly).length === 0) {
const view = {};
if ((this.readOnly && Object.keys(this.readOnly).length === 0) || this.widget.options.readonly) {
view.upload = false;
view.btnEdit = false;
view.btnDel = false;
Expand Down

0 comments on commit 195baa9

Please sign in to comment.