@monoui/vuejs 1.1.62 → 1.1.64
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 +31 -20
package/package.json
CHANGED
|
@@ -257,21 +257,23 @@
|
|
|
257
257
|
</span>
|
|
258
258
|
</mui-button>
|
|
259
259
|
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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>
|
|
268
269
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
<b-dropdown-item @click="() => exportTo(0)">
|
|
271
|
+
All Pages
|
|
272
|
+
</b-dropdown-item>
|
|
272
273
|
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
<slot name="pagination-export-item"></slot>
|
|
275
|
+
</b-dropdown>
|
|
276
|
+
</template>
|
|
275
277
|
</div>
|
|
276
278
|
</slot>
|
|
277
279
|
<slot name="pagination-buttons">
|
|
@@ -462,6 +464,11 @@ export default {
|
|
|
462
464
|
type: Number,
|
|
463
465
|
required: false,
|
|
464
466
|
default: 10
|
|
467
|
+
},
|
|
468
|
+
useExport: {
|
|
469
|
+
type: Boolean,
|
|
470
|
+
required: false,
|
|
471
|
+
default: false
|
|
465
472
|
}
|
|
466
473
|
},
|
|
467
474
|
watch: {
|
|
@@ -477,8 +484,7 @@ export default {
|
|
|
477
484
|
currentPage: 1,
|
|
478
485
|
pageCount: 0,
|
|
479
486
|
itemPerPage: 10,
|
|
480
|
-
totalItemCount: 0
|
|
481
|
-
isExport: false
|
|
487
|
+
totalItemCount: 0
|
|
482
488
|
},
|
|
483
489
|
tableData: [],
|
|
484
490
|
searchWord: null,
|
|
@@ -601,7 +607,12 @@ export default {
|
|
|
601
607
|
row
|
|
602
608
|
);
|
|
603
609
|
},
|
|
604
|
-
async getValues(
|
|
610
|
+
async getValues(
|
|
611
|
+
addHistory = true,
|
|
612
|
+
initialLoad = false,
|
|
613
|
+
isExport = false,
|
|
614
|
+
exportScope = 0
|
|
615
|
+
) {
|
|
605
616
|
this.isLoading = true;
|
|
606
617
|
this.$emit("loading", this.isLoading);
|
|
607
618
|
const { currentPage, itemPerPage } = this.settings;
|
|
@@ -610,7 +621,9 @@ export default {
|
|
|
610
621
|
this.filters,
|
|
611
622
|
this.sorting,
|
|
612
623
|
currentPage,
|
|
613
|
-
itemPerPage
|
|
624
|
+
itemPerPage,
|
|
625
|
+
isExport,
|
|
626
|
+
exportScope
|
|
614
627
|
);
|
|
615
628
|
|
|
616
629
|
if (!initialLoad && addHistory && !this.comingFromPopState) {
|
|
@@ -1119,9 +1132,7 @@ export default {
|
|
|
1119
1132
|
},
|
|
1120
1133
|
|
|
1121
1134
|
exportTo(scope) {
|
|
1122
|
-
this.
|
|
1123
|
-
this.settings.scope = scope;
|
|
1124
|
-
this.refresh();
|
|
1135
|
+
this.getValues(true, false, true, scope);
|
|
1125
1136
|
}
|
|
1126
1137
|
}
|
|
1127
1138
|
};
|