Skip to content

Commit e6ace02

Browse files
committed
1 parent 556c7e2 commit e6ace02

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

src/components/DataTables.vue

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,37 @@ export default {
9393
ActionBar,
9494
CheckboxGroup
9595
},
96+
created() {
97+
this.innerActionsDef = Object.assign({}, {
98+
def: [],
99+
width: 5,
100+
offset: 0
101+
}, this.actionsDef)
102+
103+
this.innerCheckboxFilterDef = Object.assign({}, {
104+
props: undefined,
105+
def: [],
106+
width: 14,
107+
offset: 0,
108+
filterFunction: undefined
109+
}, this.checkboxFilterDef)
110+
111+
this.innerSearchDef = Object.assign({}, {
112+
show: true,
113+
props: undefined,
114+
filterFunction: undefined,
115+
width: 5,
116+
placeholder: '',
117+
offset: 0
118+
}, this.searchDef)
119+
120+
this.innerPaginationDef = Object.assign({}, {
121+
layout: 'prev, pager, next, jumper, sizes, total',
122+
pageSize: 20,
123+
pageSizes: [20, 50, 100],
124+
currentPage: 1
125+
}, this.paginationDef)
126+
},
96127
props: {
97128
data: {
98129
type: Array,
@@ -164,44 +195,14 @@ export default {
164195
currentPage: 1,
165196
internalPageSize: 20,
166197
searchKey: '',
167-
checkedFilters: []
198+
checkedFilters: [],
199+
innerActionsDef: {},
200+
innerCheckboxFilterDef: {},
201+
innerSearchDef: {},
202+
innerPaginationDef: {}
168203
}
169204
},
170205
computed: {
171-
innerActionsDef() {
172-
return Object.assign({}, {
173-
def: [],
174-
width: 5,
175-
offset: 0
176-
}, this.actionsDef)
177-
},
178-
innerCheckboxFilterDef() {
179-
return Object.assign({}, {
180-
props: undefined,
181-
def: [],
182-
width: 14,
183-
offset: 0,
184-
filterFunction: undefined
185-
}, this.checkboxFilterDef)
186-
},
187-
innerSearchDef() {
188-
return Object.assign({}, {
189-
show: true,
190-
props: undefined,
191-
filterFunction: undefined,
192-
width: 5,
193-
placeholder: '',
194-
offset: 0
195-
}, this.searchDef)
196-
},
197-
innerPaginationDef() {
198-
return Object.assign({}, {
199-
layout: 'prev, pager, next, jumper, sizes, total',
200-
pageSize: 20,
201-
pageSizes: [20, 50, 100],
202-
currentPage: 1
203-
}, this.paginationDef)
204-
},
205206
innerColNotRowClick() {
206207
return this.colNotRowClick.concat(['innerRowActions'])
207208
},

0 commit comments

Comments
 (0)