@hostlink/nuxt-light 0.0.18 → 0.0.19
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/module.json +1 -1
- package/dist/runtime/components/l-app-main.vue +1 -1
- package/dist/runtime/components/l-form.vue +1 -0
- package/dist/runtime/components/l-page.vue +1 -0
- package/dist/runtime/components/l-select.vue +1 -1
- package/dist/runtime/lib/addObject.mjs +9 -4
- package/dist/runtime/lib/m.d.ts +1 -1
- package/dist/runtime/lib/removeObject.mjs +6 -9
- package/dist/runtime/lib/updateObject.mjs +8 -7
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useI18n } from 'vue-i18n';
|
|
3
3
|
import { useLight, q, getCurrentUser, m } from '../light';
|
|
4
4
|
import { ref, computed, reactive, provide, watch } from 'vue';
|
|
5
|
-
import packageJson from '../../package.json'
|
|
5
|
+
//import packageJson from '../../package.json'
|
|
6
6
|
|
|
7
7
|
const light = useLight();
|
|
8
8
|
const props = defineProps({
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { Dialog } from "quasar";
|
|
1
2
|
import m from "./m.mjs";
|
|
2
3
|
export default async (name, data) => {
|
|
3
|
-
|
|
4
|
-
data
|
|
5
|
-
})
|
|
6
|
-
|
|
4
|
+
try {
|
|
5
|
+
return await m(`add${name}`, { data });
|
|
6
|
+
} catch (e) {
|
|
7
|
+
Dialog.create({
|
|
8
|
+
title: "Error",
|
|
9
|
+
message: e.message
|
|
10
|
+
});
|
|
11
|
+
}
|
|
7
12
|
};
|
package/dist/runtime/lib/m.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function (operation:
|
|
1
|
+
export default function (operation: string, args: any, fields?: never[]): Promise<any>;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dialog } from "quasar";
|
|
2
2
|
import m from "./m.mjs";
|
|
3
|
-
const qua = useQuasar();
|
|
4
3
|
export default async function removeObject(name, id) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
try {
|
|
5
|
+
return await m(`remove${name}`, { id });
|
|
6
|
+
} catch (e) {
|
|
7
|
+
Dialog.create({
|
|
9
8
|
title: "Error",
|
|
10
|
-
message:
|
|
9
|
+
message: e.message
|
|
11
10
|
});
|
|
12
|
-
throw new Error(result.errors[0].message);
|
|
13
11
|
}
|
|
14
|
-
return result;
|
|
15
12
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import m from "./m.mjs";
|
|
2
|
+
import { Dialog } from "quasar";
|
|
2
3
|
export default async (name, id, data) => {
|
|
3
|
-
|
|
4
|
-
id,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
try {
|
|
5
|
+
return await m(`update${name}`, { id, data });
|
|
6
|
+
} catch (e) {
|
|
7
|
+
Dialog.create({
|
|
8
|
+
title: "Error",
|
|
9
|
+
message: e.message
|
|
10
|
+
});
|
|
9
11
|
}
|
|
10
|
-
return resp.data[`update${name}`];
|
|
11
12
|
};
|