@monoui/vuejs 1.1.61 → 1.1.63
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/dist/main.js +2 -2
- package/package.json +1 -1
- package/src/components/Table/Table.vue +43 -12
package/package.json
CHANGED
|
@@ -199,16 +199,13 @@
|
|
|
199
199
|
size="sm"
|
|
200
200
|
variant="light"
|
|
201
201
|
>
|
|
202
|
-
<
|
|
202
|
+
<b-dropdown-item
|
|
203
203
|
v-for="perPage in filteredPerPageValues"
|
|
204
|
+
:key="'per-page-' + perPage"
|
|
205
|
+
@click="changeItemPerPage(perPage)"
|
|
204
206
|
>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
@click="changeItemPerPage(perPage)"
|
|
208
|
-
>
|
|
209
|
-
{{ perPage }}
|
|
210
|
-
</b-dropdown-item>
|
|
211
|
-
</template>
|
|
207
|
+
{{ perPage }}
|
|
208
|
+
</b-dropdown-item>
|
|
212
209
|
<b-dropdown-divider
|
|
213
210
|
v-if="
|
|
214
211
|
filteredPerPageValues &&
|
|
@@ -257,8 +254,26 @@
|
|
|
257
254
|
Refresh
|
|
258
255
|
<span v-show="settings.totalItemCount">
|
|
259
256
|
| {{ settings.totalItemCount }} Rows
|
|
260
|
-
</span
|
|
261
|
-
>
|
|
257
|
+
</span>
|
|
258
|
+
</mui-button>
|
|
259
|
+
|
|
260
|
+
<template v-if="useExport">
|
|
261
|
+
<b-dropdown
|
|
262
|
+
size="sm"
|
|
263
|
+
label="Export"
|
|
264
|
+
variant="light"
|
|
265
|
+
>
|
|
266
|
+
<template #button-content>
|
|
267
|
+
Export
|
|
268
|
+
</template>
|
|
269
|
+
|
|
270
|
+
<b-dropdown-item @click="() => exportTo(0)">
|
|
271
|
+
All Pages
|
|
272
|
+
</b-dropdown-item>
|
|
273
|
+
|
|
274
|
+
<slot name="pagination-export-item"></slot>
|
|
275
|
+
</b-dropdown>
|
|
276
|
+
</template>
|
|
262
277
|
</div>
|
|
263
278
|
</slot>
|
|
264
279
|
<slot name="pagination-buttons">
|
|
@@ -449,6 +464,11 @@ export default {
|
|
|
449
464
|
type: Number,
|
|
450
465
|
required: false,
|
|
451
466
|
default: 10
|
|
467
|
+
},
|
|
468
|
+
useExport: {
|
|
469
|
+
type: Boolean,
|
|
470
|
+
required: false,
|
|
471
|
+
default: false
|
|
452
472
|
}
|
|
453
473
|
},
|
|
454
474
|
watch: {
|
|
@@ -587,7 +607,12 @@ export default {
|
|
|
587
607
|
row
|
|
588
608
|
);
|
|
589
609
|
},
|
|
590
|
-
async getValues(
|
|
610
|
+
async getValues(
|
|
611
|
+
addHistory = true,
|
|
612
|
+
initialLoad = false,
|
|
613
|
+
isExport = false,
|
|
614
|
+
exportScope = 0
|
|
615
|
+
) {
|
|
591
616
|
this.isLoading = true;
|
|
592
617
|
this.$emit("loading", this.isLoading);
|
|
593
618
|
const { currentPage, itemPerPage } = this.settings;
|
|
@@ -596,7 +621,9 @@ export default {
|
|
|
596
621
|
this.filters,
|
|
597
622
|
this.sorting,
|
|
598
623
|
currentPage,
|
|
599
|
-
itemPerPage
|
|
624
|
+
itemPerPage,
|
|
625
|
+
isExport,
|
|
626
|
+
exportScope
|
|
600
627
|
);
|
|
601
628
|
|
|
602
629
|
if (!initialLoad && addHistory && !this.comingFromPopState) {
|
|
@@ -1102,6 +1129,10 @@ export default {
|
|
|
1102
1129
|
} catch (error) {
|
|
1103
1130
|
console.error(error);
|
|
1104
1131
|
}
|
|
1132
|
+
},
|
|
1133
|
+
|
|
1134
|
+
exportTo(scope) {
|
|
1135
|
+
this.getValues(true, false, true, scope);
|
|
1105
1136
|
}
|
|
1106
1137
|
}
|
|
1107
1138
|
};
|