n20-common-lib 2.5.5-beta.13 → 2.5.5-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.5.5-beta.13",
3
+ "version": "2.5.5-beta.14",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -163,12 +163,14 @@ export default {
163
163
  colfF
164
164
  },
165
165
  data() {
166
- console.log(this.$slots)
167
166
  return {
168
167
  tableData: [],
169
168
  errorListC: [],
170
- current: 1,
171
- pageSize: 6,
169
+ page: {
170
+ current: 1,
171
+ pageSize: 6,
172
+ total: 0
173
+ },
172
174
  index: 0
173
175
  }
174
176
  },
@@ -176,7 +178,14 @@ export default {
176
178
  errorList: {
177
179
  handler() {
178
180
  this.errorListC = this.errorList
181
+ this.page.total = Math.ceil(this.tableData.length / this.page.pageSize)
179
182
  }
183
+ },
184
+ page: {
185
+ handler(v) {
186
+ this.pageSize = v
187
+ },
188
+ deep: true
180
189
  }
181
190
  },
182
191
  computed: {
@@ -188,16 +197,7 @@ export default {
188
197
  this.$emit('update:visible', v)
189
198
  }
190
199
  },
191
- total() {
192
- return Math.ceil(this.tableData.length / this.pageSize)
193
- },
194
- page() {
195
- return {
196
- total: this.total,
197
- current: this.current,
198
- pageSize: this.pageSize
199
- }
200
- },
200
+
201
201
  columnsList() {
202
202
  return (this.validateResult && this.validateResult.columnsList) || []
203
203
  },
@@ -218,7 +218,8 @@ export default {
218
218
  this.tableData = cloneDeep(_errorList)
219
219
  const startIndex = (this.page.current - 1) * this.page.pageSize
220
220
  const endIndex = startIndex + this.page.pageSize
221
- return this.tableData.slice(startIndex, endIndex)
221
+ let dto = this.tableData.slice(startIndex, endIndex)
222
+ return dto
222
223
  } else {
223
224
  return undefined
224
225
  }
@@ -245,6 +246,7 @@ export default {
245
246
  const startIndex = (this.page.current - 1) * this.page.pageSize
246
247
  const endIndex = startIndex + this.page.pageSize
247
248
  this.errorListC = this.tableData.slice(startIndex, endIndex)
249
+
248
250
  this.index += 1
249
251
  this.$nextTick(() => {
250
252
  this.$refs.tables.doLayout()