layers-design-system 1.0.120 → 1.1.0

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,7 +1,7 @@
1
1
  {
2
2
  "name": "layers-design-system",
3
3
  "main": "src/main.js",
4
- "version": "1.0.120",
4
+ "version": "1.1.0",
5
5
  "scripts": {
6
6
  "start": "vue-cli-service serve ./src/main-docs.js",
7
7
  "build": "vue-cli-service build --target lib ./src/main.js",
@@ -30,6 +30,7 @@
30
30
  :selectable="selectable"
31
31
  :autoLoadMore="false"
32
32
  pagination
33
+ limitPerPage="10"
33
34
  :style="{'--l-table-primary-color': 'var(--color-aqua)'}"
34
35
  />
35
36
  </div>
@@ -89,7 +90,7 @@ export default {
89
90
  const total = 451
90
91
 
91
92
  var items = [];
92
- for (var i = offset; i < offset + Math.min(total - offset, 50); i++) {
93
+ for (var i = offset; i < offset + Math.min(total - offset, limit); i++) {
93
94
  items.push({ id: i, code: "#" + (i + 1), "dueAt": new Date(), price: {amount: i * 50}, customer: {name: "Teste da Silva"}, status: "paid" });
94
95
  }
95
96
 
@@ -260,6 +260,14 @@ export default {
260
260
  type: Boolean,
261
261
  default: true,
262
262
  },
263
+
264
+ /**
265
+ * If set, will load this number of rows at a time
266
+ */
267
+ limitPerPage: {
268
+ type: Number,
269
+ default: 50,
270
+ },
263
271
  },
264
272
 
265
273
  mounted() {
@@ -275,7 +283,6 @@ export default {
275
283
 
276
284
  // Internal identification for hole state of loaded pages
277
285
  id: 0,
278
- perPage: 50,
279
286
  extraRows: 15,
280
287
 
281
288
  lastComputedOffsetY: 0,
@@ -310,6 +317,11 @@ export default {
310
317
  },
311
318
 
312
319
  computed: {
320
+
321
+ perPage() {
322
+ return this.limitPerPage;
323
+ },
324
+
313
325
  pagesCount() {
314
326
  return Math.floor(this.totalCount / this.perPage) + 1;
315
327
  },