vue-laravel-crud 1.5.7 → 1.5.8
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.
|
@@ -11878,7 +11878,7 @@ var InfiniteLoading = /*@__PURE__*/getDefaultExportFromCjs(vueInfiniteLoadingExp
|
|
|
11878
11878
|
|
|
11879
11879
|
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}}
|
|
11880
11880
|
|
|
11881
|
-
var css = "tr td[data-v-
|
|
11881
|
+
var css = "tr td[data-v-a63589d7]:last-child,\ntr td[data-v-a63589d7]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-a63589d7] {\n display: flex;\n justify-content: center; }\n\n.crud-header[data-v-a63589d7] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-a63589d7] .crud-title[data-v-a63589d7] {\n margin: 0; }\n .crud-header[data-v-a63589d7] .crud-search[data-v-a63589d7] {\n max-width: 15rem; }\n .crud-header[data-v-a63589d7] .crud-search[data-v-a63589d7] .btn[data-v-a63589d7] {\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-a63589d7] .crud-search[data-v-a63589d7] .btn[data-v-a63589d7].open[data-v-a63589d7] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-a63589d7] .table-options[data-v-a63589d7] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-a63589d7] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-a63589d7] {\n table-layout: auto; }\n .table[data-v-a63589d7] tbody[data-v-a63589d7] td[data-v-a63589d7] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-a63589d7] tbody[data-v-a63589d7] td[data-v-a63589d7]::-webkit-scrollbar {\n display: none; } }\n";
|
|
11882
11882
|
n(css, {});
|
|
11883
11883
|
|
|
11884
11884
|
function normalizeComponent (
|
|
@@ -12011,7 +12011,8 @@ const _sfc_main = {
|
|
|
12011
12011
|
MODE_CUSTOM: 3
|
|
12012
12012
|
},
|
|
12013
12013
|
infiniteScrollKey: 1,
|
|
12014
|
-
optionsLoaded: false
|
|
12014
|
+
optionsLoaded: false,
|
|
12015
|
+
isMobile: false
|
|
12015
12016
|
};
|
|
12016
12017
|
},
|
|
12017
12018
|
watch: {
|
|
@@ -12282,6 +12283,10 @@ const _sfc_main = {
|
|
|
12282
12283
|
}
|
|
12283
12284
|
},
|
|
12284
12285
|
mounted() {
|
|
12286
|
+
this.isMobile = window.matchMedia("(max-width: 1024px)").matches;
|
|
12287
|
+
|
|
12288
|
+
// Agregar un oyente de eventos para actualizar isMobile cuando cambia el tamaño de la pantalla
|
|
12289
|
+
window.addEventListener("resize", this.handleResize);
|
|
12285
12290
|
if (this.useVuexORM) {
|
|
12286
12291
|
this.item = new this.model();
|
|
12287
12292
|
const fields = this.model.fields();
|
|
@@ -12345,7 +12350,7 @@ const _sfc_main = {
|
|
|
12345
12350
|
},
|
|
12346
12351
|
itemsList() {
|
|
12347
12352
|
const items = this.ajax ? this.items : this.items.slice(this.paginationIndexStart, this.paginationIndexEnd);
|
|
12348
|
-
if (this.masonrySort) {
|
|
12353
|
+
if (this.masonrySort && !this.isMobile) {
|
|
12349
12354
|
return this.rearrangeArray(items, this.masonryColumns);
|
|
12350
12355
|
}
|
|
12351
12356
|
return items;
|
|
@@ -12377,6 +12382,10 @@ const _sfc_main = {
|
|
|
12377
12382
|
}
|
|
12378
12383
|
},
|
|
12379
12384
|
methods: {
|
|
12385
|
+
handleResize() {
|
|
12386
|
+
// Actualizar isMobile cuando cambia el tamaño de la pantalla
|
|
12387
|
+
this.isMobile = window.matchMedia("(max-width: 1024px)").matches;
|
|
12388
|
+
},
|
|
12380
12389
|
infiniteHandler($state) {
|
|
12381
12390
|
const hasNextPage = this.pagination.total > 0 && (!this.firstLoad || this.pagination.current_page * this.pagination.per_page <= this.pagination.total);
|
|
12382
12391
|
console.debug("Has next page", hasNextPage, this.pagination);
|
|
@@ -13066,6 +13075,10 @@ const _sfc_main = {
|
|
|
13066
13075
|
};
|
|
13067
13076
|
this.pagination = pagination;
|
|
13068
13077
|
}
|
|
13078
|
+
},
|
|
13079
|
+
beforeDestroy() {
|
|
13080
|
+
// Eliminar el oyente de eventos al destruir el componente para evitar pérdidas de memoria
|
|
13081
|
+
window.removeEventListener("resize", this.handleResize);
|
|
13069
13082
|
}
|
|
13070
13083
|
};
|
|
13071
13084
|
var _sfc_render = function render() {
|
|
@@ -13991,7 +14004,7 @@ var _sfc_render = function render() {
|
|
|
13991
14004
|
}) : _vm._e()], 2)], 1);
|
|
13992
14005
|
};
|
|
13993
14006
|
var _sfc_staticRenderFns = [];
|
|
13994
|
-
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "
|
|
14007
|
+
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "a63589d7", null, null);
|
|
13995
14008
|
var component = __component__.exports;
|
|
13996
14009
|
|
|
13997
14010
|
// Import vue component
|