vue-laravel-crud 1.4.49 → 1.4.50
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.
|
@@ -17035,7 +17035,7 @@ var InfiniteLoading = /*@__PURE__*/getDefaultExportFromCjs(vueInfiniteLoadingExp
|
|
|
17035
17035
|
|
|
17036
17036
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
17037
17037
|
|
|
17038
|
-
var css = "tr td[data-v-
|
|
17038
|
+
var css = "tr td[data-v-25a0d059]:last-child,\ntr td[data-v-25a0d059]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-25a0d059] {\n display: flex;\n justify-content: center; }\n\n.crud-header[data-v-25a0d059] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-25a0d059] .crud-title[data-v-25a0d059] {\n margin: 0; }\n .crud-header[data-v-25a0d059] .crud-search[data-v-25a0d059] {\n max-width: 15rem; }\n .crud-header[data-v-25a0d059] .crud-search[data-v-25a0d059] .btn[data-v-25a0d059] {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem; }\n .crud-header[data-v-25a0d059] .crud-search[data-v-25a0d059] .btn[data-v-25a0d059].open[data-v-25a0d059] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-25a0d059] .table-options[data-v-25a0d059] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-25a0d059] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-25a0d059] {\n table-layout: auto; }\n .table[data-v-25a0d059] tbody[data-v-25a0d059] td[data-v-25a0d059] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-25a0d059] tbody[data-v-25a0d059] td[data-v-25a0d059]::-webkit-scrollbar {\n display: none; } }\n";
|
|
17039
17039
|
n(css, {});
|
|
17040
17040
|
|
|
17041
17041
|
function normalizeComponent (
|
|
@@ -17141,6 +17141,7 @@ const _sfc_main = {
|
|
|
17141
17141
|
return {
|
|
17142
17142
|
moment: moment,
|
|
17143
17143
|
loading: false,
|
|
17144
|
+
firstLoad: false,
|
|
17144
17145
|
item: {
|
|
17145
17146
|
id: null
|
|
17146
17147
|
},
|
|
@@ -17469,33 +17470,23 @@ const _sfc_main = {
|
|
|
17469
17470
|
},
|
|
17470
17471
|
methods: {
|
|
17471
17472
|
infiniteHandler($state) {
|
|
17472
|
-
|
|
17473
|
-
const hasNextPage = this.pagination.current_page * this.pagination.per_page <= this.pagination.total;
|
|
17473
|
+
const hasNextPage = !this.firstLoad || this.pagination.current_page * this.pagination.per_page <= this.pagination.total;
|
|
17474
17474
|
if (hasNextPage) {
|
|
17475
17475
|
const page = this.pagination.current_page + 1;
|
|
17476
17476
|
this.fetchItems(page, true).then(() => {
|
|
17477
17477
|
$state.loaded();
|
|
17478
|
-
console.debug("infinite handler loaded");
|
|
17479
17478
|
}).catch(error => {
|
|
17480
17479
|
console.debug("infinite handler error", error);
|
|
17481
17480
|
$state.error();
|
|
17482
17481
|
});
|
|
17483
17482
|
} else {
|
|
17484
17483
|
$state.complete();
|
|
17485
|
-
console.debug("infinite handler complete", this.pagination, this.pagination.current_page * this.pagination.per_page, this.pagination.total);
|
|
17486
|
-
}
|
|
17487
|
-
const iref = this.$refs.infiniteLoading;
|
|
17488
|
-
console.debug("iref", iref);
|
|
17489
|
-
if (iref) {
|
|
17490
|
-
console.debug(iref.getCurrentDistance(), iref.getScrollParent(), iref.status, iref.$el);
|
|
17491
17484
|
}
|
|
17492
17485
|
},
|
|
17493
17486
|
onDraggableAdded(event) {
|
|
17494
|
-
console.log('Se agregó un nuevo elemento a la lista', event);
|
|
17495
17487
|
this.$emit("draggableAdded", event);
|
|
17496
17488
|
},
|
|
17497
17489
|
onDraggableChange(event) {
|
|
17498
|
-
console.log('Lista change', event);
|
|
17499
17490
|
this.$emit("draggableChange", event);
|
|
17500
17491
|
},
|
|
17501
17492
|
setupFilters() {
|
|
@@ -17687,6 +17678,7 @@ const _sfc_main = {
|
|
|
17687
17678
|
this.items = result.entities[this.model.entity];
|
|
17688
17679
|
console.debug("fetch page vuex ", page, this.items);
|
|
17689
17680
|
this.loading = false;
|
|
17681
|
+
this.firstLoad = true;
|
|
17690
17682
|
},
|
|
17691
17683
|
fetchItems() {
|
|
17692
17684
|
let page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
@@ -17747,6 +17739,7 @@ const _sfc_main = {
|
|
|
17747
17739
|
}
|
|
17748
17740
|
}
|
|
17749
17741
|
this.loading = false;
|
|
17742
|
+
this.firstLoad = true;
|
|
17750
17743
|
this.$emit("afterFetch", {});
|
|
17751
17744
|
}).catch(error => {
|
|
17752
17745
|
//console.debug(error);
|
|
@@ -18971,7 +18964,7 @@ var _sfc_render = function render() {
|
|
|
18971
18964
|
}) : _vm._e()], 2)], 1);
|
|
18972
18965
|
};
|
|
18973
18966
|
var _sfc_staticRenderFns = [];
|
|
18974
|
-
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "
|
|
18967
|
+
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "25a0d059", null, null);
|
|
18975
18968
|
var component = __component__.exports;
|
|
18976
18969
|
|
|
18977
18970
|
// Import vue component
|