vue-laravel-crud 1.4.6 → 1.4.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.
- package/dist/vue-laravel-crud.esm.js +3406 -12875
- package/dist/vue-laravel-crud.min.js +3 -3
- package/dist/vue-laravel-crud.ssr.js +3468 -12876
- package/package.json +7 -5
- package/src/vue-laravel-crud.vue +14 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-laravel-crud",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://github.com/clonixdev/vue-laravel-crud",
|
|
6
6
|
"main": "dist/vue-laravel-crud.ssr.js",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"axios": "^1.3.5",
|
|
24
24
|
"bootstrap-vue": "^2.21.2",
|
|
25
25
|
"moment": "^2.29.1",
|
|
26
|
-
"vue-mc": "^0.6.0",
|
|
27
26
|
"vuedraggable": "^2.24.3"
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
|
@@ -45,11 +44,14 @@
|
|
|
45
44
|
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
46
45
|
"rollup-plugin-styles": "^4.0.0",
|
|
47
46
|
"rollup-plugin-terser": "^7.0.2",
|
|
48
|
-
"vue": "^2.7.
|
|
49
|
-
"vue-template-compiler": "^2.7.
|
|
47
|
+
"vue": "^2.7.14",
|
|
48
|
+
"vue-template-compiler": "^2.7.14",
|
|
49
|
+
"vuex": "^3.6.2",
|
|
50
|
+
"@vuex-orm/core": "^0.36.4",
|
|
51
|
+
"@vuex-orm/plugin-axios": "^0.9.4"
|
|
50
52
|
},
|
|
51
53
|
"peerDependencies": {
|
|
52
|
-
"vue": "^2.7.
|
|
54
|
+
"vue": "^2.7.14"
|
|
53
55
|
},
|
|
54
56
|
"engines": {
|
|
55
57
|
"node": ">=14"
|
package/src/vue-laravel-crud.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import draggable from "vuedraggable";
|
|
3
3
|
import axios from "axios";
|
|
4
4
|
import moment from "moment";
|
|
5
|
-
import { Model
|
|
5
|
+
import { Model } from '@vuex-orm/core';
|
|
6
6
|
|
|
7
7
|
export default /*#__PURE__*/ {
|
|
8
8
|
name: "VueLaravelCrud",
|
|
@@ -38,8 +38,8 @@ export default /*#__PURE__*/ {
|
|
|
38
38
|
MODE_CARDS: 2,
|
|
39
39
|
MODE_CUSTOM: 3,
|
|
40
40
|
},
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
useVuexORM: false,
|
|
42
|
+
|
|
43
43
|
};
|
|
44
44
|
},
|
|
45
45
|
watch: {
|
|
@@ -263,8 +263,7 @@ export default /*#__PURE__*/ {
|
|
|
263
263
|
mounted() {
|
|
264
264
|
|
|
265
265
|
if (this.model instanceof Model) {
|
|
266
|
-
this.
|
|
267
|
-
this.collection = new Collection();
|
|
266
|
+
this.useVuexORM = true;
|
|
268
267
|
} else {
|
|
269
268
|
this.item = this.model;
|
|
270
269
|
this.itemDefault = JSON.parse(JSON.stringify(this.item));
|
|
@@ -320,7 +319,12 @@ export default /*#__PURE__*/ {
|
|
|
320
319
|
},*/
|
|
321
320
|
|
|
322
321
|
finalFilters() {
|
|
323
|
-
|
|
322
|
+
|
|
323
|
+
return [
|
|
324
|
+
...this.filters,
|
|
325
|
+
...this.filter,
|
|
326
|
+
...this.internalFilter
|
|
327
|
+
];
|
|
324
328
|
},
|
|
325
329
|
|
|
326
330
|
internalFilter() {
|
|
@@ -524,7 +528,7 @@ export default /*#__PURE__*/ {
|
|
|
524
528
|
}, 1);
|
|
525
529
|
},
|
|
526
530
|
|
|
527
|
-
fetchItemsMc(page = 1) {
|
|
531
|
+
/*fetchItemsMc(page = 1) {
|
|
528
532
|
this.loading = true;
|
|
529
533
|
this.$emit("beforeFetch", {});
|
|
530
534
|
this.collection.page(page).fetch().then((response) => {
|
|
@@ -535,14 +539,14 @@ export default /*#__PURE__*/ {
|
|
|
535
539
|
this.toastError(error);
|
|
536
540
|
this.loading = false;
|
|
537
541
|
});
|
|
538
|
-
}
|
|
542
|
+
},*/
|
|
539
543
|
fetchItems(page = 1) {
|
|
540
544
|
if (!this.ajax) {
|
|
541
545
|
return;
|
|
542
546
|
}
|
|
543
547
|
this.$emit("beforeFetch", {});
|
|
544
|
-
if (this.
|
|
545
|
-
|
|
548
|
+
if (this.useVuexORM) {
|
|
549
|
+
// return this.fetchItemsMc(page);
|
|
546
550
|
}
|
|
547
551
|
this.loading = true;
|
|
548
552
|
axios
|