@duxweb/dvha-core 0.1.23 → 1.0.14
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/cjs/components/auth/can.cjs +1 -1
- package/dist/cjs/components/loader/loader.cjs +1 -1
- package/dist/cjs/components/loader/remote/loader.cjs +1 -1
- package/dist/cjs/directive/permission.cjs +1 -1
- package/dist/cjs/hooks/data.cjs +1 -1
- package/dist/cjs/hooks/json/vModel.cjs +1 -1
- package/dist/cjs/hooks/json.cjs +1 -1
- package/dist/cjs/hooks/menu.cjs +1 -1
- package/dist/cjs/hooks/overlay.cjs +1 -1
- package/dist/cjs/hooks/tree.cjs +1 -1
- package/dist/cjs/hooks/upload/local.cjs +1 -1
- package/dist/cjs/hooks/upload.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/main.cjs +1 -1
- package/dist/cjs/provider/app.cjs +1 -1
- package/dist/cjs/utils/bus.cjs +1 -0
- package/dist/esm/components/auth/can.js +3 -2
- package/dist/esm/components/loader/loader.js +3 -2
- package/dist/esm/components/loader/remote/loader.js +3 -2
- package/dist/esm/directive/permission.js +3 -2
- package/dist/esm/hooks/data.js +166 -158
- package/dist/esm/hooks/json/vModel.js +67 -36
- package/dist/esm/hooks/json.js +62 -47
- package/dist/esm/hooks/menu.js +14 -13
- package/dist/esm/hooks/overlay.js +3 -2
- package/dist/esm/hooks/tree.js +8 -7
- package/dist/esm/hooks/upload/local.js +8 -8
- package/dist/esm/hooks/upload.js +123 -116
- package/dist/esm/index.js +24 -22
- package/dist/esm/main.js +7 -6
- package/dist/esm/provider/app.js +3 -2
- package/dist/esm/utils/bus.js +5 -0
- package/dist/types/hooks/data.d.ts +6 -66
- package/dist/types/hooks/json.d.ts +5 -1
- package/dist/types/hooks/upload/local.d.ts +1 -1
- package/dist/types/hooks/upload.d.ts +1 -1
- package/dist/types/utils/bus.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,65 +1,96 @@
|
|
|
1
|
-
import { toRef as
|
|
2
|
-
|
|
1
|
+
import { toRef as m } from "vue";
|
|
2
|
+
import { extractContext as b } from "./utils/contextManager.js";
|
|
3
|
+
import { evaluateExpression as f } from "./utils/expressionParser.js";
|
|
4
|
+
const w = {
|
|
3
5
|
name: "v-model",
|
|
4
6
|
priority: 70,
|
|
5
|
-
process(e,
|
|
6
|
-
const t = {},
|
|
7
|
+
process(e, l) {
|
|
8
|
+
const t = {}, i = {};
|
|
7
9
|
let o = !1;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
const a = b(l);
|
|
11
|
+
return Object.entries(l).forEach(([r, n]) => {
|
|
12
|
+
if (r.startsWith("v-model") || r.startsWith("vModel")) {
|
|
10
13
|
o = !0;
|
|
11
|
-
const [
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
+
const [c, ...p] = r.split(".");
|
|
15
|
+
let s;
|
|
16
|
+
c === "v-model" || c === "vModel" ? s = "modelValue" : c.startsWith("v-model:") ? s = c.slice(8) : c.startsWith("vModel:") ? s = c.slice(7) : s = "modelValue";
|
|
14
17
|
try {
|
|
15
|
-
const { modelValue:
|
|
16
|
-
t[
|
|
17
|
-
} catch (
|
|
18
|
-
console.error(`v-model binding error (${
|
|
18
|
+
const { modelValue: u, updateFn: h } = g(n, p, a);
|
|
19
|
+
t[s] = u, t[`onUpdate:${s}`] = h;
|
|
20
|
+
} catch (u) {
|
|
21
|
+
console.error(`v-model binding error (${s}):`, u);
|
|
19
22
|
}
|
|
20
23
|
} else
|
|
21
|
-
r
|
|
22
|
-
}), o ? { props: { ...
|
|
24
|
+
i[r] = n;
|
|
25
|
+
}), o ? { props: { ...i, ...t } } : null;
|
|
23
26
|
}
|
|
24
27
|
};
|
|
25
|
-
function
|
|
28
|
+
function g(e, l, t) {
|
|
29
|
+
if (typeof e == "string") {
|
|
30
|
+
const o = () => {
|
|
31
|
+
try {
|
|
32
|
+
return f(e, t);
|
|
33
|
+
} catch (r) {
|
|
34
|
+
console.warn(`v-model: Failed to evaluate expression "${e}"`, r);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
}, a = (r) => {
|
|
38
|
+
try {
|
|
39
|
+
const n = e.split(".");
|
|
40
|
+
if (n.length >= 2) {
|
|
41
|
+
const c = n.slice(0, -1).join("."), p = n[n.length - 1], s = f(c, t);
|
|
42
|
+
if (s && typeof s == "object") {
|
|
43
|
+
s[p] = d(r, l);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
console.warn(`v-model: Cannot update expression "${e}". Target object not found.`);
|
|
48
|
+
} catch (n) {
|
|
49
|
+
console.warn(`v-model: Failed to update expression "${e}"`, n);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
modelValue: o(),
|
|
54
|
+
updateFn: a
|
|
55
|
+
};
|
|
56
|
+
}
|
|
26
57
|
if (Array.isArray(e) && e.length === 2 && typeof e[0] == "function" && typeof e[1] == "function") {
|
|
27
|
-
const [
|
|
58
|
+
const [o, a] = e;
|
|
28
59
|
return {
|
|
29
|
-
modelValue:
|
|
30
|
-
updateFn: (
|
|
31
|
-
|
|
60
|
+
modelValue: o(),
|
|
61
|
+
updateFn: (r) => {
|
|
62
|
+
a(d(r, l));
|
|
32
63
|
}
|
|
33
64
|
};
|
|
34
65
|
}
|
|
35
66
|
if (Array.isArray(e) && e.length === 2) {
|
|
36
|
-
const [
|
|
37
|
-
if (!
|
|
67
|
+
const [o, a] = e;
|
|
68
|
+
if (!o || typeof a != "string")
|
|
38
69
|
throw new Error("Invalid v-model binding format: [obj, prop] expected");
|
|
39
|
-
const
|
|
70
|
+
const r = m(o, a);
|
|
40
71
|
return {
|
|
41
|
-
modelValue:
|
|
42
|
-
updateFn: (
|
|
43
|
-
|
|
72
|
+
modelValue: r.value,
|
|
73
|
+
updateFn: (n) => {
|
|
74
|
+
r.value = d(n, l);
|
|
44
75
|
}
|
|
45
76
|
};
|
|
46
77
|
}
|
|
47
|
-
const
|
|
48
|
-
return
|
|
78
|
+
const i = m(e);
|
|
79
|
+
return i === e && typeof e != "object" ? {
|
|
49
80
|
modelValue: e,
|
|
50
81
|
updateFn: () => {
|
|
51
82
|
console.warn("v-model: Cannot update non-reactive value. Please use ref, [obj, prop], or [getter, setter] format.");
|
|
52
83
|
}
|
|
53
84
|
} : {
|
|
54
|
-
modelValue:
|
|
55
|
-
updateFn: (
|
|
56
|
-
|
|
85
|
+
modelValue: i.value,
|
|
86
|
+
updateFn: (o) => {
|
|
87
|
+
i.value = d(o, l);
|
|
57
88
|
}
|
|
58
89
|
};
|
|
59
90
|
}
|
|
60
|
-
function
|
|
61
|
-
return
|
|
62
|
-
switch (
|
|
91
|
+
function d(e, l) {
|
|
92
|
+
return l.reduce((t, i) => {
|
|
93
|
+
switch (i) {
|
|
63
94
|
case "trim":
|
|
64
95
|
return typeof t == "string" ? t.trim() : t;
|
|
65
96
|
case "number": {
|
|
@@ -69,10 +100,10 @@ function c(e, s) {
|
|
|
69
100
|
case "lazy":
|
|
70
101
|
return t;
|
|
71
102
|
default:
|
|
72
|
-
return console.warn(`Unknown v-model modifier: ${
|
|
103
|
+
return console.warn(`Unknown v-model modifier: ${i}`), t;
|
|
73
104
|
}
|
|
74
105
|
}, e);
|
|
75
106
|
}
|
|
76
107
|
export {
|
|
77
|
-
|
|
108
|
+
w as vModelAdaptor
|
|
78
109
|
};
|
package/dist/esm/hooks/json.js
CHANGED
|
@@ -1,80 +1,95 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { defaultAdaptors as
|
|
3
|
-
import { injectContext as
|
|
4
|
-
function
|
|
5
|
-
const O = (
|
|
6
|
-
function
|
|
7
|
-
return (A(
|
|
1
|
+
import { computed as F, isRef as A, defineComponent as J, h as B, unref as G } from "vue";
|
|
2
|
+
import { defaultAdaptors as N } from "./json/index.js";
|
|
3
|
+
import { injectContext as S } from "./json/utils/contextManager.js";
|
|
4
|
+
function w(n) {
|
|
5
|
+
const O = (n == null ? void 0 : n.adaptors) || N, b = (n == null ? void 0 : n.components) || {}, P = F(() => A(n == null ? void 0 : n.data) ? n == null ? void 0 : n.data.value : n == null ? void 0 : n.data);
|
|
6
|
+
function j() {
|
|
7
|
+
return (A(n == null ? void 0 : n.context) ? n == null ? void 0 : n.context.value : n == null ? void 0 : n.context) || {};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function R(e) {
|
|
10
10
|
const r = {};
|
|
11
|
-
return Object.entries(e).forEach(([
|
|
12
|
-
if (
|
|
13
|
-
const l =
|
|
14
|
-
r[
|
|
11
|
+
return Object.entries(e).forEach(([t, a]) => {
|
|
12
|
+
if (t === "_context") return;
|
|
13
|
+
const l = t === "modelValue" || t.startsWith("modelValue") || t !== "value" && (t.includes("model") || t.includes("Model"));
|
|
14
|
+
r[t] = l && A(a) ? G(a) : a;
|
|
15
15
|
}), r;
|
|
16
16
|
}
|
|
17
|
-
function s(e, r,
|
|
18
|
-
return typeof e == "string" ? e : typeof e == "function" ? s(e(r), r,
|
|
17
|
+
function s(e, r, t) {
|
|
18
|
+
return typeof e == "string" ? e : typeof e == "function" ? s(e(r), r, t) : Array.isArray(e) ? e.flatMap((a) => s(a, r, t)).filter(Boolean) : e != null && e.tag ? c(e, !0, t) : e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function V(e, r, t) {
|
|
21
21
|
if (e)
|
|
22
|
-
return typeof e == "string" ? e : Array.isArray(e) ? e.flatMap((
|
|
22
|
+
return typeof e == "string" ? e : Array.isArray(e) ? e.flatMap((a) => typeof a == "string" ? a : c(a, r, t)).filter(Boolean) : c(e, r, t);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function c(e, r = !1, t = {}) {
|
|
25
25
|
const {
|
|
26
|
-
tag:
|
|
26
|
+
tag: a,
|
|
27
27
|
attrs: l = {},
|
|
28
|
-
children:
|
|
29
|
-
slots:
|
|
30
|
-
} = e,
|
|
31
|
-
...
|
|
32
|
-
...
|
|
28
|
+
children: D,
|
|
29
|
+
slots: M
|
|
30
|
+
} = e, u = {
|
|
31
|
+
...j(),
|
|
32
|
+
...t
|
|
33
33
|
};
|
|
34
34
|
let i = {
|
|
35
35
|
...l
|
|
36
36
|
};
|
|
37
|
-
Object.keys(
|
|
37
|
+
Object.keys(u).length > 0 && (i = {
|
|
38
38
|
...i,
|
|
39
|
-
...
|
|
39
|
+
...S({}, u)
|
|
40
40
|
});
|
|
41
41
|
for (const o of O) {
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
if (i =
|
|
45
|
-
if (
|
|
46
|
-
return
|
|
42
|
+
const f = o.process(e, i);
|
|
43
|
+
if (f) {
|
|
44
|
+
if (i = f.props, f.skip) return null;
|
|
45
|
+
if (f.nodes)
|
|
46
|
+
return f.nodes.map((m) => {
|
|
47
47
|
var v;
|
|
48
48
|
const y = ((v = m.attrs) == null ? void 0 : v._context) || {};
|
|
49
|
-
return
|
|
50
|
-
...
|
|
49
|
+
return c(m, r, {
|
|
50
|
+
...u,
|
|
51
51
|
...y
|
|
52
52
|
});
|
|
53
53
|
}).filter(Boolean);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
const d = typeof
|
|
57
|
-
if (
|
|
56
|
+
const d = typeof a == "string" && b[a] ? b[a] : a, h = typeof d != "string", g = R(i);
|
|
57
|
+
if (M && h && !r) {
|
|
58
58
|
const o = {};
|
|
59
|
-
return Object.entries(
|
|
60
|
-
o[
|
|
61
|
-
}),
|
|
59
|
+
return Object.entries(M).forEach(([f, m]) => {
|
|
60
|
+
o[f] = (y = {}) => s(m, y, u);
|
|
61
|
+
}), B(d, g, o);
|
|
62
62
|
}
|
|
63
|
-
const x =
|
|
64
|
-
return
|
|
63
|
+
const x = V(D, r, u);
|
|
64
|
+
return h && x !== void 0 ? B(d, g, {
|
|
65
65
|
default: () => x
|
|
66
|
-
}) :
|
|
66
|
+
}) : B(d, g, x);
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
const E = /* @__PURE__ */ J({
|
|
69
|
+
name: "JsonSchemaRenderer",
|
|
70
|
+
render() {
|
|
71
|
+
var e;
|
|
72
|
+
return ((e = P.value) == null ? void 0 : e.map((r) => c(r)).filter(Boolean)) || [];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
function _(e) {
|
|
76
|
+
return /* @__PURE__ */ J({
|
|
77
|
+
name: "DynamicJsonSchemaRenderer",
|
|
71
78
|
render() {
|
|
72
|
-
var
|
|
73
|
-
|
|
79
|
+
var t;
|
|
80
|
+
const r = {
|
|
81
|
+
...j(),
|
|
82
|
+
...e.context
|
|
83
|
+
};
|
|
84
|
+
return (t = e.data) == null ? void 0 : t.map((a) => c(a, !1, r)).filter(Boolean);
|
|
74
85
|
}
|
|
75
|
-
})
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
render: E,
|
|
90
|
+
renderAsync: _
|
|
76
91
|
};
|
|
77
92
|
}
|
|
78
93
|
export {
|
|
79
|
-
|
|
94
|
+
w as useJsonSchema
|
|
80
95
|
};
|
package/dist/esm/hooks/menu.js
CHANGED
|
@@ -3,11 +3,12 @@ import { storeToRefs as q } from "pinia";
|
|
|
3
3
|
import { computed as v, ref as K, watch as h } from "vue";
|
|
4
4
|
import { useRoute as z } from "vue-router";
|
|
5
5
|
import { useRouteStore as B } from "../stores/route.js";
|
|
6
|
+
import "../utils/bus.js";
|
|
6
7
|
import { arrayToTree as A, searchTree as M } from "../utils/tree.js";
|
|
7
|
-
function
|
|
8
|
+
function O(n) {
|
|
8
9
|
const D = B(), { routes: L } = q(D), y = (e = !0) => {
|
|
9
|
-
var
|
|
10
|
-
return (
|
|
10
|
+
var t;
|
|
11
|
+
return (t = S(L.value)) == null ? void 0 : t.filter((a) => !!(a != null && a.name)).filter((a) => !e || a.hidden === void 0 || a.hidden === !1);
|
|
11
12
|
}, b = v(() => {
|
|
12
13
|
const e = y(!1);
|
|
13
14
|
return A(e, {
|
|
@@ -28,25 +29,25 @@ function N(n) {
|
|
|
28
29
|
if (n != null && n.doubleMenu)
|
|
29
30
|
return c.value;
|
|
30
31
|
const e = S(c.value);
|
|
31
|
-
return e == null ? void 0 : e.map((
|
|
32
|
+
return e == null ? void 0 : e.map((t) => (delete t.children, t));
|
|
32
33
|
}), x = v(() => {
|
|
33
|
-
var
|
|
34
|
-
return n != null && n.doubleMenu ? [] : ((
|
|
35
|
-
}), w = v(() => M(b.value, (
|
|
34
|
+
var t, a;
|
|
35
|
+
return n != null && n.doubleMenu ? [] : ((a = (t = c.value) == null ? void 0 : t.find((d) => d.name === r.value)) == null ? void 0 : a.children) || [];
|
|
36
|
+
}), w = v(() => M(b.value, (t) => (t == null ? void 0 : t.name) === i.name));
|
|
36
37
|
h(() => n == null ? void 0 : n.doubleMenu, () => {
|
|
37
|
-
var e,
|
|
38
|
+
var e, t, a, d;
|
|
38
39
|
if (n != null && n.doubleMenu) {
|
|
39
40
|
const u = M(c.value, (l) => (l == null ? void 0 : l.name) === r.value);
|
|
40
|
-
r.value = (
|
|
41
|
+
r.value = (a = u == null ? void 0 : u[0]) == null ? void 0 : a.name, o.value = (d = u == null ? void 0 : u[u.length - 1]) == null ? void 0 : d.name;
|
|
41
42
|
} else {
|
|
42
43
|
const u = M(c.value, (l) => (l == null ? void 0 : l.name) === o.value);
|
|
43
|
-
r.value = (e = u == null ? void 0 : u[u.length - 1]) == null ? void 0 : e.name, o.value = (
|
|
44
|
+
r.value = (e = u == null ? void 0 : u[u.length - 1]) == null ? void 0 : e.name, o.value = (t = u == null ? void 0 : u[u.length - 1]) == null ? void 0 : t.name;
|
|
44
45
|
}
|
|
45
46
|
}, { immediate: !0 });
|
|
46
47
|
const j = v(() => n != null && n.doubleMenu ? (n == null ? void 0 : n.doubleMenu) || x.value.length > 0 : !0);
|
|
47
48
|
return h([i, b, () => n == null ? void 0 : n.doubleMenu], () => {
|
|
48
49
|
var d, u, l, T, I;
|
|
49
|
-
const e = M(b.value, (m) => m.name === i.name),
|
|
50
|
+
const e = M(b.value, (m) => m.name === i.name), a = ((m) => {
|
|
50
51
|
let R = -1;
|
|
51
52
|
for (let f = m.length - 1; f >= 0; f--)
|
|
52
53
|
if (m[f].hidden === !1 || m[f].hidden === void 0) {
|
|
@@ -55,7 +56,7 @@ function N(n) {
|
|
|
55
56
|
}
|
|
56
57
|
return R;
|
|
57
58
|
})(e);
|
|
58
|
-
g.value = (d = e == null ? void 0 : e[
|
|
59
|
+
g.value = (d = e == null ? void 0 : e[a]) == null ? void 0 : d.name, n != null && n.doubleMenu ? (r.value = (u = e == null ? void 0 : e[a]) == null ? void 0 : u.name, o.value = (l = e == null ? void 0 : e[a]) == null ? void 0 : l.name) : (r.value = (T = e == null ? void 0 : e[0]) == null ? void 0 : T.name, o.value = (I = e == null ? void 0 : e[a]) == null ? void 0 : I.name);
|
|
59
60
|
}, { immediate: !0 }), {
|
|
60
61
|
data: c,
|
|
61
62
|
originalData: b,
|
|
@@ -70,5 +71,5 @@ function N(n) {
|
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
O as useMenu
|
|
74
75
|
};
|
|
@@ -9,16 +9,17 @@ import "@vee-validate/rules";
|
|
|
9
9
|
import "vee-validate";
|
|
10
10
|
import "@vueuse/core";
|
|
11
11
|
import "./json/index.js";
|
|
12
|
+
import "../utils/bus.js";
|
|
12
13
|
import "colorizr";
|
|
13
14
|
import "axios";
|
|
14
15
|
import "clsx";
|
|
15
16
|
import { DuxOverlay as m } from "../components/overlay/overlay.js";
|
|
16
|
-
function
|
|
17
|
+
function D() {
|
|
17
18
|
const r = t(m);
|
|
18
19
|
return {
|
|
19
20
|
show: (o) => r(o)
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
D as useOverlay
|
|
24
25
|
};
|
package/dist/esm/hooks/tree.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { computed as a } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import "../utils/bus.js";
|
|
3
|
+
import { arrayToTree as m, treeToArr as y } from "../utils/tree.js";
|
|
4
|
+
import { useList as p } from "./data.js";
|
|
5
|
+
function T(e) {
|
|
6
|
+
const { data: o, isLoading: c } = p({
|
|
6
7
|
get path() {
|
|
7
8
|
return e.path || "";
|
|
8
9
|
},
|
|
@@ -14,7 +15,7 @@ function g(e) {
|
|
|
14
15
|
}
|
|
15
16
|
}), d = a(() => {
|
|
16
17
|
var r, n, i, t, l, s;
|
|
17
|
-
return e.converTree ?
|
|
18
|
+
return e.converTree ? m(((n = o.value) == null ? void 0 : n.data) || [], {
|
|
18
19
|
idKey: ((i = e.treeOptions) == null ? void 0 : i.valueKey) || "id",
|
|
19
20
|
parentKey: ((t = e.treeOptions) == null ? void 0 : t.parentKey) || "parentId",
|
|
20
21
|
sortKey: ((l = e.treeOptions) == null ? void 0 : l.sortKey) || "sort",
|
|
@@ -22,7 +23,7 @@ function g(e) {
|
|
|
22
23
|
}) : ((r = o.value) == null ? void 0 : r.data) || [];
|
|
23
24
|
}), u = a(() => {
|
|
24
25
|
var r, n;
|
|
25
|
-
return
|
|
26
|
+
return y(d.value, ((r = e.treeOptions) == null ? void 0 : r.valueKey) || "id", ((n = e.treeOptions) == null ? void 0 : n.childrenKey) || "children");
|
|
26
27
|
}), h = a(() => c.value);
|
|
27
28
|
return {
|
|
28
29
|
options: a(() => {
|
|
@@ -37,5 +38,5 @@ function g(e) {
|
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
T as useTree
|
|
41
42
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useClient as o } from "../data.js";
|
|
2
|
-
|
|
3
|
-
const
|
|
2
|
+
function s() {
|
|
3
|
+
const c = o();
|
|
4
4
|
return {
|
|
5
5
|
upload(l, e) {
|
|
6
|
-
const
|
|
6
|
+
const n = e.query || {};
|
|
7
7
|
let a = null;
|
|
8
8
|
if (e.method === "PUT")
|
|
9
9
|
Object.entries(e.params || {}).forEach(([r, t]) => {
|
|
10
|
-
|
|
10
|
+
n[r] = t;
|
|
11
11
|
}), a = l;
|
|
12
12
|
else {
|
|
13
13
|
const r = new FormData();
|
|
@@ -15,9 +15,9 @@ const m = () => {
|
|
|
15
15
|
r.append(t, d);
|
|
16
16
|
}), a = r;
|
|
17
17
|
}
|
|
18
|
-
return
|
|
18
|
+
return c.request({
|
|
19
19
|
...e,
|
|
20
|
-
query:
|
|
20
|
+
query: n,
|
|
21
21
|
method: e.method || "POST",
|
|
22
22
|
payload: a,
|
|
23
23
|
signal: e.signal,
|
|
@@ -25,7 +25,7 @@ const m = () => {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
s as createLocalUploadDriver
|
|
31
31
|
};
|