@huyooo/ui 0.4.6 → 0.4.8

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.
@@ -0,0 +1,1731 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ /* empty css */
4
+ import { defineComponent as D, createElementBlock as R, openBlock as k, normalizeStyle as re, normalizeClass as Ce, createElementVNode as B, computed as J, ref as L, createBlock as U, unref as p, withCtx as h, createVNode as I, createCommentVNode as q, Fragment as W, createTextVNode as O, toDisplayString as M, h as ve, onUnmounted as je, renderList as we, nextTick as Z } from "vue";
5
+ import { Message as Ie, Space as Ee, Image as Ae, Avatar as $e, Descriptions as Me, DescriptionsItem as se, Tag as te, Spin as Le, Button as fe, Form as ze, FormItem as ue, Input as Ve, Select as We, Option as He, Textarea as Ye, Breadcrumb as Ke, BreadcrumbItem as ge, Modal as Ge, Drawer as Xe } from "@arco-design/web-vue";
6
+ import { M as Ze } from "./Menu-2SePYCYT.js";
7
+ /* empty css */
8
+ /* empty css */
9
+ /* empty css */
10
+ /* empty css */
11
+ /* empty css */
12
+ import { api as G } from "@huyooo/api";
13
+ /* empty css */
14
+ /* empty css */
15
+ import { r as Je, a as Qe, u as et } from "./useUploadCos-DpOqkozy.js";
16
+ import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
+ /* empty css */
18
+ import { f as ne, C as tt } from "./CustomTable-Cd6RiAPX.js";
19
+ import { useIntersectionObserver as nt } from "@vueuse/core";
20
+ import { Bubble as Te, Prompts as rt, Sender as ot } from "ant-design-x-vue";
21
+ import { Icon as Ue } from "@iconify/vue";
22
+ import { c as at, g as it } from "./_commonjsHelpers-DaMA6jEr.js";
23
+ import { _ as Fe, g as Re, i as Oe } from "./plugin-vue_export-helper-LjDO2Zua.js";
24
+ const lt = D({
25
+ name: "IconExclamationCircle",
26
+ props: {
27
+ size: {
28
+ type: [Number, String]
29
+ },
30
+ strokeWidth: {
31
+ type: Number,
32
+ default: 4
33
+ },
34
+ strokeLinecap: {
35
+ type: String,
36
+ default: "butt",
37
+ validator: (e) => ["butt", "round", "square"].includes(e)
38
+ },
39
+ strokeLinejoin: {
40
+ type: String,
41
+ default: "miter",
42
+ validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
43
+ },
44
+ rotate: Number,
45
+ spin: Boolean
46
+ },
47
+ emits: {
48
+ click: (e) => !0
49
+ },
50
+ setup(e, {
51
+ emit: u
52
+ }) {
53
+ const r = Re("icon"), s = J(() => [r, `${r}-exclamation-circle`, {
54
+ [`${r}-spin`]: e.spin
55
+ }]), y = J(() => {
56
+ const n = {};
57
+ return e.size && (n.fontSize = Oe(e.size) ? `${e.size}px` : e.size), e.rotate && (n.transform = `rotate(${e.rotate}deg)`), n;
58
+ });
59
+ return {
60
+ cls: s,
61
+ innerStyle: y,
62
+ onClick: (n) => {
63
+ u("click", n);
64
+ }
65
+ };
66
+ }
67
+ }), st = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
68
+ function ut(e, u, r, s, y, a) {
69
+ return k(), R("svg", {
70
+ viewBox: "0 0 48 48",
71
+ fill: "none",
72
+ xmlns: "http://www.w3.org/2000/svg",
73
+ stroke: "currentColor",
74
+ class: Ce(e.cls),
75
+ style: re(e.innerStyle),
76
+ "stroke-width": e.strokeWidth,
77
+ "stroke-linecap": e.strokeLinecap,
78
+ "stroke-linejoin": e.strokeLinejoin,
79
+ onClick: u[0] || (u[0] = (...n) => e.onClick && e.onClick(...n))
80
+ }, u[1] || (u[1] = [B("path", {
81
+ d: "M24 28V14m0 16v4M6 24c0-9.941 8.059-18 18-18s18 8.059 18 18-8.059 18-18 18S6 33.941 6 24Z"
82
+ }, null, -1)]), 14, st);
83
+ }
84
+ var ce = /* @__PURE__ */ Fe(lt, [["render", ut]]);
85
+ const be = Object.assign(ce, {
86
+ install: (e, u) => {
87
+ var r;
88
+ const s = (r = u == null ? void 0 : u.iconPrefix) != null ? r : "";
89
+ e.component(s + ce.name, ce);
90
+ }
91
+ }), ct = D({
92
+ name: "IconLink",
93
+ props: {
94
+ size: {
95
+ type: [Number, String]
96
+ },
97
+ strokeWidth: {
98
+ type: Number,
99
+ default: 4
100
+ },
101
+ strokeLinecap: {
102
+ type: String,
103
+ default: "butt",
104
+ validator: (e) => ["butt", "round", "square"].includes(e)
105
+ },
106
+ strokeLinejoin: {
107
+ type: String,
108
+ default: "miter",
109
+ validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
110
+ },
111
+ rotate: Number,
112
+ spin: Boolean
113
+ },
114
+ emits: {
115
+ click: (e) => !0
116
+ },
117
+ setup(e, {
118
+ emit: u
119
+ }) {
120
+ const r = Re("icon"), s = J(() => [r, `${r}-link`, {
121
+ [`${r}-spin`]: e.spin
122
+ }]), y = J(() => {
123
+ const n = {};
124
+ return e.size && (n.fontSize = Oe(e.size) ? `${e.size}px` : e.size), e.rotate && (n.transform = `rotate(${e.rotate}deg)`), n;
125
+ });
126
+ return {
127
+ cls: s,
128
+ innerStyle: y,
129
+ onClick: (n) => {
130
+ u("click", n);
131
+ }
132
+ };
133
+ }
134
+ }), dt = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
135
+ function ft(e, u, r, s, y, a) {
136
+ return k(), R("svg", {
137
+ viewBox: "0 0 48 48",
138
+ fill: "none",
139
+ xmlns: "http://www.w3.org/2000/svg",
140
+ stroke: "currentColor",
141
+ class: Ce(e.cls),
142
+ style: re(e.innerStyle),
143
+ "stroke-width": e.strokeWidth,
144
+ "stroke-linecap": e.strokeLinecap,
145
+ "stroke-linejoin": e.strokeLinejoin,
146
+ onClick: u[0] || (u[0] = (...n) => e.onClick && e.onClick(...n))
147
+ }, u[1] || (u[1] = [B("path", {
148
+ d: "m14.1 25.414-4.95 4.95a6 6 0 0 0 8.486 8.485l8.485-8.485a6 6 0 0 0 0-8.485m7.779.707 4.95-4.95a6 6 0 1 0-8.486-8.485l-8.485 8.485a6 6 0 0 0 0 8.485"
149
+ }, null, -1)]), 14, dt);
150
+ }
151
+ var de = /* @__PURE__ */ Fe(ct, [["render", ft]]);
152
+ const pt = Object.assign(de, {
153
+ install: (e, u) => {
154
+ var r;
155
+ const s = (r = u == null ? void 0 : u.iconPrefix) != null ? r : "";
156
+ e.component(s + de.name, de);
157
+ }
158
+ }), yt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), he = {
159
+ randomUUID: yt
160
+ };
161
+ function ke(e, u, r) {
162
+ var y;
163
+ if (he.randomUUID && !e)
164
+ return he.randomUUID();
165
+ e = e || {};
166
+ const s = e.random ?? ((y = e.rng) == null ? void 0 : y.call(e)) ?? Je();
167
+ if (s.length < 16)
168
+ throw new Error("Random bytes length must be >= 16");
169
+ return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Qe(s);
170
+ }
171
+ var qe = { exports: {} };
172
+ /*!
173
+ * clipboard.js v2.0.11
174
+ * https://clipboardjs.com/
175
+ *
176
+ * Licensed MIT © Zeno Rocha
177
+ */
178
+ (function(e, u) {
179
+ (function(s, y) {
180
+ e.exports = y();
181
+ })(at, function() {
182
+ return (
183
+ /******/
184
+ function() {
185
+ var r = {
186
+ /***/
187
+ 686: (
188
+ /***/
189
+ function(a, n, t) {
190
+ t.d(n, {
191
+ default: function() {
192
+ return (
193
+ /* binding */
194
+ Pe
195
+ );
196
+ }
197
+ });
198
+ var o = t(279), f = /* @__PURE__ */ t.n(o), c = t(370), C = /* @__PURE__ */ t.n(c), E = t(817), T = /* @__PURE__ */ t.n(E);
199
+ function _(g) {
200
+ try {
201
+ return document.execCommand(g);
202
+ } catch {
203
+ return !1;
204
+ }
205
+ }
206
+ var S = function(l) {
207
+ var i = T()(l);
208
+ return _("cut"), i;
209
+ }, d = S;
210
+ function A(g) {
211
+ var l = document.documentElement.getAttribute("dir") === "rtl", i = document.createElement("textarea");
212
+ i.style.fontSize = "12pt", i.style.border = "0", i.style.padding = "0", i.style.margin = "0", i.style.position = "absolute", i.style[l ? "right" : "left"] = "-9999px";
213
+ var m = window.pageYOffset || document.documentElement.scrollTop;
214
+ return i.style.top = "".concat(m, "px"), i.setAttribute("readonly", ""), i.value = g, i;
215
+ }
216
+ var F = function(l, i) {
217
+ var m = A(l);
218
+ i.container.appendChild(m);
219
+ var v = T()(m);
220
+ return _("copy"), m.remove(), v;
221
+ }, oe = function(l) {
222
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
223
+ container: document.body
224
+ }, m = "";
225
+ return typeof l == "string" ? m = F(l, i) : l instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(l == null ? void 0 : l.type) ? m = F(l.value, i) : (m = T()(l), _("copy")), m;
226
+ }, X = oe;
227
+ function Y(g) {
228
+ "@babel/helpers - typeof";
229
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Y = function(i) {
230
+ return typeof i;
231
+ } : Y = function(i) {
232
+ return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
233
+ }, Y(g);
234
+ }
235
+ var ae = function() {
236
+ var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = l.action, m = i === void 0 ? "copy" : i, v = l.container, w = l.target, N = l.text;
237
+ if (m !== "copy" && m !== "cut")
238
+ throw new Error('Invalid "action" value, use either "copy" or "cut"');
239
+ if (w !== void 0)
240
+ if (w && Y(w) === "object" && w.nodeType === 1) {
241
+ if (m === "copy" && w.hasAttribute("disabled"))
242
+ throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
243
+ if (m === "cut" && (w.hasAttribute("readonly") || w.hasAttribute("disabled")))
244
+ throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);
245
+ } else
246
+ throw new Error('Invalid "target" value, use a valid Element');
247
+ if (N)
248
+ return X(N, {
249
+ container: v
250
+ });
251
+ if (w)
252
+ return m === "cut" ? d(w) : X(w, {
253
+ container: v
254
+ });
255
+ }, b = ae;
256
+ function $(g) {
257
+ "@babel/helpers - typeof";
258
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? $ = function(i) {
259
+ return typeof i;
260
+ } : $ = function(i) {
261
+ return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
262
+ }, $(g);
263
+ }
264
+ function x(g, l) {
265
+ if (!(g instanceof l))
266
+ throw new TypeError("Cannot call a class as a function");
267
+ }
268
+ function P(g, l) {
269
+ for (var i = 0; i < l.length; i++) {
270
+ var m = l[i];
271
+ m.enumerable = m.enumerable || !1, m.configurable = !0, "value" in m && (m.writable = !0), Object.defineProperty(g, m.key, m);
272
+ }
273
+ }
274
+ function j(g, l, i) {
275
+ return l && P(g.prototype, l), i && P(g, i), g;
276
+ }
277
+ function Q(g, l) {
278
+ if (typeof l != "function" && l !== null)
279
+ throw new TypeError("Super expression must either be null or a function");
280
+ g.prototype = Object.create(l && l.prototype, {
281
+ constructor: {
282
+ value: g,
283
+ writable: !0,
284
+ configurable: !0
285
+ }
286
+ }), l && z(g, l);
287
+ }
288
+ function z(g, l) {
289
+ return z = Object.setPrototypeOf || function(m, v) {
290
+ return m.__proto__ = v, m;
291
+ }, z(g, l);
292
+ }
293
+ function ye(g) {
294
+ var l = le();
295
+ return function() {
296
+ var m = K(g), v;
297
+ if (l) {
298
+ var w = K(this).constructor;
299
+ v = Reflect.construct(m, arguments, w);
300
+ } else
301
+ v = m.apply(this, arguments);
302
+ return ie(this, v);
303
+ };
304
+ }
305
+ function ie(g, l) {
306
+ return l && ($(l) === "object" || typeof l == "function") ? l : me(g);
307
+ }
308
+ function me(g) {
309
+ if (g === void 0)
310
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
311
+ return g;
312
+ }
313
+ function le() {
314
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
315
+ if (typeof Proxy == "function") return !0;
316
+ try {
317
+ return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
318
+ })), !0;
319
+ } catch {
320
+ return !1;
321
+ }
322
+ }
323
+ function K(g) {
324
+ return K = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) {
325
+ return i.__proto__ || Object.getPrototypeOf(i);
326
+ }, K(g);
327
+ }
328
+ function V(g, l) {
329
+ var i = "data-clipboard-".concat(g);
330
+ if (l.hasAttribute(i))
331
+ return l.getAttribute(i);
332
+ }
333
+ var De = /* @__PURE__ */ function(g) {
334
+ Q(i, g);
335
+ var l = ye(i);
336
+ function i(m, v) {
337
+ var w;
338
+ return x(this, i), w = l.call(this), w.resolveOptions(v), w.listenClick(m), w;
339
+ }
340
+ return j(i, [{
341
+ key: "resolveOptions",
342
+ value: function() {
343
+ var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
344
+ this.action = typeof v.action == "function" ? v.action : this.defaultAction, this.target = typeof v.target == "function" ? v.target : this.defaultTarget, this.text = typeof v.text == "function" ? v.text : this.defaultText, this.container = $(v.container) === "object" ? v.container : document.body;
345
+ }
346
+ /**
347
+ * Adds a click event listener to the passed trigger.
348
+ * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
349
+ */
350
+ }, {
351
+ key: "listenClick",
352
+ value: function(v) {
353
+ var w = this;
354
+ this.listener = C()(v, "click", function(N) {
355
+ return w.onClick(N);
356
+ });
357
+ }
358
+ /**
359
+ * Defines a new `ClipboardAction` on each click event.
360
+ * @param {Event} e
361
+ */
362
+ }, {
363
+ key: "onClick",
364
+ value: function(v) {
365
+ var w = v.delegateTarget || v.currentTarget, N = this.action(w) || "copy", ee = b({
366
+ action: N,
367
+ container: this.container,
368
+ target: this.target(w),
369
+ text: this.text(w)
370
+ });
371
+ this.emit(ee ? "success" : "error", {
372
+ action: N,
373
+ text: ee,
374
+ trigger: w,
375
+ clearSelection: function() {
376
+ w && w.focus(), window.getSelection().removeAllRanges();
377
+ }
378
+ });
379
+ }
380
+ /**
381
+ * Default `action` lookup function.
382
+ * @param {Element} trigger
383
+ */
384
+ }, {
385
+ key: "defaultAction",
386
+ value: function(v) {
387
+ return V("action", v);
388
+ }
389
+ /**
390
+ * Default `target` lookup function.
391
+ * @param {Element} trigger
392
+ */
393
+ }, {
394
+ key: "defaultTarget",
395
+ value: function(v) {
396
+ var w = V("target", v);
397
+ if (w)
398
+ return document.querySelector(w);
399
+ }
400
+ /**
401
+ * Allow fire programmatically a copy action
402
+ * @param {String|HTMLElement} target
403
+ * @param {Object} options
404
+ * @returns Text copied.
405
+ */
406
+ }, {
407
+ key: "defaultText",
408
+ /**
409
+ * Default `text` lookup function.
410
+ * @param {Element} trigger
411
+ */
412
+ value: function(v) {
413
+ return V("text", v);
414
+ }
415
+ /**
416
+ * Destroy lifecycle.
417
+ */
418
+ }, {
419
+ key: "destroy",
420
+ value: function() {
421
+ this.listener.destroy();
422
+ }
423
+ }], [{
424
+ key: "copy",
425
+ value: function(v) {
426
+ var w = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
427
+ container: document.body
428
+ };
429
+ return X(v, w);
430
+ }
431
+ /**
432
+ * Allow fire programmatically a cut action
433
+ * @param {String|HTMLElement} target
434
+ * @returns Text cutted.
435
+ */
436
+ }, {
437
+ key: "cut",
438
+ value: function(v) {
439
+ return d(v);
440
+ }
441
+ /**
442
+ * Returns the support of the given action, or all actions if no action is
443
+ * given.
444
+ * @param {String} [action]
445
+ */
446
+ }, {
447
+ key: "isSupported",
448
+ value: function() {
449
+ var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["copy", "cut"], w = typeof v == "string" ? [v] : v, N = !!document.queryCommandSupported;
450
+ return w.forEach(function(ee) {
451
+ N = N && !!document.queryCommandSupported(ee);
452
+ }), N;
453
+ }
454
+ }]), i;
455
+ }(f()), Pe = De;
456
+ }
457
+ ),
458
+ /***/
459
+ 828: (
460
+ /***/
461
+ function(a) {
462
+ var n = 9;
463
+ if (typeof Element < "u" && !Element.prototype.matches) {
464
+ var t = Element.prototype;
465
+ t.matches = t.matchesSelector || t.mozMatchesSelector || t.msMatchesSelector || t.oMatchesSelector || t.webkitMatchesSelector;
466
+ }
467
+ function o(f, c) {
468
+ for (; f && f.nodeType !== n; ) {
469
+ if (typeof f.matches == "function" && f.matches(c))
470
+ return f;
471
+ f = f.parentNode;
472
+ }
473
+ }
474
+ a.exports = o;
475
+ }
476
+ ),
477
+ /***/
478
+ 438: (
479
+ /***/
480
+ function(a, n, t) {
481
+ var o = t(828);
482
+ function f(E, T, _, S, d) {
483
+ var A = C.apply(this, arguments);
484
+ return E.addEventListener(_, A, d), {
485
+ destroy: function() {
486
+ E.removeEventListener(_, A, d);
487
+ }
488
+ };
489
+ }
490
+ function c(E, T, _, S, d) {
491
+ return typeof E.addEventListener == "function" ? f.apply(null, arguments) : typeof _ == "function" ? f.bind(null, document).apply(null, arguments) : (typeof E == "string" && (E = document.querySelectorAll(E)), Array.prototype.map.call(E, function(A) {
492
+ return f(A, T, _, S, d);
493
+ }));
494
+ }
495
+ function C(E, T, _, S) {
496
+ return function(d) {
497
+ d.delegateTarget = o(d.target, T), d.delegateTarget && S.call(E, d);
498
+ };
499
+ }
500
+ a.exports = c;
501
+ }
502
+ ),
503
+ /***/
504
+ 879: (
505
+ /***/
506
+ function(a, n) {
507
+ n.node = function(t) {
508
+ return t !== void 0 && t instanceof HTMLElement && t.nodeType === 1;
509
+ }, n.nodeList = function(t) {
510
+ var o = Object.prototype.toString.call(t);
511
+ return t !== void 0 && (o === "[object NodeList]" || o === "[object HTMLCollection]") && "length" in t && (t.length === 0 || n.node(t[0]));
512
+ }, n.string = function(t) {
513
+ return typeof t == "string" || t instanceof String;
514
+ }, n.fn = function(t) {
515
+ var o = Object.prototype.toString.call(t);
516
+ return o === "[object Function]";
517
+ };
518
+ }
519
+ ),
520
+ /***/
521
+ 370: (
522
+ /***/
523
+ function(a, n, t) {
524
+ var o = t(879), f = t(438);
525
+ function c(_, S, d) {
526
+ if (!_ && !S && !d)
527
+ throw new Error("Missing required arguments");
528
+ if (!o.string(S))
529
+ throw new TypeError("Second argument must be a String");
530
+ if (!o.fn(d))
531
+ throw new TypeError("Third argument must be a Function");
532
+ if (o.node(_))
533
+ return C(_, S, d);
534
+ if (o.nodeList(_))
535
+ return E(_, S, d);
536
+ if (o.string(_))
537
+ return T(_, S, d);
538
+ throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
539
+ }
540
+ function C(_, S, d) {
541
+ return _.addEventListener(S, d), {
542
+ destroy: function() {
543
+ _.removeEventListener(S, d);
544
+ }
545
+ };
546
+ }
547
+ function E(_, S, d) {
548
+ return Array.prototype.forEach.call(_, function(A) {
549
+ A.addEventListener(S, d);
550
+ }), {
551
+ destroy: function() {
552
+ Array.prototype.forEach.call(_, function(A) {
553
+ A.removeEventListener(S, d);
554
+ });
555
+ }
556
+ };
557
+ }
558
+ function T(_, S, d) {
559
+ return f(document.body, _, S, d);
560
+ }
561
+ a.exports = c;
562
+ }
563
+ ),
564
+ /***/
565
+ 817: (
566
+ /***/
567
+ function(a) {
568
+ function n(t) {
569
+ var o;
570
+ if (t.nodeName === "SELECT")
571
+ t.focus(), o = t.value;
572
+ else if (t.nodeName === "INPUT" || t.nodeName === "TEXTAREA") {
573
+ var f = t.hasAttribute("readonly");
574
+ f || t.setAttribute("readonly", ""), t.select(), t.setSelectionRange(0, t.value.length), f || t.removeAttribute("readonly"), o = t.value;
575
+ } else {
576
+ t.hasAttribute("contenteditable") && t.focus();
577
+ var c = window.getSelection(), C = document.createRange();
578
+ C.selectNodeContents(t), c.removeAllRanges(), c.addRange(C), o = c.toString();
579
+ }
580
+ return o;
581
+ }
582
+ a.exports = n;
583
+ }
584
+ ),
585
+ /***/
586
+ 279: (
587
+ /***/
588
+ function(a) {
589
+ function n() {
590
+ }
591
+ n.prototype = {
592
+ on: function(t, o, f) {
593
+ var c = this.e || (this.e = {});
594
+ return (c[t] || (c[t] = [])).push({
595
+ fn: o,
596
+ ctx: f
597
+ }), this;
598
+ },
599
+ once: function(t, o, f) {
600
+ var c = this;
601
+ function C() {
602
+ c.off(t, C), o.apply(f, arguments);
603
+ }
604
+ return C._ = o, this.on(t, C, f);
605
+ },
606
+ emit: function(t) {
607
+ var o = [].slice.call(arguments, 1), f = ((this.e || (this.e = {}))[t] || []).slice(), c = 0, C = f.length;
608
+ for (c; c < C; c++)
609
+ f[c].fn.apply(f[c].ctx, o);
610
+ return this;
611
+ },
612
+ off: function(t, o) {
613
+ var f = this.e || (this.e = {}), c = f[t], C = [];
614
+ if (c && o)
615
+ for (var E = 0, T = c.length; E < T; E++)
616
+ c[E].fn !== o && c[E].fn._ !== o && C.push(c[E]);
617
+ return C.length ? f[t] = C : delete f[t], this;
618
+ }
619
+ }, a.exports = n, a.exports.TinyEmitter = n;
620
+ }
621
+ )
622
+ /******/
623
+ }, s = {};
624
+ function y(a) {
625
+ if (s[a])
626
+ return s[a].exports;
627
+ var n = s[a] = {
628
+ /******/
629
+ // no module.id needed
630
+ /******/
631
+ // no module.loaded needed
632
+ /******/
633
+ exports: {}
634
+ /******/
635
+ };
636
+ return r[a](n, n.exports, y), n.exports;
637
+ }
638
+ return function() {
639
+ y.n = function(a) {
640
+ var n = a && a.__esModule ? (
641
+ /******/
642
+ function() {
643
+ return a.default;
644
+ }
645
+ ) : (
646
+ /******/
647
+ function() {
648
+ return a;
649
+ }
650
+ );
651
+ return y.d(n, {
652
+ a: n
653
+ }), n;
654
+ };
655
+ }(), function() {
656
+ y.d = function(a, n) {
657
+ for (var t in n)
658
+ y.o(n, t) && !y.o(a, t) && Object.defineProperty(a, t, {
659
+ enumerable: !0,
660
+ get: n[t]
661
+ });
662
+ };
663
+ }(), function() {
664
+ y.o = function(a, n) {
665
+ return Object.prototype.hasOwnProperty.call(a, n);
666
+ };
667
+ }(), y(686);
668
+ }().default
669
+ );
670
+ });
671
+ })(qe);
672
+ var mt = qe.exports;
673
+ const vt = /* @__PURE__ */ it(mt), gt = (e) => ({
674
+ toClipboard(u, r) {
675
+ return new Promise((s, y) => {
676
+ const a = document.createElement("button"), n = new vt(a, {
677
+ text: () => u,
678
+ action: () => "copy",
679
+ container: r !== void 0 ? r : document.body
680
+ });
681
+ n.on("success", (t) => {
682
+ n.destroy(), s(t);
683
+ }), n.on("error", (t) => {
684
+ n.destroy(), y(t);
685
+ }), document.body.appendChild(a), a.click(), document.body.removeChild(a);
686
+ });
687
+ }
688
+ }), bt = /* @__PURE__ */ D({
689
+ __name: "FeedbackClipboard",
690
+ props: {
691
+ value: {
692
+ type: String,
693
+ required: !0
694
+ },
695
+ message: {
696
+ type: String,
697
+ required: !1,
698
+ default: () => ""
699
+ }
700
+ },
701
+ setup(e) {
702
+ const u = e, r = L(!1), {
703
+ toClipboard: s
704
+ } = gt();
705
+ async function y() {
706
+ try {
707
+ await s(u.value), Ie.success(u.message || "复制成功"), r.value = !0;
708
+ } catch (a) {
709
+ console.error(a);
710
+ }
711
+ }
712
+ return (a, n) => (k(), U(p(Ue), {
713
+ class: "icon",
714
+ icon: "mingcute:copy-2-line",
715
+ onClick: y
716
+ }));
717
+ }
718
+ }), Ne = /* @__PURE__ */ H(bt, [["__scopeId", "data-v-fd869964"]]), ht = /* @__PURE__ */ D({
719
+ __name: "FeedbackRefresh",
720
+ setup(e) {
721
+ return (u, r) => (k(), U(p(Ue), {
722
+ class: "icon",
723
+ icon: "mingcute:refresh-2-line"
724
+ }));
725
+ }
726
+ }), kt = /* @__PURE__ */ H(ht, [["__scopeId", "data-v-a03acfef"]]), _t = ["src"], _e = /* @__PURE__ */ D({
727
+ __name: "FeedbackBubbleEnd",
728
+ props: {
729
+ value: {
730
+ type: String,
731
+ required: !1,
732
+ default: ""
733
+ },
734
+ type: {
735
+ type: String,
736
+ default: "text",
737
+ validator: (e) => ["text", "image"].includes(e)
738
+ },
739
+ avatarUrl: {
740
+ type: String,
741
+ default: "A"
742
+ },
743
+ bubbleStyle: {
744
+ type: Object,
745
+ default: () => ({
746
+ paddingLeft: "52px"
747
+ })
748
+ },
749
+ showRefresh: {
750
+ type: Boolean,
751
+ default: !1
752
+ },
753
+ showClipboard: {
754
+ type: Boolean,
755
+ default: !1
756
+ }
757
+ },
758
+ emits: ["refresh"],
759
+ setup(e, {
760
+ emit: u
761
+ }) {
762
+ const r = e, s = u;
763
+ function y() {
764
+ s("refresh");
765
+ }
766
+ return (a, n) => (k(), U(p(Te), {
767
+ placement: "end",
768
+ style: re(r.bubbleStyle),
769
+ styles: {
770
+ content: {
771
+ padding: r.type === "image" ? "0px" : void 0
772
+ }
773
+ }
774
+ }, {
775
+ avatar: h(() => [I(p($e), null, {
776
+ default: h(() => [B("img", {
777
+ alt: "avatar",
778
+ src: r.avatarUrl
779
+ }, null, 8, _t)]),
780
+ _: 1
781
+ })]),
782
+ message: h(() => [r.type === "text" ? (k(), R(W, {
783
+ key: 0
784
+ }, [O(M(r.value), 1)], 64)) : r.type === "image" ? (k(), U(p(Ae), {
785
+ key: 1,
786
+ width: "100",
787
+ src: r.value,
788
+ "show-loader": ""
789
+ }, null, 8, ["src"])) : q("", !0)]),
790
+ footer: h(() => [I(p(Ee), null, {
791
+ default: h(() => [r.showClipboard && r.type === "text" ? (k(), U(Ne, {
792
+ key: 0,
793
+ value: e.value
794
+ }, null, 8, ["value"])) : q("", !0), r.showRefresh ? (k(), U(kt, {
795
+ key: 1,
796
+ onClick: y
797
+ })) : q("", !0)]),
798
+ _: 1
799
+ })]),
800
+ _: 1
801
+ }, 8, ["style", "styles"]));
802
+ }
803
+ }), xt = ["src"], xe = /* @__PURE__ */ D({
804
+ __name: "FeedbackBubbleStart",
805
+ props: {
806
+ value: {
807
+ type: String,
808
+ required: !1,
809
+ default: ""
810
+ },
811
+ type: {
812
+ type: String,
813
+ default: "text",
814
+ validator: (e) => ["text", "image"].includes(e)
815
+ },
816
+ avatarUrl: {
817
+ type: String,
818
+ default: "A"
819
+ },
820
+ bubbleStyle: {
821
+ type: Object,
822
+ default: () => ({
823
+ paddingRight: "52px"
824
+ })
825
+ },
826
+ showClipboard: {
827
+ type: Boolean,
828
+ default: !1
829
+ }
830
+ },
831
+ emits: ["footer-click"],
832
+ setup(e, {
833
+ emit: u
834
+ }) {
835
+ const r = e;
836
+ return (s, y) => (k(), U(p(Te), {
837
+ placement: "start",
838
+ style: re(r.bubbleStyle),
839
+ styles: {
840
+ content: {
841
+ padding: r.type === "image" ? "0px" : void 0
842
+ }
843
+ }
844
+ }, {
845
+ avatar: h(() => [I(p($e), null, {
846
+ default: h(() => [B("img", {
847
+ alt: "avatar",
848
+ src: r.avatarUrl
849
+ }, null, 8, xt)]),
850
+ _: 1
851
+ })]),
852
+ message: h(() => [r.type === "text" ? (k(), R(W, {
853
+ key: 0
854
+ }, [O(M(r.value), 1)], 64)) : r.type === "image" ? (k(), U(p(Ae), {
855
+ key: 1,
856
+ width: "100",
857
+ src: r.value,
858
+ "show-loader": ""
859
+ }, null, 8, ["src"])) : q("", !0)]),
860
+ footer: h(() => [I(p(Ee), null, {
861
+ default: h(() => [r.showClipboard && r.type === "text" ? (k(), U(Ne, {
862
+ key: 0,
863
+ value: r.value
864
+ }, null, 8, ["value"])) : q("", !0)]),
865
+ _: 1
866
+ })]),
867
+ _: 1
868
+ }, 8, ["style", "styles"]));
869
+ }
870
+ });
871
+ function St(e, u) {
872
+ return G({
873
+ url: `${e}/restfulApi/feedbackCenter/create`,
874
+ method: "post",
875
+ data: u
876
+ });
877
+ }
878
+ function Ct(e, u) {
879
+ return G({
880
+ url: `${e}/restfulApi/feedbackCenter/findOne`,
881
+ method: "post",
882
+ data: u
883
+ });
884
+ }
885
+ function wt(e, u) {
886
+ return G({
887
+ url: `${e}/restfulApi/feedbackCenter/own`,
888
+ method: "post",
889
+ data: u
890
+ });
891
+ }
892
+ function Se(e, u) {
893
+ return G({
894
+ url: `${e}/restfulApi/feedbackCenter/update/messages`,
895
+ method: "post",
896
+ data: u
897
+ });
898
+ }
899
+ function It(e, u) {
900
+ return G({
901
+ url: `${e}/restfulApi/messages/list/incremental`,
902
+ method: "post",
903
+ data: u
904
+ });
905
+ }
906
+ function Et(e, u) {
907
+ return G({
908
+ url: `${e}/restfulApi/messages/list`,
909
+ method: "post",
910
+ data: u
911
+ });
912
+ }
913
+ const pe = [{
914
+ key: "bugReports",
915
+ label: "问题报告"
916
+ }, {
917
+ key: "featureSuggestions",
918
+ label: "功能建议"
919
+ }, {
920
+ key: "technicalSupportRequests",
921
+ label: "技术支持请求"
922
+ }, {
923
+ key: "generalOpinions",
924
+ label: "一般意见"
925
+ }], Be = [{
926
+ key: "newFeedback",
927
+ label: "新建反馈"
928
+ }, {
929
+ key: "inProgress",
930
+ label: "正在处理"
931
+ }, {
932
+ key: "done",
933
+ label: "已解决"
934
+ }], At = {
935
+ class: "FeedBackDetails"
936
+ }, $t = {
937
+ class: "content"
938
+ }, Lt = {
939
+ key: 1,
940
+ class: "Bubbles"
941
+ }, Tt = /* @__PURE__ */ D({
942
+ __name: "FeedbackFeedBackDetails",
943
+ props: {
944
+ id: {
945
+ type: String,
946
+ required: !0,
947
+ default: () => ""
948
+ },
949
+ appId: {
950
+ type: String,
951
+ required: !0
952
+ },
953
+ prefixUrl: {
954
+ type: String,
955
+ required: !0
956
+ },
957
+ bucketId: {
958
+ type: String,
959
+ required: !0
960
+ },
961
+ bucket: {
962
+ type: String,
963
+ required: !0
964
+ },
965
+ region: {
966
+ type: String,
967
+ required: !0
968
+ },
969
+ senderRole: {
970
+ type: String,
971
+ required: !0,
972
+ validator: (e) => ["user", "support"].includes(e)
973
+ }
974
+ },
975
+ setup(e) {
976
+ function u(b) {
977
+ return b === "inProgress" ? "orangered" : b === "done" ? "green" : "arcoblue";
978
+ }
979
+ const r = L(""), s = L(!1), y = [{
980
+ key: "1",
981
+ label: "如何补充更多信息",
982
+ description: "请详细描述您的问题或需求,以便我们更好地为您服务。",
983
+ disabled: !0,
984
+ icon: ve(be, {
985
+ style: {
986
+ color: "#722ED1"
987
+ }
988
+ })
989
+ }, {
990
+ key: "3",
991
+ label: "如何补充附件",
992
+ description: "如有相关附件(如日志、截图等),请一并上传以便加快处理速度。",
993
+ disabled: !0,
994
+ icon: ve(be, {
995
+ style: {
996
+ color: "#722ED1"
997
+ }
998
+ })
999
+ }], a = L(null);
1000
+ function n(b) {
1001
+ for (; b; ) {
1002
+ const x = window.getComputedStyle(b).overflowY;
1003
+ if ((x === "auto" || x === "scroll") && b.scrollHeight > b.clientHeight)
1004
+ return b;
1005
+ b = b.parentElement;
1006
+ }
1007
+ return null;
1008
+ }
1009
+ const t = () => {
1010
+ var b;
1011
+ (b = a.value) == null || b.focus({
1012
+ cursor: "end"
1013
+ }), Z(() => {
1014
+ var P;
1015
+ const $ = (P = a.value) == null ? void 0 : P.$el, x = n($ || null);
1016
+ x && x.scrollTo({
1017
+ top: x.scrollHeight,
1018
+ behavior: "smooth"
1019
+ });
1020
+ });
1021
+ }, o = e;
1022
+ function f() {
1023
+ }
1024
+ const c = L(!1), C = L([]), E = L(void 0);
1025
+ let T = null;
1026
+ const _ = L({
1027
+ id: void 0,
1028
+ title: "",
1029
+ description: "",
1030
+ type: "bugReports",
1031
+ status: "done",
1032
+ reply: "",
1033
+ createAt: ""
1034
+ }), S = () => {
1035
+ const {
1036
+ uploadFile: b
1037
+ } = et({
1038
+ appId: o.appId,
1039
+ bucketId: o.bucketId,
1040
+ baseURL: o.prefixUrl,
1041
+ bucket: o.bucket,
1042
+ region: o.region
1043
+ }), $ = document.createElement("input");
1044
+ $.type = "file", $.accept = "image/*", $.style.display = "none", document.body.append($), $.addEventListener("change", async (x) => {
1045
+ var Q;
1046
+ const j = (Q = x.target.files) == null ? void 0 : Q[0];
1047
+ if (j) {
1048
+ s.value = !0;
1049
+ try {
1050
+ b({
1051
+ file: j,
1052
+ onFileFinish(z, ye, ie) {
1053
+ const le = {
1054
+ messageId: ke(),
1055
+ senderRole: o.senderRole,
1056
+ type: "image",
1057
+ key: ie.Key
1058
+ }, K = {
1059
+ id: o.id,
1060
+ message: le
1061
+ };
1062
+ Se(o.prefixUrl, K).then(({
1063
+ data: V
1064
+ }) => {
1065
+ C.value.push(V.message), typeof V.message.seq == "number" && (E.value = V.message.seq), Z(() => {
1066
+ t();
1067
+ }), s.value = !1;
1068
+ }).catch(() => {
1069
+ s.value = !1;
1070
+ });
1071
+ },
1072
+ onError(z) {
1073
+ console.error("上传图片失败"), s.value = !1;
1074
+ }
1075
+ });
1076
+ } catch (z) {
1077
+ console.error("上传图片失败", z), s.value = !1;
1078
+ }
1079
+ }
1080
+ $.remove();
1081
+ }), $.click();
1082
+ };
1083
+ function d(b) {
1084
+ s.value = !0;
1085
+ const x = {
1086
+ messageId: ke(),
1087
+ senderRole: o.senderRole,
1088
+ type: "text",
1089
+ content: b
1090
+ }, P = {
1091
+ id: o.id,
1092
+ message: x
1093
+ };
1094
+ Se(o.prefixUrl, P).then(({
1095
+ data: j
1096
+ }) => {
1097
+ s.value = !1, C.value.push(j.message), typeof j.message.seq == "number" && (E.value = j.message.seq), Z(() => {
1098
+ t();
1099
+ }), r.value = "";
1100
+ }).catch(() => {
1101
+ s.value = !1;
1102
+ });
1103
+ }
1104
+ function A() {
1105
+ d(r.value);
1106
+ }
1107
+ function F() {
1108
+ c.value = !0, Ct(o.prefixUrl, {
1109
+ id: o.id
1110
+ }).then(async ({
1111
+ data: b
1112
+ }) => {
1113
+ c.value = !1, _.value = b, b.messages && b.messages.length > 0 && (C.value = b.messages, E.value = b.messages.at(-1).seq);
1114
+ }).catch(() => {
1115
+ c.value = !1;
1116
+ });
1117
+ }
1118
+ function oe() {
1119
+ It(o.prefixUrl, {
1120
+ id: o.id,
1121
+ lastSeq: E.value
1122
+ }).then(async ({
1123
+ data: b
1124
+ }) => {
1125
+ b && b.messages && b.messages.length > 0 && (C.value.push(...b.messages), E.value = b.messages.at(-1).seq, Z(() => {
1126
+ t();
1127
+ }));
1128
+ }).catch(() => {
1129
+ });
1130
+ }
1131
+ function X() {
1132
+ c.value = !0, Et(o.prefixUrl, {
1133
+ id: o.id
1134
+ }).then(async ({
1135
+ data: b
1136
+ }) => {
1137
+ c.value = !1, b && b.messages && b.messages.length > 0 && (C.value.push(...b.messages), E.value = b.messages.at(-1).seq, Z(() => {
1138
+ t();
1139
+ }));
1140
+ }).catch(() => {
1141
+ c.value = !1;
1142
+ });
1143
+ }
1144
+ function Y() {
1145
+ T || (T = setInterval(() => {
1146
+ oe();
1147
+ }, 2e3));
1148
+ }
1149
+ function ae() {
1150
+ T && (clearInterval(T), T = null);
1151
+ }
1152
+ return je(() => {
1153
+ ae();
1154
+ }), Y(), F(), X(), (b, $) => (k(), R("div", At, [I(p(Me), {
1155
+ title: "基本信息"
1156
+ }, {
1157
+ title: h(() => $[1] || ($[1] = [B("div", {
1158
+ class: "title"
1159
+ }, "沟通记录", -1)])),
1160
+ default: h(() => [I(p(se), {
1161
+ label: "标题:",
1162
+ span: 3
1163
+ }, {
1164
+ default: h(() => [O(M(_.value.title), 1)]),
1165
+ _: 1
1166
+ }), I(p(se), {
1167
+ label: "反馈类型:",
1168
+ span: 1
1169
+ }, {
1170
+ default: h(() => [I(p(te), {
1171
+ color: "arcoblue"
1172
+ }, {
1173
+ default: h(() => {
1174
+ var x;
1175
+ return [O(M((x = p(ne)(p(pe), _.value.type)) == null ? void 0 : x.label), 1)];
1176
+ }),
1177
+ _: 1
1178
+ })]),
1179
+ _: 1
1180
+ }), I(p(se), {
1181
+ label: "状态:",
1182
+ span: 1
1183
+ }, {
1184
+ default: h(() => [I(p(te), {
1185
+ color: u(_.value.status)
1186
+ }, {
1187
+ default: h(() => {
1188
+ var x;
1189
+ return [O(M((x = p(ne)(p(Be), _.value.status)) == null ? void 0 : x.label), 1)];
1190
+ }),
1191
+ _: 1
1192
+ }, 8, ["color"])]),
1193
+ _: 1
1194
+ })]),
1195
+ _: 1
1196
+ }), B("div", $t, [$[2] || ($[2] = B("div", {
1197
+ class: "title"
1198
+ }, "沟通记录", -1)), I(p(Le), {
1199
+ class: "messageContent",
1200
+ loading: c.value
1201
+ }, {
1202
+ default: h(() => [C.value.length == 0 ? (k(), U(p(rt), {
1203
+ key: 0,
1204
+ title: "☕️ 温馨提示!",
1205
+ items: y,
1206
+ wrap: "",
1207
+ vertical: !1,
1208
+ onOnItemClick: f
1209
+ })) : (k(), R("div", Lt, [(k(!0), R(W, null, we(C.value, (x, P) => (k(), R(W, {
1210
+ key: P
1211
+ }, [x.type === "text" ? (k(), R(W, {
1212
+ key: 0
1213
+ }, [x.senderRole !== o.senderRole ? (k(), U(xe, {
1214
+ key: 0,
1215
+ value: x.content,
1216
+ type: x.type,
1217
+ "avatar-url": x.senderInfo.avatarUrl
1218
+ }, null, 8, ["value", "type", "avatar-url"])) : (k(), U(_e, {
1219
+ key: 1,
1220
+ value: x.content,
1221
+ "avatar-url": x.senderInfo.avatarUrl,
1222
+ type: x.type
1223
+ }, null, 8, ["value", "avatar-url", "type"]))], 64)) : (k(), R(W, {
1224
+ key: 1
1225
+ }, [x.senderRole !== o.senderRole ? (k(), U(xe, {
1226
+ key: 0,
1227
+ type: x.type,
1228
+ value: x.url,
1229
+ "avatar-text": "S",
1230
+ "avatar-url": x.senderInfo.avatarUrl
1231
+ }, null, 8, ["type", "value", "avatar-url"])) : (k(), U(_e, {
1232
+ key: 1,
1233
+ type: x.type,
1234
+ value: x.url,
1235
+ "avatar-url": x.senderInfo.avatarUrl
1236
+ }, null, 8, ["type", "value", "avatar-url"]))], 64))], 64))), 128))])), I(p(ot), {
1237
+ ref_key: "senderRef",
1238
+ ref: a,
1239
+ value: r.value,
1240
+ "onUpdate:value": $[0] || ($[0] = (x) => r.value = x),
1241
+ placeholder: "请输入你要咨询的问题?",
1242
+ loading: s.value,
1243
+ "allow-speech": !1,
1244
+ "read-only": s.value,
1245
+ onSubmit: A
1246
+ }, {
1247
+ prefix: h(() => [I(p(fe), {
1248
+ type: "text",
1249
+ class: "IconLink",
1250
+ onClick: S
1251
+ }, {
1252
+ icon: h(() => [I(p(pt))]),
1253
+ _: 1
1254
+ })]),
1255
+ _: 1
1256
+ }, 8, ["value", "loading", "read-only"])]),
1257
+ _: 1
1258
+ }, 8, ["loading"])])]));
1259
+ }
1260
+ }), Ut = /* @__PURE__ */ H(Tt, [["__scopeId", "data-v-9a5ae17c"]]), Ft = {
1261
+ class: "FeedBackFrom"
1262
+ }, Rt = /* @__PURE__ */ D({
1263
+ __name: "FeedbackFeedBackFrom",
1264
+ props: {
1265
+ appId: {
1266
+ type: String,
1267
+ required: !0
1268
+ },
1269
+ prefixUrl: {
1270
+ type: String,
1271
+ required: !0
1272
+ }
1273
+ },
1274
+ emits: ["confirm"],
1275
+ setup(e, {
1276
+ emit: u
1277
+ }) {
1278
+ const r = u, s = L(), y = L(!1), a = e, n = L({
1279
+ id: void 0,
1280
+ title: "",
1281
+ type: "bugReports",
1282
+ description: "",
1283
+ screenshots: []
1284
+ });
1285
+ L([]), a.appId;
1286
+ function t() {
1287
+ s.value.validate().then((o) => {
1288
+ if (!o) {
1289
+ y.value = !0, console.log("create");
1290
+ const f = {
1291
+ title: n.value.title,
1292
+ type: n.value.type,
1293
+ description: n.value.description,
1294
+ screenshots: n.value.screenshots
1295
+ };
1296
+ St(a.prefixUrl, f).then(() => {
1297
+ y.value = !1, Ie.success("新建反馈成功"), r("confirm");
1298
+ }).catch(() => {
1299
+ y.value = !1;
1300
+ });
1301
+ }
1302
+ });
1303
+ }
1304
+ return (o, f) => (k(), R("div", Ft, [I(p(ze), {
1305
+ ref_key: "formRef",
1306
+ ref: s,
1307
+ model: n.value,
1308
+ "auto-label-width": "",
1309
+ layout: "vertical"
1310
+ }, {
1311
+ default: h(() => [I(p(ue), {
1312
+ field: "title",
1313
+ label: "标题",
1314
+ rules: [{
1315
+ required: !0,
1316
+ message: "请输入标题"
1317
+ }]
1318
+ }, {
1319
+ default: h(() => [I(p(Ve), {
1320
+ modelValue: n.value.title,
1321
+ "onUpdate:modelValue": f[0] || (f[0] = (c) => n.value.title = c),
1322
+ placeholder: "请输入标题"
1323
+ }, null, 8, ["modelValue"])]),
1324
+ _: 1
1325
+ }), I(p(ue), {
1326
+ field: "type",
1327
+ label: "反馈类型",
1328
+ rules: [{
1329
+ required: !0,
1330
+ message: "请选择反馈类型"
1331
+ }]
1332
+ }, {
1333
+ default: h(() => [I(p(We), {
1334
+ modelValue: n.value.type,
1335
+ "onUpdate:modelValue": f[1] || (f[1] = (c) => n.value.type = c),
1336
+ placeholder: "请选择反馈类型"
1337
+ }, {
1338
+ default: h(() => [(k(!0), R(W, null, we(p(pe), (c, C) => (k(), U(p(He), {
1339
+ key: C,
1340
+ value: c.key
1341
+ }, {
1342
+ default: h(() => [O(M(c.label), 1)]),
1343
+ _: 2
1344
+ }, 1032, ["value"]))), 128))]),
1345
+ _: 1
1346
+ }, 8, ["modelValue"])]),
1347
+ _: 1
1348
+ }), I(p(ue), {
1349
+ field: "description",
1350
+ label: "问题描述",
1351
+ rules: [{
1352
+ required: !0,
1353
+ message: "请输入问题描述"
1354
+ }]
1355
+ }, {
1356
+ default: h(() => [I(p(Ye), {
1357
+ modelValue: n.value.description,
1358
+ "onUpdate:modelValue": f[2] || (f[2] = (c) => n.value.description = c),
1359
+ placeholder: "请输入问题描述",
1360
+ "allow-clear": "",
1361
+ "auto-size": {
1362
+ minRows: 5
1363
+ }
1364
+ }, null, 8, ["modelValue"])]),
1365
+ _: 1
1366
+ }), q("", !0), I(p(fe), {
1367
+ loading: y.value,
1368
+ type: "primary",
1369
+ onClick: t
1370
+ }, {
1371
+ default: h(() => f[3] || (f[3] = [O(" 提交 ")])),
1372
+ _: 1,
1373
+ __: [3]
1374
+ }, 8, ["loading"])]),
1375
+ _: 1
1376
+ }, 8, ["model"])]));
1377
+ }
1378
+ }), Ot = /* @__PURE__ */ H(Rt, [["__scopeId", "data-v-5716aca2"]]), qt = {
1379
+ key: 0,
1380
+ class: "loading"
1381
+ }, Nt = {
1382
+ key: 1,
1383
+ class: "none"
1384
+ }, Bt = /* @__PURE__ */ D({
1385
+ __name: "InfiniteLoading",
1386
+ props: {
1387
+ loading: {
1388
+ type: Boolean,
1389
+ default: () => !1
1390
+ },
1391
+ finished: {
1392
+ type: Boolean,
1393
+ default: () => !1
1394
+ }
1395
+ },
1396
+ emits: ["infinite"],
1397
+ setup(e, {
1398
+ emit: u
1399
+ }) {
1400
+ const r = e, s = u, y = L(null);
1401
+ return nt(y, ([{
1402
+ isIntersecting: a
1403
+ }]) => {
1404
+ a && // 当loading和finished的值都为false时,就通知父组件调用方法继续向后台请求数据
1405
+ !r.loading && !r.finished && (console.log(a, "isIntersecting"), s("infinite"));
1406
+ }, {
1407
+ threshold: 0
1408
+ }), (a, n) => (k(), R("div", {
1409
+ ref_key: "container",
1410
+ ref: y,
1411
+ class: "infinite-loading"
1412
+ }, [e.loading ? (k(), R("div", qt, [I(p(Le), {
1413
+ tip: "数据加载中..."
1414
+ })])) : q("", !0), e.finished ? (k(), R("div", Nt, [q("", !0)])) : q("", !0)], 512));
1415
+ }
1416
+ }), Dt = /* @__PURE__ */ H(Bt, [["__scopeId", "data-v-c415f923"]]), Pt = {
1417
+ class: "messages"
1418
+ }, jt = {
1419
+ key: 1,
1420
+ class: "list"
1421
+ }, Mt = /* @__PURE__ */ D({
1422
+ __name: "FeedbackFeedBackList",
1423
+ props: {
1424
+ appId: {
1425
+ type: String,
1426
+ required: !0
1427
+ },
1428
+ prefixUrl: {
1429
+ type: String,
1430
+ required: !0
1431
+ },
1432
+ bucketId: {
1433
+ type: String,
1434
+ required: !0
1435
+ },
1436
+ bucket: {
1437
+ type: String,
1438
+ required: !0
1439
+ },
1440
+ region: {
1441
+ type: String,
1442
+ required: !0
1443
+ }
1444
+ },
1445
+ emits: ["toDetail"],
1446
+ setup(e, {
1447
+ emit: u
1448
+ }) {
1449
+ const r = e, s = L(!0), y = L([]), a = L(!1), n = L(!1), t = L(""), o = L({
1450
+ total: 0,
1451
+ current: 1,
1452
+ pageSize: 10
1453
+ });
1454
+ function f() {
1455
+ s.value = !0;
1456
+ }
1457
+ function c(S) {
1458
+ console.log(S, "record"), t.value = S.id, s.value = !1;
1459
+ }
1460
+ const C = [{
1461
+ dataIndex: "id",
1462
+ slotName: "id",
1463
+ title: "ID",
1464
+ minWidth: 100,
1465
+ ellipsis: !0,
1466
+ tooltip: !0
1467
+ }, {
1468
+ dataIndex: "title",
1469
+ slotName: "title",
1470
+ title: "标题",
1471
+ minWidth: 100,
1472
+ ellipsis: !0,
1473
+ tooltip: !0
1474
+ }, {
1475
+ dataIndex: "type",
1476
+ slotName: "type",
1477
+ title: "反馈类型",
1478
+ minWidth: 100,
1479
+ ellipsis: !0,
1480
+ tooltip: !0
1481
+ }, {
1482
+ dataIndex: "status",
1483
+ slotName: "status",
1484
+ title: "状态",
1485
+ minWidth: 100,
1486
+ ellipsis: !0,
1487
+ tooltip: !0
1488
+ }, {
1489
+ dataIndex: "createAt",
1490
+ slotName: "createAt",
1491
+ title: "创建日期",
1492
+ minWidth: 180
1493
+ }, {
1494
+ dataIndex: "actions",
1495
+ slotName: "actions",
1496
+ title: "操作",
1497
+ fixed: "right",
1498
+ minWidth: 80
1499
+ }];
1500
+ function E(S) {
1501
+ return S === "inProgress" ? "orangered" : S === "done" ? "green" : "arcoblue";
1502
+ }
1503
+ function T() {
1504
+ a.value = !0, wt(r.prefixUrl, {
1505
+ current: o.value.current,
1506
+ pageSize: o.value.pageSize
1507
+ }).then(async ({
1508
+ data: S
1509
+ }) => {
1510
+ a.value = !1, S.items.forEach((d) => {
1511
+ const A = {
1512
+ id: d.id,
1513
+ title: d.title,
1514
+ description: d.description,
1515
+ reply: d.reply,
1516
+ type: d.type,
1517
+ status: d.status,
1518
+ createAt: d.createAt
1519
+ };
1520
+ y.value.push(A);
1521
+ }), o.value.total = S.count, o.value.current++, S.items.length === 0 && (n.value = !0);
1522
+ }).catch(() => {
1523
+ a.value = !1;
1524
+ });
1525
+ }
1526
+ function _() {
1527
+ T();
1528
+ }
1529
+ return (S, d) => (k(), R("div", Pt, [s.value ? q("", !0) : (k(), U(p(Ke), {
1530
+ key: 0,
1531
+ style: {
1532
+ "margin-bottom": "10px",
1533
+ cursor: "pointer"
1534
+ }
1535
+ }, {
1536
+ default: h(() => [I(p(ge), {
1537
+ style: {
1538
+ padding: "0px"
1539
+ },
1540
+ onClick: f
1541
+ }, {
1542
+ default: h(() => d[0] || (d[0] = [O("我的反馈")])),
1543
+ _: 1,
1544
+ __: [0]
1545
+ }), I(p(ge), {
1546
+ style: {
1547
+ padding: "0px"
1548
+ }
1549
+ }, {
1550
+ default: h(() => d[1] || (d[1] = [O("反馈详情")])),
1551
+ _: 1,
1552
+ __: [1]
1553
+ })]),
1554
+ _: 1
1555
+ })), s.value ? (k(), R("div", jt, [I(tt, {
1556
+ columns: C,
1557
+ data: y.value,
1558
+ loading: a.value,
1559
+ pagination: null
1560
+ }, {
1561
+ type: h(({
1562
+ record: A
1563
+ }) => [I(p(te), {
1564
+ color: "arcoblue"
1565
+ }, {
1566
+ default: h(() => {
1567
+ var F;
1568
+ return [O(M((F = p(ne)(p(pe), A.type)) == null ? void 0 : F.label), 1)];
1569
+ }),
1570
+ _: 2
1571
+ }, 1024)]),
1572
+ status: h(({
1573
+ record: A
1574
+ }) => [I(p(te), {
1575
+ color: E(A.status)
1576
+ }, {
1577
+ default: h(() => {
1578
+ var F;
1579
+ return [O(M((F = p(ne)(p(Be), A.status)) == null ? void 0 : F.label), 1)];
1580
+ }),
1581
+ _: 2
1582
+ }, 1032, ["color"])]),
1583
+ actions: h(({
1584
+ record: A
1585
+ }) => [I(p(fe), {
1586
+ type: "text",
1587
+ onClick: (F) => c(A)
1588
+ }, {
1589
+ default: h(() => d[2] || (d[2] = [O("查看")])),
1590
+ _: 2,
1591
+ __: [2]
1592
+ }, 1032, ["onClick"])]),
1593
+ _: 1
1594
+ }, 8, ["data", "loading"]), I(Dt, {
1595
+ loading: a.value,
1596
+ finished: n.value,
1597
+ onInfinite: _
1598
+ }, null, 8, ["loading", "finished"])])) : (k(), U(Ut, {
1599
+ key: 2,
1600
+ id: t.value,
1601
+ "app-id": r.appId,
1602
+ "prefix-url": r.prefixUrl,
1603
+ "sender-role": "user",
1604
+ "bucket-id": r.bucketId,
1605
+ bucket: r.bucket,
1606
+ region: r.region
1607
+ }, null, 8, ["id", "app-id", "prefix-url", "bucket-id", "bucket", "region"]))]));
1608
+ }
1609
+ }), zt = /* @__PURE__ */ H(Mt, [["__scopeId", "data-v-44e93219"]]), Vt = {
1610
+ class: "content"
1611
+ }, Wt = {
1612
+ class: "left"
1613
+ }, Ht = {
1614
+ class: "right"
1615
+ }, Yt = /* @__PURE__ */ D({
1616
+ __name: "FeedbackFeedBackModal",
1617
+ props: {
1618
+ appId: {
1619
+ type: String,
1620
+ required: !0
1621
+ },
1622
+ prefixUrl: {
1623
+ type: String,
1624
+ required: !0
1625
+ },
1626
+ bucketId: {
1627
+ type: String,
1628
+ required: !0
1629
+ },
1630
+ bucket: {
1631
+ type: String,
1632
+ required: !0
1633
+ },
1634
+ region: {
1635
+ type: String,
1636
+ required: !0
1637
+ }
1638
+ },
1639
+ emits: ["confirm", "cancel"],
1640
+ setup(e, {
1641
+ expose: u,
1642
+ emit: r
1643
+ }) {
1644
+ const s = L(!1), y = e, a = r;
1645
+ function n() {
1646
+ a("cancel");
1647
+ }
1648
+ const t = L(["FeedbackList"]), o = L(["功能变更"]), f = L([{
1649
+ name: "我的反馈",
1650
+ path: "FeedbackList",
1651
+ meta: {
1652
+ icon: "mingcute:cube-3d-fill"
1653
+ }
1654
+ }, {
1655
+ name: "新建反馈",
1656
+ path: "CreateFeedback",
1657
+ meta: {
1658
+ icon: "mingcute:cube-3d-fill"
1659
+ }
1660
+ }]), c = L(!1), C = J(() => t.value.length !== 0 ? t.value[0] : "");
1661
+ function E() {
1662
+ t.value = ["FeedbackList"];
1663
+ }
1664
+ function T() {
1665
+ c.value = !1;
1666
+ }
1667
+ function _(d, A) {
1668
+ const F = d.path;
1669
+ console.log(F, A, "lokokoko"), t.value = [F], o.value = d.name;
1670
+ }
1671
+ function S(d) {
1672
+ s.value = d;
1673
+ }
1674
+ return u({
1675
+ setData: S
1676
+ }), (d, A) => (k(), U(p(Ge), {
1677
+ visible: s.value,
1678
+ "onUpdate:visible": A[1] || (A[1] = (F) => s.value = F),
1679
+ loading: !1,
1680
+ "body-class": "AppMessagebodyClass",
1681
+ "mask-closable": !1,
1682
+ footer: !1,
1683
+ width: "auto",
1684
+ title: "用户反馈",
1685
+ "hide-title": !1,
1686
+ onCancel: n
1687
+ }, {
1688
+ default: h(() => [B("div", Vt, [B("div", Wt, [I(Ze, {
1689
+ "selected-keys": t.value,
1690
+ "onUpdate:selectedKeys": A[0] || (A[0] = (F) => t.value = F),
1691
+ menus: f.value,
1692
+ onChange: _
1693
+ }, null, 8, ["selected-keys", "menus"])]), B("div", Ht, [C.value === "FeedbackList" ? (k(), U(zt, {
1694
+ key: 0,
1695
+ "app-id": y.appId,
1696
+ "prefix-url": y.prefixUrl,
1697
+ "bucket-id": y.bucketId,
1698
+ bucket: y.bucket,
1699
+ region: y.region
1700
+ }, null, 8, ["app-id", "prefix-url", "bucket-id", "bucket", "region"])) : q("", !0), C.value === "CreateFeedback" ? (k(), U(Ot, {
1701
+ key: 1,
1702
+ "app-id": y.appId,
1703
+ "prefix-url": y.prefixUrl,
1704
+ onConfirm: E
1705
+ }, null, 8, ["app-id", "prefix-url"])) : q("", !0)])]), I(p(Xe), {
1706
+ width: 400,
1707
+ visible: c.value,
1708
+ "unmount-on-close": "",
1709
+ footer: !1,
1710
+ title: `${o.value}详情`,
1711
+ onCancel: T
1712
+ }, {
1713
+ default: h(() => A[2] || (A[2] = [B("div", null, " You can customize modal body text by the current situation. This modal will be closed immediately once you press the OK button. ", -1)])),
1714
+ _: 1,
1715
+ __: [2]
1716
+ }, 8, ["visible", "title"])]),
1717
+ _: 1
1718
+ }, 8, ["visible"]));
1719
+ }
1720
+ }), hn = /* @__PURE__ */ H(Yt, [["__scopeId", "data-v-ea23d687"]]);
1721
+ export {
1722
+ Ne as C,
1723
+ Ut as F,
1724
+ Dt as I,
1725
+ kt as R,
1726
+ _e as _,
1727
+ xe as a,
1728
+ Ot as b,
1729
+ zt as c,
1730
+ hn as d
1731
+ };