@dazhicheng/ui 1.6.26 → 1.6.28

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.
@@ -1,7 +1,7 @@
1
- import { useDataPermissionOptions as Z } from "./useDataPermissionOptions.js";
1
+ import { useDataPermissionOptions as ee } from "./useDataPermissionOptions.js";
2
2
  import "axios";
3
- import { ElSelectV2 as $ } from "element-plus";
4
- import { isFunction as q } from "../packages/utils/src/is.js";
3
+ import { ElSelectV2 as oe } from "element-plus";
4
+ import { isArray as S, isFunction as K, isString as te } from "../packages/utils/src/is.js";
5
5
  import "vue";
6
6
  import "dayjs";
7
7
  import "numeral";
@@ -13,338 +13,396 @@ import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
13
13
  import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
14
14
  import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
15
15
  import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
16
- import { omit as v } from "lodash-es";
17
- const U = "all", H = { label: "全部", value: U }, z = [
16
+ import { get as d, omit as ne, set as P } from "lodash-es";
17
+ const j = "all", re = { label: "全部", value: j }, Q = [
18
18
  "platformId",
19
19
  "shopId",
20
20
  "purchasePlaceId",
21
21
  "businessType",
22
22
  "lockUserId",
23
23
  "userId"
24
- ], y = {
24
+ ], se = {
25
25
  platformId: "platformIds",
26
26
  shopId: "shopIds",
27
27
  purchasePlaceId: "purchasePlaceId",
28
28
  businessType: "businessType",
29
29
  lockUserId: "lockUserId"
30
- }, T = {
30
+ }, le = {
31
31
  platformId: "平台",
32
32
  shopId: "店铺",
33
33
  purchasePlaceId: "采购地",
34
34
  businessType: "业务线",
35
35
  lockUserId: "锁单人"
36
36
  };
37
- function k(r) {
38
- return typeof r == "string" && r.toLowerCase() === U.toLowerCase();
37
+ function ie(r, i) {
38
+ return i ? r ? `${r}.${i}` : i : "";
39
39
  }
40
- function O(r) {
41
- return Array.isArray(r) ? r : r == null || r === "" ? [] : [r];
40
+ function D(r) {
41
+ return te(r) && r.toLowerCase() === j.toLowerCase();
42
42
  }
43
- function oo(r = []) {
44
- return [H].concat(r);
43
+ function V(r) {
44
+ return S(r) ? r : r == null || r === "" ? [] : [r];
45
45
  }
46
- function no(r, u, c, A) {
47
- return r ? q(r) ? r(u, c, A) : r : {};
46
+ function ce(r = []) {
47
+ return [re].concat(r);
48
48
  }
49
- function j(r, u, c, A) {
50
- var b;
51
- u == null || u(r);
52
- const I = A(), f = (b = I.values) == null ? void 0 : b[I.fieldName];
53
- c == null || c(f, I);
49
+ function ue(r, i, c, g) {
50
+ return r ? K(r) ? r(i, c, g) : r : {};
54
51
  }
55
- function eo(r = {}, u = z) {
56
- const c = r.scene || "list", A = u.reduce(
57
- (o, e) => {
58
- if (e === "userId") return o;
59
- const n = g(e), t = S(e) === "TtPanelSelect";
60
- return o[e] = t ? !1 : n.showAll ?? !1, o;
52
+ function J(r, i, c, g) {
53
+ i == null || i(r);
54
+ const b = g(), N = d(b.values, b.fieldName);
55
+ c == null || c(N, b);
56
+ }
57
+ function W(r = {}, i = Q, c) {
58
+ const g = r.scene || "list", b = i.reduce(
59
+ (e, t) => {
60
+ if (t === "userId") return e;
61
+ const o = I(t), n = F(t) === "TtPanelSelect";
62
+ return e[t] = n ? !1 : o.showAll ?? !1, e;
61
63
  },
62
64
  {}
63
- ), { dataSource: I } = Z({
64
- codes: u,
65
+ ), { dataSource: N } = c ? { dataSource: c } : ee({
66
+ codes: i,
65
67
  dataSource: r.dataSource,
66
- showAll: A
68
+ showAll: b
67
69
  });
68
- function f(o) {
69
- return g(o).fieldName || y[o];
70
+ function f(e, t = r.basePath) {
71
+ const o = I(e).fieldName || se[e];
72
+ return ie(t, o);
70
73
  }
71
- function b(o) {
72
- return g(o).rules;
74
+ function U(e) {
75
+ return I(e).rules;
73
76
  }
74
- function M(o) {
75
- return g(o).label || T[o];
77
+ function E(e) {
78
+ return I(e).label || le[e];
76
79
  }
77
- function g(o) {
78
- var e;
79
- return ((e = r.fieldConfigs) == null ? void 0 : e[o]) || {};
80
+ function I(e) {
81
+ var t;
82
+ return ((t = r.fieldConfigs) == null ? void 0 : t[e]) || {};
80
83
  }
81
- function P(o) {
82
- return g(o).showAllField ?? U;
84
+ function A(e) {
85
+ return I(e).showAllField ?? j;
83
86
  }
84
- function E(o, e) {
85
- const n = g(o).dependencies;
86
- if (!e) return n;
87
- if (!n) return e;
88
- const t = {
89
- ...e,
90
- ...n
87
+ function $(e, t) {
88
+ const o = I(e).dependencies;
89
+ if (!t) return o;
90
+ if (!o) return t;
91
+ const n = {
92
+ ...t,
93
+ ...o
91
94
  };
92
- if (e && n) {
93
- const l = e.triggerFields, s = n.triggerFields;
94
- t.triggerFields = s ?? l;
95
+ if (t && o) {
96
+ const l = t.triggerFields, s = o.triggerFields;
97
+ n.triggerFields = s ?? l;
95
98
  }
96
- return t;
99
+ return n;
97
100
  }
98
- function S(o) {
99
- return g(o).component || (o === "platformId" || o === "shopId" || o === "purchasePlaceId" ? "TtPanelSelect" : "TtApiComponent");
101
+ function F(e) {
102
+ return I(e).component || (e === "platformId" || e === "shopId" || e === "purchasePlaceId" ? "TtPanelSelect" : "TtApiComponent");
100
103
  }
101
- function F(o) {
102
- return g(o).multiple ?? !0;
104
+ function M(e) {
105
+ return I(e).multiple ?? !0;
103
106
  }
104
- function N(o) {
105
- return I.value[o] || [];
107
+ function R(e) {
108
+ return N.value[e] || [];
106
109
  }
107
- function G(o) {
108
- const e = /* @__PURE__ */ new Map();
109
- return o.forEach((n) => {
110
- const t = n.purchaseInfo, l = (t == null ? void 0 : t.supplierSubType) ?? "其他";
111
- let s = e.get(l);
110
+ function X(e) {
111
+ const t = /* @__PURE__ */ new Map();
112
+ return e.forEach((o) => {
113
+ const n = o.purchaseInfo, l = (n == null ? void 0 : n.supplierSubType) ?? "其他";
114
+ let s = t.get(l);
112
115
  s || (s = {
113
116
  label: String(l),
114
117
  value: l,
115
118
  children: []
116
- }, e.set(l, s)), s.children.push(n);
117
- }), Array.from(e.values());
119
+ }, t.set(l, s)), s.children.push(o);
120
+ }), Array.from(t.values());
118
121
  }
119
- function J(o) {
120
- const e = /* @__PURE__ */ new Map();
121
- return o.forEach((n) => {
122
- const t = n.platformId;
123
- if (t == null) return;
124
- let l = e.get(t);
122
+ function Y(e) {
123
+ const t = /* @__PURE__ */ new Map();
124
+ return e.forEach((o) => {
125
+ const n = o.platformId;
126
+ if (n == null) return;
127
+ let l = t.get(n);
125
128
  l || (l = {
126
- label: String(n.platformName ?? n.platformId),
127
- value: t,
129
+ label: String(o.platformName ?? o.platformId),
130
+ value: n,
128
131
  children: []
129
- }, e.set(t, l)), l.children.push(n);
130
- }), Array.from(e.values());
132
+ }, t.set(n, l)), l.children.push(o);
133
+ }), Array.from(t.values());
131
134
  }
132
- function _(o) {
133
- return o.flatMap((e) => {
134
- const n = e.children;
135
- return n != null && n.length ? _(n) : [e];
135
+ function q(e) {
136
+ return e.flatMap((t) => {
137
+ const o = t.children;
138
+ return o != null && o.length ? q(o) : [t];
136
139
  });
137
140
  }
138
- function K(o, e) {
139
- return O(o).some((n) => n === e || k(n));
141
+ function Z(e, t) {
142
+ return V(e).some((o) => o === t || D(o));
140
143
  }
141
- function Q(o, e) {
142
- const n = f("shopId"), t = F("shopId"), l = P("shopId");
143
- if (c === "action" && w(e)) {
144
- o[n] = t ? [l] : l;
144
+ function H(e, t) {
145
+ const o = f("shopId"), n = M("shopId"), l = A("shopId");
146
+ if (g === "action" && L(t)) {
147
+ P(e, o, n ? [l] : l);
145
148
  return;
146
149
  }
147
- o[n] = t ? [] : void 0;
150
+ P(e, o, n ? [] : void 0);
148
151
  }
149
- function w(o) {
150
- const e = K(o, P("platformId")), n = Array.isArray(o) ? o.length > 1 : !1;
151
- return c === "action" && (e || n);
152
+ function L(e) {
153
+ const t = Z(e, A("platformId")), o = S(e) ? e.length > 1 : !1;
154
+ return g === "action" && (t || o);
152
155
  }
153
- function W(o) {
154
- const e = N("shopId"), n = O(o);
155
- if (!n.length)
156
- return c === "action" ? [] : e;
157
- if (w(o)) return [];
158
- const t = e.filter((s) => n.includes(s.platformId));
159
- return !t.some((s) => s.value === P("shopId") || k(s.value)) || t.length <= 1 ? t : oo(t.filter((s) => s.value !== P("shopId") && !k(s.value)));
156
+ function v(e) {
157
+ const t = R("shopId"), o = V(e);
158
+ if (!o.length)
159
+ return g === "action" ? [] : t;
160
+ if (L(e)) return [];
161
+ const n = t.filter((s) => o.includes(s.platformId));
162
+ return !n.some((s) => s.value === A("shopId") || D(s.value)) || n.length <= 1 ? n : ce(n.filter((s) => s.value !== A("shopId") && !D(s.value)));
160
163
  }
161
- function B(o, e, n, t, l) {
162
- const s = f(o), d = l ? t.filter((i) => {
163
- var h;
164
- return (h = e[s]) == null ? void 0 : h.includes(i.value);
165
- }) || [] : t.find((i) => i.value === e[s]);
164
+ function z(e, t, o, n, l) {
165
+ const s = f(e), p = d(t, s), u = l ? n.filter((m) => S(p) && p.includes(m.value)) : n.find((m) => m.value === p);
166
166
  return {
167
- values: e,
168
- actions: n,
167
+ values: t,
168
+ actions: o,
169
169
  fieldName: s,
170
- dataType: o,
171
- options: t,
172
- currentOption: d
170
+ dataType: e,
171
+ options: n,
172
+ currentOption: u
173
173
  };
174
174
  }
175
- function L(o, e, n, t, l) {
176
- const s = g(o), d = no(s.componentProps, e, n, t), i = F(o), { onChange: h, ...a } = d, m = q(s.customOptions) ? s.customOptions(e, t) : t, p = S(o) === "TtPanelSelect", C = p && o === "shopId" ? J(m) : p && o === "purchasePlaceId" ? G(m) : m, x = p ? _(C) : m;
177
- return p ? {
178
- multiple: i,
179
- showAll: s.showAll ?? (o === "shopId" && c === "action" ? O(e[f("platformId")]).length > 0 : !0),
180
- showAllField: P(o),
181
- showNav: o !== "platformId" && o !== "purchasePlaceId",
182
- showOriginMode: o === "platformId",
183
- showPinyinMode: o !== "shopId" && o !== "purchasePlaceId",
184
- ...a,
185
- options: C,
186
- onChange(R) {
187
- const Y = e[f(o)];
188
- j(
189
- Y,
175
+ function B(e, t, o, n, l) {
176
+ const s = I(e), p = ue(s.componentProps, t, o, n), u = M(e), { onChange: m, ...O } = p, h = K(s.customOptions) ? s.customOptions(t, n) : n, a = F(e) === "TtPanelSelect", w = a && e === "shopId" ? Y(h) : a && e === "purchasePlaceId" ? X(h) : h, C = a ? q(w) : h;
177
+ return a ? {
178
+ multiple: u,
179
+ showAll: s.showAll ?? (e === "shopId" && g === "action" ? V(d(t, f("platformId"))).length > 0 : !0),
180
+ showAllField: A(e),
181
+ showNav: e !== "platformId" && e !== "purchasePlaceId",
182
+ showOriginMode: e === "platformId",
183
+ showPinyinMode: e !== "shopId" && e !== "purchasePlaceId",
184
+ ...O,
185
+ options: w,
186
+ onChange(k) {
187
+ const G = k !== void 0 ? k : d(t, f(e));
188
+ P(t, f(e), G), J(
189
+ G,
190
190
  l,
191
191
  s.onChange,
192
- () => B(o, e, n, x, i)
192
+ () => z(e, t, o, C, u)
193
193
  );
194
194
  }
195
195
  } : {
196
- multiple: i,
197
- component: $,
196
+ multiple: u,
197
+ component: oe,
198
198
  showOriginMode: !1,
199
199
  showPinyinMode: !0,
200
- ...a,
201
- options: m,
202
- onChange(R) {
203
- j(
204
- R,
200
+ ...O,
201
+ options: h,
202
+ onChange(k) {
203
+ J(
204
+ k,
205
205
  l,
206
206
  s.onChange,
207
- () => B(o, e, n, x, i)
207
+ () => z(e, t, o, C, u)
208
208
  );
209
209
  }
210
210
  };
211
211
  }
212
- function V(o) {
213
- const e = f(o);
212
+ function _(e) {
213
+ const t = f(e);
214
214
  return {
215
- component: S(o),
216
- fieldName: e,
217
- label: M(o),
218
- rules: b(o),
219
- dependencies: E(o),
220
- componentProps: (n, t) => {
221
- var a;
222
- const l = N(o), s = f(o), d = F(o), i = P(o), h = ((a = n[s]) == null ? void 0 : a.at(-1)) !== i;
223
- return L(o, n, t, l, (m) => {
224
- if (S(o) !== "TtPanelSelect") {
225
- const p = n[s];
226
- d && (h && O(m).at(-1) === i ? n[s] = [i] : n[s] = p == null ? void 0 : p.filter((C) => C !== i));
215
+ component: F(e),
216
+ fieldName: t,
217
+ label: E(e),
218
+ rules: U(e),
219
+ dependencies: $(e),
220
+ componentProps: (o, n) => {
221
+ const l = R(e), s = f(e), p = M(e), u = A(e), m = d(o, s), O = S(m) ? m.at(-1) !== u : !0;
222
+ return B(e, o, n, l, (h) => {
223
+ if (F(e) !== "TtPanelSelect") {
224
+ const a = d(o, s);
225
+ if (p)
226
+ if (O && V(h).at(-1) === u)
227
+ P(o, s, [u]);
228
+ else {
229
+ const w = S(a) ? a.filter((C) => C !== u) : [];
230
+ P(o, s, w);
231
+ }
227
232
  }
228
233
  });
229
234
  }
230
235
  };
231
236
  }
232
- const D = {
237
+ const x = {
233
238
  // 平台
234
239
  platformId: {
235
- component: S("platformId"),
240
+ component: F("platformId"),
236
241
  fieldName: f("platformId"),
237
- label: M("platformId"),
238
- rules: b("platformId"),
239
- componentProps: (o, e) => {
240
- var h;
241
- const n = "platformId", t = f(n), l = F(n), s = N(n), d = P(n), i = ((h = o[t]) == null ? void 0 : h.at(-1)) !== d;
242
- return L(n, o, e, s, (a) => {
243
- if (S(n) !== "TtPanelSelect") {
244
- const m = o[t];
245
- l && (i && O(a).at(-1) === d ? o[t] = [d] : o[t] = m == null ? void 0 : m.filter((p) => p !== d));
242
+ label: E("platformId"),
243
+ rules: U("platformId"),
244
+ componentProps: (e, t) => {
245
+ const o = "platformId", n = f(o), l = M(o), s = R(o), p = A(o), u = d(e, n), m = S(u) ? u.at(-1) !== p : !0;
246
+ return B(o, e, t, s, (O) => {
247
+ if (F(o) !== "TtPanelSelect") {
248
+ const h = d(e, n);
249
+ if (l)
250
+ if (m && V(O).at(-1) === p)
251
+ P(e, n, [p]);
252
+ else {
253
+ const a = S(h) ? h.filter((w) => w !== p) : [];
254
+ P(e, n, a);
255
+ }
246
256
  }
247
- Q(o, o[t]);
257
+ H(e, d(e, n));
248
258
  });
249
259
  }
250
260
  },
251
261
  // 店铺
252
262
  shopId: {
253
- component: S("shopId"),
263
+ component: F("shopId"),
254
264
  fieldName: f("shopId"),
255
- label: M("shopId"),
256
- componentProps: (o, e) => {
257
- var a;
258
- const n = "shopId", t = f(n), l = o[f("platformId")], s = W(l), d = F(n), i = P(n), h = ((a = o[t]) == null ? void 0 : a.at(-1)) !== i;
259
- return L(n, o, e, s, (m) => {
260
- if (S(n) !== "TtPanelSelect") {
261
- const p = o[t];
262
- d && (h && O(m).at(-1) === i ? o[t] = [i] : o[t] = p == null ? void 0 : p.filter((C) => C !== i));
265
+ label: E("shopId"),
266
+ componentProps: (e, t) => {
267
+ const o = "shopId", n = f(o), l = d(e, f("platformId")), s = v(l), p = M(o), u = A(o), m = d(e, n), O = S(m) ? m.at(-1) !== u : !0;
268
+ return B(o, e, t, s, (h) => {
269
+ if (F(o) !== "TtPanelSelect") {
270
+ const a = d(e, n);
271
+ if (p)
272
+ if (O && V(h).at(-1) === u)
273
+ P(e, n, [u]);
274
+ else {
275
+ const w = S(a) ? a.filter((C) => C !== u) : [];
276
+ P(e, n, w);
277
+ }
263
278
  }
264
279
  });
265
280
  },
266
- dependencies: E("shopId", {
281
+ dependencies: $("shopId", {
267
282
  triggerFields: [f("platformId")],
268
- disabled(o) {
269
- return w(o[f("platformId")]);
283
+ disabled(e) {
284
+ return L(d(e, f("platformId")));
270
285
  },
271
- rules(o) {
272
- return w(o[f("platformId")]) ? null : b("shopId") || null;
286
+ rules(e) {
287
+ return L(d(e, f("platformId"))) ? null : U("shopId") || null;
273
288
  }
274
289
  })
275
290
  },
276
- purchasePlaceId: V("purchasePlaceId"),
277
- businessType: V("businessType"),
278
- lockUserId: V("lockUserId")
291
+ purchasePlaceId: _("purchasePlaceId"),
292
+ businessType: _("businessType"),
293
+ lockUserId: _("lockUserId")
279
294
  };
280
- function X() {
281
- return Object.keys(D).reduce(
282
- (o, e) => {
295
+ function T() {
296
+ return Object.keys(x).reduce(
297
+ (e, t) => {
283
298
  var l;
284
- const n = D[e], t = (l = r.fieldConfigs) == null ? void 0 : l[e];
285
- return o[e] = {
286
- ...n,
287
- ...v(t, ["componentProps", "rules"])
288
- }, o;
299
+ const o = x[t], n = (l = r.fieldConfigs) == null ? void 0 : l[t];
300
+ return e[t] = {
301
+ ...o,
302
+ ...ne(n, ["componentProps", "rules", "fieldName"]),
303
+ fieldName: o.fieldName
304
+ }, e;
305
+ },
306
+ {}
307
+ );
308
+ }
309
+ function y(e) {
310
+ const t = W(
311
+ {
312
+ ...r,
313
+ basePath: e
289
314
  },
315
+ i,
316
+ N
317
+ );
318
+ return Object.keys(x).reduce(
319
+ (o, n) => (o[n] = t[n], o),
290
320
  {}
291
321
  );
292
322
  }
293
323
  return {
294
- ...X(),
295
- dataSource: I
324
+ ...T(),
325
+ dataSource: N,
326
+ createRowSchemas: y
296
327
  };
297
328
  }
298
- function Ao() {
329
+ function Ve() {
299
330
  const r = {
300
331
  options: {},
301
- codes: [...z]
302
- }, u = {
332
+ codes: [...Q]
333
+ }, i = {
303
334
  /**
304
335
  * @description 渲染查询场景
305
336
  */
306
337
  list() {
307
- return r.options.scene = "list", u;
338
+ return r.options.scene = "list", i;
308
339
  },
309
340
  /**
310
341
  * @description 渲染新增编辑场景
311
342
  */
312
343
  action() {
313
- return r.options.scene = "action", u;
344
+ return r.options.scene = "action", i;
314
345
  },
315
346
  /**
316
- * @param scene 场景值 list为查询 action为新增编辑等操作
347
+ * @param scene - 场景值,list 为查询筛选,action 为新增编辑等操作
317
348
  * @returns FormSchemasLinkBuilder
318
349
  */
319
350
  scene(c) {
320
- return r.options.scene = c, u;
351
+ return r.options.scene = c, i;
321
352
  },
322
353
  /**
323
- * @param codes 接口请求所需要的入参,需要什么数据源就传什么入参
354
+ * @param basePath - 字段路径前缀,例如 "items[0]" 或 "condition"
355
+ * @returns FormSchemasLinkBuilder
356
+ */
357
+ basePath(c) {
358
+ return r.options.basePath = c, i;
359
+ },
360
+ /**
361
+ * @param codes - 接口请求所需要的数据权限维度 code 列表
324
362
  * @returns FormSchemasLinkBuilder
325
363
  */
326
364
  codes(c) {
327
- return r.codes = [...c], u;
365
+ return r.codes = [...c], i;
328
366
  },
367
+ /**
368
+ * @param dataSource - 外部自定义数据源
369
+ * @returns FormSchemasLinkBuilder
370
+ */
329
371
  dataSource(c) {
330
- return r.options.dataSource = c, u;
372
+ return r.options.dataSource = c, i;
331
373
  },
332
- field(c, A) {
333
- var I;
374
+ /**
375
+ * @param dataType - 待配置的数据类型维度
376
+ * @param config - 字段自定义配置
377
+ * @returns FormSchemasLinkBuilder
378
+ */
379
+ field(c, g) {
380
+ var b;
334
381
  return r.options.fieldConfigs = {
335
382
  ...r.options.fieldConfigs,
336
383
  [c]: {
337
- ...((I = r.options.fieldConfigs) == null ? void 0 : I[c]) || {},
338
- ...A
384
+ ...((b = r.options.fieldConfigs) == null ? void 0 : b[c]) || {},
385
+ ...g
339
386
  }
340
- }, u;
387
+ }, i;
341
388
  },
389
+ /**
390
+ * @description 执行构建并返回字段 schema 映射及数据源
391
+ * @returns UseFormSchemasLinkResult
392
+ */
342
393
  build() {
343
- return eo(r.options, r.codes);
394
+ return W(r.options, r.codes);
395
+ },
396
+ /**
397
+ * @param itemPath - 数组行路径(如 "tableData[0]")
398
+ * @returns 该行对应的表单 schema 映射
399
+ */
400
+ createRowSchemas(c) {
401
+ return i.build().createRowSchemas(c);
344
402
  }
345
403
  };
346
- return u;
404
+ return i;
347
405
  }
348
406
  export {
349
- Ao as useFormSchemasLink
407
+ Ve as useFormSchemasLink
350
408
  };
@@ -1,13 +1,15 @@
1
1
  import { Component, VNode, MaybeRefOrGetter } from 'vue';
2
2
  import { ComponentCaptureOptions, ElementScreenshotOptions, ScreenshotTarget } from '../../../hooks/src';
3
- import { OssSignatureResult } from '../components/tt-upload/src/typing';
3
+ import { OssType, UnifiedOssSignatureResult } from '../components/tt-upload/src/typing';
4
4
  export interface ScreenshotOssOptions extends ElementScreenshotOptions {
5
+ /** 云存储类型,默认 huawei */
6
+ ossType?: OssType;
5
7
  /** OSS 目录前缀,不传则使用签名接口返回的 dir 或 notice */
6
8
  ossDir?: string;
7
9
  /** 上传文件名,默认 screenshot-{timestamp}.png / .jpg */
8
10
  fileName?: string;
9
- /** 获取 OSS 签名,不传则使用全局 setup 的 uploadOssApi */
10
- uploadOssApi?: (file: File) => Promise<OssSignatureResult>;
11
+ /** 获取 OSS 签名,不传则使用全局 setup 的 uploadOssApi 或默认华为云签名接口 */
12
+ uploadOssApi?: (file?: any) => Promise<UnifiedOssSignatureResult | any>;
11
13
  }
12
14
  export interface ScreenshotOssResult {
13
15
  blob: Blob;