cja-phoenix 1.2.58 → 1.2.59
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/form/FileInput.d.vue.ts +2 -0
- package/dist/runtime/components/form/FileInput.vue +6 -1
- package/dist/runtime/components/form/FileInput.vue.d.ts +2 -0
- package/dist/runtime/utils/uploadFileCjbo.d.ts +5 -0
- package/dist/runtime/utils/uploadFileCjbo.js +13 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -31,10 +31,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
31
31
|
inputElement: Ref<any, any>;
|
|
32
32
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
33
|
"update:delete": (...args: any[]) => void;
|
|
34
|
+
"update:change": (...args: any[]) => void;
|
|
34
35
|
"update:modelValue": (value: any) => void;
|
|
35
36
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
37
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
37
38
|
"onUpdate:delete"?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
"onUpdate:change"?: ((...args: any[]) => any) | undefined;
|
|
38
40
|
}>, {
|
|
39
41
|
size: "sm" | "md" | "lg";
|
|
40
42
|
errorDisplay: boolean;
|
|
@@ -100,13 +100,18 @@ const updateFile = () => {
|
|
|
100
100
|
extension: file.name.match(/[^.]+$/g)[0],
|
|
101
101
|
file
|
|
102
102
|
};
|
|
103
|
+
validate().then(() => {
|
|
104
|
+
if (meta.valid) {
|
|
105
|
+
emit("update:change", model.value);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
103
108
|
};
|
|
104
109
|
const deleteFile = () => {
|
|
105
110
|
inputElement.value.value = null;
|
|
106
111
|
model.value = void 0;
|
|
107
112
|
emit("update:delete");
|
|
108
113
|
};
|
|
109
|
-
const emit = defineEmits(["update:delete"]);
|
|
114
|
+
const emit = defineEmits(["update:delete", "update:change"]);
|
|
110
115
|
defineExpose({
|
|
111
116
|
errorMessage,
|
|
112
117
|
meta,
|
|
@@ -31,10 +31,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
31
31
|
inputElement: Ref<any, any>;
|
|
32
32
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
33
|
"update:delete": (...args: any[]) => void;
|
|
34
|
+
"update:change": (...args: any[]) => void;
|
|
34
35
|
"update:modelValue": (value: any) => void;
|
|
35
36
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
37
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
37
38
|
"onUpdate:delete"?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
"onUpdate:change"?: ((...args: any[]) => any) | undefined;
|
|
38
40
|
}>, {
|
|
39
41
|
size: "sm" | "md" | "lg";
|
|
40
42
|
errorDisplay: boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useRuntimeConfig } from "#imports";
|
|
2
|
+
export const uploadFileCjbo = (options) => {
|
|
3
|
+
const { cjboURL } = useRuntimeConfig().public;
|
|
4
|
+
const body = new FormData();
|
|
5
|
+
body.append("file", options.file);
|
|
6
|
+
body.append("journeyId", options.journeyId);
|
|
7
|
+
body.append("status", options.status?.toString() || "1");
|
|
8
|
+
return $fetch("/api/v1/doccollector", {
|
|
9
|
+
baseURL: cjboURL,
|
|
10
|
+
method: "POST",
|
|
11
|
+
body
|
|
12
|
+
});
|
|
13
|
+
};
|