@fishawack/lab-velocity 2.0.0-beta.20 → 2.0.0-beta.21
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/_Build/vue/components/layout/TableSorter.vue +3 -3
- package/_Build/vue/modules/resource/Children/create.vue +1 -1
- package/_Build/vue/modules/resource/Children/edit.vue +2 -2
- package/_Build/vue/modules/resource/Children/show.vue +1 -1
- package/_Build/vue/modules/resource/index.js +10 -10
- package/_Build/vue/modules/resource/parent.vue +1 -1
- package/package.json +1 -1
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
class="ml-2"
|
|
42
42
|
@click="
|
|
43
43
|
$router.push({
|
|
44
|
-
name: `${jsonData.
|
|
44
|
+
name: `${jsonData.slug}.create`,
|
|
45
45
|
})
|
|
46
46
|
"
|
|
47
47
|
>
|
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
:fixed-height="fixedHeight"
|
|
67
67
|
:target-action="
|
|
68
68
|
(item) => ({
|
|
69
|
-
name: `${jsonData.
|
|
69
|
+
name: `${jsonData.slug}.show`,
|
|
70
70
|
params: { id: item.id },
|
|
71
71
|
})
|
|
72
72
|
"
|
|
73
73
|
:edit-action="
|
|
74
74
|
(item) => ({
|
|
75
|
-
name: `${jsonData.
|
|
75
|
+
name: `${jsonData.slug}.edit`,
|
|
76
76
|
params: { id: item.id },
|
|
77
77
|
})
|
|
78
78
|
"
|
|
@@ -78,7 +78,7 @@ export default {
|
|
|
78
78
|
|
|
79
79
|
this.addBreadcrumbs.push({
|
|
80
80
|
href: {
|
|
81
|
-
name: `${this.resource.
|
|
81
|
+
name: `${this.resource.slug}.show`,
|
|
82
82
|
param: this.model.id,
|
|
83
83
|
},
|
|
84
84
|
text: this.model.name,
|
|
@@ -97,7 +97,7 @@ export default {
|
|
|
97
97
|
);
|
|
98
98
|
|
|
99
99
|
this.$router.replace({
|
|
100
|
-
name: `${this.resource.
|
|
100
|
+
name: `${this.resource.slug}.show`,
|
|
101
101
|
params: { id: res.data.id },
|
|
102
102
|
});
|
|
103
103
|
} catch (e) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { merge } from "lodash";
|
|
3
|
+
import { merge, kebabCase } from "lodash";
|
|
4
4
|
import axios from "axios";
|
|
5
5
|
import { h, resolveComponent } from "vue";
|
|
6
6
|
|
|
@@ -20,8 +20,8 @@ export function meta(name = "default", properties = {}) {
|
|
|
20
20
|
singular,
|
|
21
21
|
label: singular,
|
|
22
22
|
multiLabel: name,
|
|
23
|
-
|
|
24
|
-
api: `/api/${name}`,
|
|
23
|
+
slug: properties?.slug || kebabCase(name),
|
|
24
|
+
api: `/api/${properties?.slug || kebabCase(name)}`,
|
|
25
25
|
permissions: {
|
|
26
26
|
create: () => true,
|
|
27
27
|
edit: () => true,
|
|
@@ -83,7 +83,7 @@ export function meta(name = "default", properties = {}) {
|
|
|
83
83
|
type: "primary",
|
|
84
84
|
onClick: () => {
|
|
85
85
|
$router.push({
|
|
86
|
-
name: `${resource.
|
|
86
|
+
name: `${resource.slug}.edit`,
|
|
87
87
|
params: { id: model.id },
|
|
88
88
|
});
|
|
89
89
|
},
|
|
@@ -117,7 +117,7 @@ export function meta(name = "default", properties = {}) {
|
|
|
117
117
|
);
|
|
118
118
|
|
|
119
119
|
$router.push({
|
|
120
|
-
name: `${resource.
|
|
120
|
+
name: `${resource.slug}.index`,
|
|
121
121
|
});
|
|
122
122
|
},
|
|
123
123
|
},
|
|
@@ -231,7 +231,7 @@ export function routes(node, name, properties = {}) {
|
|
|
231
231
|
|
|
232
232
|
return [
|
|
233
233
|
{
|
|
234
|
-
path: `/${resource.
|
|
234
|
+
path: `/${resource.slug}`,
|
|
235
235
|
component: node ? "" : require("../resource/parent.vue").default,
|
|
236
236
|
name,
|
|
237
237
|
meta: {
|
|
@@ -245,28 +245,28 @@ export function routes(node, name, properties = {}) {
|
|
|
245
245
|
component: node
|
|
246
246
|
? ""
|
|
247
247
|
: require("../resource/Children/index.vue").default,
|
|
248
|
-
name: `${
|
|
248
|
+
name: `${resource.slug}.index`,
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
251
|
path: "create",
|
|
252
252
|
component: node
|
|
253
253
|
? ""
|
|
254
254
|
: require("../resource/Children/create.vue").default,
|
|
255
|
-
name: `${
|
|
255
|
+
name: `${resource.slug}.create`,
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
258
|
path: ":id",
|
|
259
259
|
component: node
|
|
260
260
|
? ""
|
|
261
261
|
: require("../resource/Children/show.vue").default,
|
|
262
|
-
name: `${
|
|
262
|
+
name: `${resource.slug}.show`,
|
|
263
263
|
},
|
|
264
264
|
{
|
|
265
265
|
path: ":id/edit",
|
|
266
266
|
component: node
|
|
267
267
|
? ""
|
|
268
268
|
: require("../resource/Children/edit.vue").default,
|
|
269
|
-
name: `${
|
|
269
|
+
name: `${resource.slug}.edit`,
|
|
270
270
|
},
|
|
271
271
|
],
|
|
272
272
|
},
|