@huyooo/ui 1.0.2 → 1.0.4
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/AuthkitAppSetting-BN8-xgNq.js +2674 -0
- package/dist/{Contact-M6iyuyNL.js → Contact-DBH8CyKp.js} +105 -113
- package/dist/CustomTable-BzGfaAVH.js +276 -0
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-B9BqGWm8.js +1480 -0
- package/dist/LandingPageDescription-BczWZHKy.js +12 -0
- package/dist/{LandingPageLinkGroup-DDNRivMt.js → LandingPageLinkGroup-r-t3H1X0.js} +87 -88
- package/dist/LandingPageSectionHeader-CVAqc7bx.js +137 -0
- package/dist/{LandingPageSectionTabs-Ce3_Rc2L.js → LandingPageSectionTabs-DhKpOj5F.js} +300 -309
- package/dist/LegalDocViewer-DlaLKGyX.js +2501 -0
- package/dist/Menu-uCexrsKP.js +199 -0
- package/dist/MessageHandle-mEkCsv9e.js +1173 -0
- package/dist/MessageList-Ce-_LNTk.js +244 -0
- package/dist/PaySubscriptions-CXkEjqr2.js +1326 -0
- package/dist/PricingPlans-DoWP5aX7.js +427 -0
- package/dist/ReferrerReferees-DgygiIiE.js +237 -0
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-B6NOZjK0.js → Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js} +1 -1
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-zgjpFVln.js +592 -0
- package/dist/WidthContainer-PeWkCK0p.js +721 -0
- package/dist/{apiClients-DrGX2iJy.js → apiClients-BcXOLuYu.js} +131 -98
- package/dist/authkit.d.ts +6 -2
- package/dist/authkit.js +53 -44
- package/dist/common/authProviderIcons.d.ts +12 -0
- package/dist/common/globalConfig.d.ts +5 -0
- package/dist/common/tableColumnWidths.d.ts +11 -0
- package/dist/common.js +3 -3
- package/dist/components/AuthProviderIcon.vue.d.ts +12 -0
- package/dist/components/Authkit/AppSetting/AuthkitEmailVerify.vue.d.ts +2 -2
- package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +2 -1
- package/dist/components/Authkit/AppSetting/AuthkitPasskeyBinding.vue.d.ts +14 -0
- package/dist/components/Authkit/AppSetting/AuthkitPasswordUpdate.vue.d.ts +11 -1
- package/dist/components/Authkit/AppSetting/AuthkitPersonalInformation.vue.d.ts +1 -3
- package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +13 -3
- package/dist/components/Authkit/Auth/AuthkitBindEmail.vue.d.ts +29 -2
- package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +37 -9
- package/dist/components/Authkit/Auth/AuthkitOauthList.vue.d.ts +7 -11
- package/dist/components/Authkit/Auth/AuthkitPasswordUpdateAndVerify.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitServiceAgreementAndPrivacyProtection.vue.d.ts +11 -7
- package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitSignInPhone.vue.d.ts +3 -62
- package/dist/components/Authkit/Auth/AuthkitSignUpPhone.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +9 -0
- package/dist/components/Authkit/AuthkitAuth.vue.d.ts +2 -8
- package/dist/components/Authkit/AuthkitAuthModal.vue.d.ts +0 -4
- package/dist/components/Authkit/AuthkitProvider.vue.d.ts +5 -2
- package/dist/components/Authkit/AuthkitSendVerifyCode.vue.d.ts +2 -1
- package/dist/components/CustomTable.vue.d.ts +27 -1
- package/dist/components/Ellipsis.vue.d.ts +2 -6
- package/dist/components/Feedback/FeedbackList.vue.d.ts +4 -1
- package/dist/components/Gradientbackground.vue.d.ts +2 -2
- package/dist/components/HeaderMenus.vue.d.ts +4 -1
- package/dist/components/InfiniteLoading.vue.d.ts +1 -1
- package/dist/components/LandingPage/LandingPageContainer.vue.d.ts +2 -2
- package/dist/components/LandingPage/LandingPagePageContent.vue.d.ts +2 -2
- package/dist/components/LegalDoc/LegalDocViewer.vue.d.ts +7 -0
- package/dist/components/Menu.vue.d.ts +2 -1
- package/dist/components/MenuItem.vue.d.ts +3 -1
- package/dist/components/Message/MessageAppMessage.vue.d.ts +12 -2
- package/dist/components/Message/MessageDetails.vue.d.ts +9 -161
- package/dist/components/Message/MessageHandle.vue.d.ts +16 -4
- package/dist/components/Message/MessageList.vue.d.ts +4 -3
- package/dist/components/Message/MessageNotificationDetails.vue.d.ts +13 -0
- package/dist/components/Message/messageBody/DescriptionsMessageBody.vue.d.ts +3 -0
- package/dist/components/Message/messageBody/JsonMessageBodyFallback.vue.d.ts +3 -0
- package/dist/components/Message/messageBody/TextMessageBody.vue.d.ts +3 -0
- package/dist/components/Message/messageBody/descriptionRows.d.ts +14 -0
- package/dist/components/Message/messageBody/descriptionsMessageBody.d.ts +32 -0
- package/dist/components/Message/messageBody/descriptionsValueRender.d.ts +4 -0
- package/dist/components/Message/messageBody/messageBodyRegistry.d.ts +9 -0
- package/dist/components/Message/messageBody/registerBuiltinMessageBodies.d.ts +2 -0
- package/dist/components/Message/messageBody/types.d.ts +7 -0
- package/dist/components/Referrer/ReferrerRefereeCell.vue.d.ts +7 -0
- package/dist/components/Referrer/ReferrerReferees.vue.d.ts +1 -0
- package/dist/components/UserMenu/UserAccountMenu.vue.d.ts +1 -16
- package/dist/components/UserMenu/UserMenuItem.vue.d.ts +4 -0
- package/dist/components/UserMenu/UserMenuModals.vue.d.ts +18 -4
- package/dist/components/UserMenu/parts/UserAvatar.vue.d.ts +6 -0
- package/dist/components/UserMenu/parts/UserBasicInformation.vue.d.ts +7 -2
- package/dist/composables/Authkit/fetchAuthPageAboutUs.d.ts +3 -0
- package/dist/composables/Authkit/resolveRoutePermission.d.ts +2 -0
- package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +16 -0
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +2 -0
- package/dist/composables/Authkit/useAuthkitPasskey.d.ts +10 -0
- package/dist/composables/Authkit/useLegalDocHostActions.d.ts +6 -0
- package/dist/composables/Authkit/useLegalDocs.d.ts +19 -0
- package/dist/composables/Authkit/useOauth.d.ts +17 -4
- package/dist/composables/Authkit/useRegistrationTerms.d.ts +24 -0
- package/dist/composables/Authkit/verifyCodeCooldown.d.ts +19 -0
- package/dist/composables/Billing/useBillingPlans.d.ts +0 -4
- package/dist/composables/Billing/useBillingStatusOptions.d.ts +2 -6
- package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +16 -0
- package/dist/composables/Billing/usePaidProductOptions.d.ts +5 -0
- package/dist/composables/Message/messageCenterBadgeCounts.d.ts +28 -0
- package/dist/composables/UserMenu/useUserMenuBadgeCounts.d.ts +9 -0
- package/dist/composables/useInfiniteList.d.ts +19 -0
- package/dist/composables/useMessageNotifications.d.ts +3 -6
- package/dist/composables.d.ts +4 -2
- package/dist/composables.js +50 -45
- package/dist/feedback.d.ts +1 -0
- package/dist/feedback.js +12 -11
- package/dist/fetchAuthPageAboutUs-dzTSwRsB.js +25 -0
- package/dist/{Clipboard-Bo7gdpR6.js → index-BkLvw1PU.js} +1 -1
- package/dist/landingPage.js +21 -21
- package/dist/legalDocs/buildBuiltinUrl.d.ts +3 -0
- package/dist/{utils/legalLinks.d.ts → legalDocs/constants.d.ts} +0 -10
- package/dist/legalDocs/index.d.ts +7 -0
- package/dist/legalDocs/isConfigured.d.ts +7 -0
- package/dist/legalDocs/open.d.ts +3 -0
- package/dist/legalDocs/resolveAppId.d.ts +8 -0
- package/dist/legalDocs/resolveTarget.d.ts +4 -0
- package/dist/legalDocs/types.d.ts +12 -0
- package/dist/main.js +320 -308
- package/dist/message.d.ts +3 -0
- package/dist/message.js +301 -21
- package/dist/pay.d.ts +1 -1
- package/dist/pay.js +14 -17
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +1385 -328
- package/dist/types/api/billing.generated.d.ts +907 -76
- package/dist/types/api/ones.generated.d.ts +131 -2
- package/dist/types/api.d.ts +1 -0
- package/dist/types/app.d.ts +10 -0
- package/dist/types/user.d.ts +1 -0
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-C2yKgl8t.js → useAuthkitAppsAuthPageInfo-CNudJd04.js} +18 -17
- package/dist/useAuthkitAuth-3m0yW6uP.js +267 -0
- package/dist/{useAuthkitCreateAndUpdate-oo9517Gj.js → useAuthkitCreateAndUpdate-BsINsI-E.js} +1 -1
- package/dist/{useAuthkitUsersProfile-BZDk21c8.js → useAuthkitUsersProfile-DJlMsftY.js} +3 -3
- package/dist/useBillingStatusOptions-CfHQOFNw.js +71 -0
- package/dist/{useEnsureAuthenticated-BuIbxqsO.js → useEnsureAuthenticated-DNkCCy_Y.js} +2 -2
- package/dist/useLegalDocs-DQP_Yq6B.js +106 -0
- package/dist/{useMessageNotifications-D85_-mDq.js → useMessageNotifications-CAphguOm.js} +21 -24
- package/dist/useRoutePermission-CEiya9AM.js +218 -0
- package/dist/useSEO-CDWxbk8B.js +221 -0
- package/dist/useSubscriptionCheckout-d_M_rKRa.js +368 -0
- package/dist/{useUploadCos-BRKRzSy3.js → useUploadCos-C8BqFPkx.js} +1 -1
- package/dist/user.js +1 -1
- package/dist/userMenuModal-D-nDaYqM.js +66 -0
- package/dist/utils/apiMiddlewares.d.ts +5 -5
- package/dist/utils/apiResponse.d.ts +11 -0
- package/dist/utils/authProviderIcon.d.ts +3 -0
- package/dist/utils/authkit.d.ts +20 -7
- package/dist/utils/formatPoints.d.ts +8 -0
- package/dist/utils/messageNotificationContent.d.ts +4 -0
- package/dist/utils/messageTextLink.d.ts +9 -0
- package/dist/utils/passkeySupport.d.ts +8 -0
- package/dist/utils/pointsFlowTypes.d.ts +10 -0
- package/dist/utils/pointsHistoryDisplay.d.ts +8 -0
- package/dist/utils/refundStatusDisplay.d.ts +1 -0
- package/dist/utils/subscriptionDisplay.d.ts +7 -0
- package/dist/utils/userDisplay.d.ts +41 -0
- package/package.json +11 -3
- package/dist/AuthkitAppSetting-C-0uuLSg.js +0 -1921
- package/dist/AuthkitGithubBinding-C5zEy9zN.js +0 -2207
- package/dist/CustomTable-CCOQxfxr.js +0 -279
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-M1NQ-rx-.js +0 -1396
- package/dist/LandingPageFAQ-CZJXvor9.js +0 -80
- package/dist/LandingPageSectionHeader-D_74W4My.js +0 -69
- package/dist/Menu-Cy2ZPeaz.js +0 -170
- package/dist/MessageHandle-BG12aX0i.js +0 -924
- package/dist/MessageList-CrCF8mU6.js +0 -233
- package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-gsjL6yAe.js +0 -142
- package/dist/PaySubscriptions-C3KiTsQS.js +0 -1241
- package/dist/PricingPlans-uwlFiiJx.js +0 -404
- package/dist/ReferrerReferees-Zb5Bd-_e.js +0 -106
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-QWUNRjGh.js +0 -520
- package/dist/WidthContainer-BVBk0kJN.js +0 -688
- package/dist/components/Feedback/FeedbackDetails.vue.d.ts +0 -178
- package/dist/composables/Authkit/useLegalLinks.d.ts +0 -34
- package/dist/index-D3Kp6R4z.js +0 -4
- package/dist/useAuthkitAuth-DmS-H7M2.js +0 -175
- package/dist/useBillingStatusOptions-B7xLU3fs.js +0 -145
- package/dist/useLegalLinks-Cwr45PBT.js +0 -60
- package/dist/useRoutePermission-CaWtjLRA.js +0 -212
- package/dist/useSEO-BSMQdBR9.js +0 -158
- package/dist/useSubscriptionCheckout-BRk5h9aC.js +0 -365
- package/dist/useTableHandle-BdujaiNX.js +0 -69
- /package/dist/components/{Feedback/FeedbackVideoPreview.vue.d.ts → VideoPreview.vue.d.ts} +0 -0
|
@@ -1,1396 +0,0 @@
|
|
|
1
|
-
/* empty css */
|
|
2
|
-
/* empty css */
|
|
3
|
-
import { U as Oe } from "./index-D3Kp6R4z.js";
|
|
4
|
-
import { defineComponent as D, computed as A, openBlock as a, createElementBlock as o, normalizeStyle as J, normalizeClass as se, createElementVNode as _, useModel as Ne, createBlock as B, Teleport as je, withKeys as We, toDisplayString as F, withModifiers as K, createCommentVNode as R, mergeModels as Ke, ref as g, Fragment as L, renderList as q, createVNode as v, unref as t, withCtx as f, createTextVNode as M, onBeforeUnmount as He, onUnmounted as Ge, nextTick as Q } from "vue";
|
|
5
|
-
import { ImagePreviewGroup as ce, Avatar as ne, Space as le, Descriptions as Xe, DescriptionsItem as ee, Tag as X, Spin as Ye, Empty as Je, Button as ue, Message as ie, Form as Ze, FormItem as G, Input as Qe, Select as ge, Option as be, Textarea as et, Breadcrumb as tt, BreadcrumbItem as ke, Modal as at } from "@arco-design/web-vue";
|
|
6
|
-
import { M as st } from "./Menu-Cy2ZPeaz.js";
|
|
7
|
-
/* empty css */
|
|
8
|
-
/* empty css */
|
|
9
|
-
/* empty css */
|
|
10
|
-
/* empty css */
|
|
11
|
-
import { g as ye, o as j } from "./apiClients-DrGX2iJy.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
import { g as nt, u as lt } from "./useUploadCos-BRKRzSy3.js";
|
|
14
|
-
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
-
import { M as it } from "./MessageList-CrCF8mU6.js";
|
|
16
|
-
import { f as Y } from "./index-D56hUMeD.js";
|
|
17
|
-
import { Bubble as he, Sender as rt } from "ant-design-x-vue";
|
|
18
|
-
import { C as re } from "./Clipboard-Bo7gdpR6.js";
|
|
19
|
-
import { Icon as ot } from "@iconify/vue";
|
|
20
|
-
import { _ as ut, g as ct, i as dt } from "./plugin-vue_export-helper-LjDO2Zua.js";
|
|
21
|
-
const vt = D({
|
|
22
|
-
name: "IconLink",
|
|
23
|
-
props: {
|
|
24
|
-
size: {
|
|
25
|
-
type: [Number, String]
|
|
26
|
-
},
|
|
27
|
-
strokeWidth: {
|
|
28
|
-
type: Number,
|
|
29
|
-
default: 4
|
|
30
|
-
},
|
|
31
|
-
strokeLinecap: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: "butt",
|
|
34
|
-
validator: (s) => ["butt", "round", "square"].includes(s)
|
|
35
|
-
},
|
|
36
|
-
strokeLinejoin: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: "miter",
|
|
39
|
-
validator: (s) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(s)
|
|
40
|
-
},
|
|
41
|
-
rotate: Number,
|
|
42
|
-
spin: Boolean
|
|
43
|
-
},
|
|
44
|
-
emits: {
|
|
45
|
-
click: (s) => !0
|
|
46
|
-
},
|
|
47
|
-
setup(s, {
|
|
48
|
-
emit: e
|
|
49
|
-
}) {
|
|
50
|
-
const l = ct("icon"), u = A(() => [l, `${l}-link`, {
|
|
51
|
-
[`${l}-spin`]: s.spin
|
|
52
|
-
}]), k = A(() => {
|
|
53
|
-
const b = {};
|
|
54
|
-
return s.size && (b.fontSize = dt(s.size) ? `${s.size}px` : s.size), s.rotate && (b.transform = `rotate(${s.rotate}deg)`), b;
|
|
55
|
-
});
|
|
56
|
-
return {
|
|
57
|
-
cls: u,
|
|
58
|
-
innerStyle: k,
|
|
59
|
-
onClick: (b) => {
|
|
60
|
-
e("click", b);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}), ft = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
65
|
-
function pt(s, e, l, u, k, i) {
|
|
66
|
-
return a(), o("svg", {
|
|
67
|
-
viewBox: "0 0 48 48",
|
|
68
|
-
fill: "none",
|
|
69
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
70
|
-
stroke: "currentColor",
|
|
71
|
-
class: se(s.cls),
|
|
72
|
-
style: J(s.innerStyle),
|
|
73
|
-
"stroke-width": s.strokeWidth,
|
|
74
|
-
"stroke-linecap": s.strokeLinecap,
|
|
75
|
-
"stroke-linejoin": s.strokeLinejoin,
|
|
76
|
-
onClick: e[0] || (e[0] = (...b) => s.onClick && s.onClick(...b))
|
|
77
|
-
}, e[1] || (e[1] = [_("path", {
|
|
78
|
-
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"
|
|
79
|
-
}, null, -1)]), 14, ft);
|
|
80
|
-
}
|
|
81
|
-
var oe = /* @__PURE__ */ ut(vt, [["render", pt]]);
|
|
82
|
-
const mt = Object.assign(oe, {
|
|
83
|
-
install: (s, e) => {
|
|
84
|
-
var l;
|
|
85
|
-
const u = (l = e == null ? void 0 : e.iconPrefix) != null ? l : "";
|
|
86
|
-
s.component(u + oe.name, oe);
|
|
87
|
-
}
|
|
88
|
-
}), gt = {
|
|
89
|
-
class: "feedback-video-preview__header"
|
|
90
|
-
}, bt = {
|
|
91
|
-
class: "feedback-video-preview__title"
|
|
92
|
-
}, kt = {
|
|
93
|
-
class: "feedback-video-preview__stage"
|
|
94
|
-
}, _t = ["src"], yt = /* @__PURE__ */ D({
|
|
95
|
-
__name: "FeedbackVideoPreview",
|
|
96
|
-
props: /* @__PURE__ */ Ke({
|
|
97
|
-
src: {
|
|
98
|
-
type: String,
|
|
99
|
-
default: ""
|
|
100
|
-
},
|
|
101
|
-
title: {
|
|
102
|
-
type: String,
|
|
103
|
-
default: ""
|
|
104
|
-
}
|
|
105
|
-
}, {
|
|
106
|
-
visible: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: !1
|
|
109
|
-
},
|
|
110
|
-
visibleModifiers: {}
|
|
111
|
-
}),
|
|
112
|
-
emits: ["update:visible"],
|
|
113
|
-
setup(s) {
|
|
114
|
-
const e = Ne(s, "visible"), l = s;
|
|
115
|
-
function u() {
|
|
116
|
-
e.value = !1;
|
|
117
|
-
}
|
|
118
|
-
return (k, i) => (a(), B(je, {
|
|
119
|
-
to: "body"
|
|
120
|
-
}, [e.value ? (a(), o("div", {
|
|
121
|
-
key: 0,
|
|
122
|
-
class: "feedback-video-preview",
|
|
123
|
-
tabindex: "0",
|
|
124
|
-
onClick: u,
|
|
125
|
-
onKeydown: We(u, ["esc"])
|
|
126
|
-
}, [_("div", gt, [_("div", bt, F(l.title), 1), _("button", {
|
|
127
|
-
type: "button",
|
|
128
|
-
class: "feedback-video-preview__close",
|
|
129
|
-
onClick: K(u, ["stop"])
|
|
130
|
-
}, " × ")]), _("div", kt, [l.src ? (a(), o("video", {
|
|
131
|
-
key: 0,
|
|
132
|
-
class: "feedback-video-preview__video",
|
|
133
|
-
src: l.src,
|
|
134
|
-
controls: "",
|
|
135
|
-
autoplay: "",
|
|
136
|
-
onClick: i[0] || (i[0] = K(() => {
|
|
137
|
-
}, ["stop"]))
|
|
138
|
-
}, null, 8, _t)) : R("", !0)])], 32)) : R("", !0)]));
|
|
139
|
-
}
|
|
140
|
-
}), de = /* @__PURE__ */ W(yt, [["__scopeId", "data-v-39688d03"]]), ht = {
|
|
141
|
-
key: 0,
|
|
142
|
-
class: "message-attachments"
|
|
143
|
-
}, wt = ["title", "onClick"], Ct = ["src", "alt"], xt = ["title", "onClick"], $t = ["src"], Ut = ["href", "title"], Ft = {
|
|
144
|
-
class: "message-attachment-main"
|
|
145
|
-
}, St = {
|
|
146
|
-
class: "message-attachment-name"
|
|
147
|
-
}, It = {
|
|
148
|
-
class: "message-attachment-meta"
|
|
149
|
-
}, At = /* @__PURE__ */ D({
|
|
150
|
-
__name: "FeedbackMessageAttachments",
|
|
151
|
-
props: {
|
|
152
|
-
attachments: {
|
|
153
|
-
type: Array,
|
|
154
|
-
default: () => []
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
setup(s) {
|
|
158
|
-
const e = s, l = g(!1), u = g(0), k = g(!1), i = g(""), b = g(""), h = A(() => e.attachments.filter((c) => c.kind === "image")), x = A(() => e.attachments.filter((c) => c.kind === "video")), P = A(() => e.attachments.filter((c) => c.kind === "file")), V = A(() => h.value.map((c) => c.url || ""));
|
|
159
|
-
function w(c) {
|
|
160
|
-
u.value = c, l.value = !0;
|
|
161
|
-
}
|
|
162
|
-
function C(c) {
|
|
163
|
-
i.value = c.url || "", b.value = c.name, k.value = !0;
|
|
164
|
-
}
|
|
165
|
-
function I(c) {
|
|
166
|
-
return c < 1024 ? `${c} B` : c < 1024 * 1024 ? `${(c / 1024).toFixed(1)} KB` : c < 1024 * 1024 * 1024 ? `${(c / 1024 / 1024).toFixed(1)} MB` : `${(c / 1024 / 1024 / 1024).toFixed(1)} GB`;
|
|
167
|
-
}
|
|
168
|
-
return (c, $) => (a(), o(L, null, [e.attachments.length > 0 ? (a(), o("div", ht, [(a(!0), o(L, null, q(h.value, (m, S) => (a(), o("button", {
|
|
169
|
-
key: m.key,
|
|
170
|
-
type: "button",
|
|
171
|
-
class: "message-media message-media--image",
|
|
172
|
-
title: m.name,
|
|
173
|
-
onClick: (Z) => w(S)
|
|
174
|
-
}, [_("img", {
|
|
175
|
-
src: m.url,
|
|
176
|
-
alt: m.name,
|
|
177
|
-
class: "message-media__content"
|
|
178
|
-
}, null, 8, Ct)], 8, wt))), 128)), (a(!0), o(L, null, q(x.value, (m) => (a(), o("button", {
|
|
179
|
-
key: m.key,
|
|
180
|
-
type: "button",
|
|
181
|
-
class: "message-media message-media--video",
|
|
182
|
-
title: m.name,
|
|
183
|
-
onClick: (S) => C(m)
|
|
184
|
-
}, [_("video", {
|
|
185
|
-
class: "message-media__content",
|
|
186
|
-
src: m.url,
|
|
187
|
-
muted: "",
|
|
188
|
-
preload: "metadata"
|
|
189
|
-
}, null, 8, $t), $[3] || ($[3] = _("span", {
|
|
190
|
-
class: "message-video-play"
|
|
191
|
-
}, "播放", -1))], 8, xt))), 128)), (a(!0), o(L, null, q(P.value, (m) => (a(), o("a", {
|
|
192
|
-
key: m.key,
|
|
193
|
-
class: "message-file",
|
|
194
|
-
href: m.url,
|
|
195
|
-
target: "_blank",
|
|
196
|
-
rel: "noopener noreferrer",
|
|
197
|
-
title: m.name
|
|
198
|
-
}, [$[4] || ($[4] = _("span", {
|
|
199
|
-
class: "message-file-icon"
|
|
200
|
-
}, "FILE", -1)), _("span", Ft, [_("span", St, F(m.name), 1), _("span", It, F(I(m.size)), 1)])], 8, Ut))), 128))])) : R("", !0), v(t(ce), {
|
|
201
|
-
"src-list": V.value,
|
|
202
|
-
visible: l.value,
|
|
203
|
-
"onUpdate:visible": $[0] || ($[0] = (m) => l.value = m),
|
|
204
|
-
current: u.value,
|
|
205
|
-
"onUpdate:current": $[1] || ($[1] = (m) => u.value = m)
|
|
206
|
-
}, null, 8, ["src-list", "visible", "current"]), v(de, {
|
|
207
|
-
visible: k.value,
|
|
208
|
-
"onUpdate:visible": $[2] || ($[2] = (m) => k.value = m),
|
|
209
|
-
title: b.value,
|
|
210
|
-
src: i.value
|
|
211
|
-
}, null, 8, ["visible", "title", "src"])], 64));
|
|
212
|
-
}
|
|
213
|
-
}), we = /* @__PURE__ */ W(At, [["__scopeId", "data-v-90f40f22"]]), Pt = /* @__PURE__ */ D({
|
|
214
|
-
__name: "FeedbackRefresh",
|
|
215
|
-
setup(s) {
|
|
216
|
-
return (e, l) => (a(), B(t(ot), {
|
|
217
|
-
class: "icon",
|
|
218
|
-
icon: "mingcute:refresh-2-line"
|
|
219
|
-
}));
|
|
220
|
-
}
|
|
221
|
-
}), _e = /* @__PURE__ */ W(Pt, [["__scopeId", "data-v-64bb6fc2"]]), Rt = ["src"], Tt = {
|
|
222
|
-
key: 1
|
|
223
|
-
}, Bt = {
|
|
224
|
-
class: "feedback-message-body"
|
|
225
|
-
}, Vt = {
|
|
226
|
-
key: 0,
|
|
227
|
-
class: "feedback-text-bubble"
|
|
228
|
-
}, Lt = {
|
|
229
|
-
key: 1,
|
|
230
|
-
class: "feedback-bubble-stack feedback-bubble-stack--end"
|
|
231
|
-
}, Mt = ["src"], Et = {
|
|
232
|
-
key: 1
|
|
233
|
-
}, Dt = /* @__PURE__ */ D({
|
|
234
|
-
__name: "FeedbackBubbleEnd",
|
|
235
|
-
props: {
|
|
236
|
-
text: {
|
|
237
|
-
type: String,
|
|
238
|
-
default: ""
|
|
239
|
-
},
|
|
240
|
-
attachments: {
|
|
241
|
-
type: Array,
|
|
242
|
-
default: () => []
|
|
243
|
-
},
|
|
244
|
-
avatarUrl: {
|
|
245
|
-
type: String,
|
|
246
|
-
default: ""
|
|
247
|
-
},
|
|
248
|
-
avatarText: {
|
|
249
|
-
type: String,
|
|
250
|
-
default: "U"
|
|
251
|
-
},
|
|
252
|
-
bubbleStyle: {
|
|
253
|
-
type: Object,
|
|
254
|
-
default: () => ({
|
|
255
|
-
paddingLeft: "52px"
|
|
256
|
-
})
|
|
257
|
-
},
|
|
258
|
-
showRefresh: {
|
|
259
|
-
type: Boolean,
|
|
260
|
-
default: !1
|
|
261
|
-
},
|
|
262
|
-
showClipboard: {
|
|
263
|
-
type: Boolean,
|
|
264
|
-
default: !1
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
emits: ["refresh"],
|
|
268
|
-
setup(s, {
|
|
269
|
-
emit: e
|
|
270
|
-
}) {
|
|
271
|
-
const l = s, u = e;
|
|
272
|
-
function k(x) {
|
|
273
|
-
return x.startsWith("http://") || x.startsWith("https://") || x.startsWith("data:");
|
|
274
|
-
}
|
|
275
|
-
const i = A(() => {
|
|
276
|
-
const x = l.avatarUrl.trim();
|
|
277
|
-
return k(x) ? x : "";
|
|
278
|
-
}), b = A(() => l.attachments.length > 0);
|
|
279
|
-
function h() {
|
|
280
|
-
u("refresh");
|
|
281
|
-
}
|
|
282
|
-
return (x, P) => b.value ? (a(), o("div", {
|
|
283
|
-
key: 0,
|
|
284
|
-
class: "feedback-message-group feedback-message-group--end",
|
|
285
|
-
style: J(l.bubbleStyle)
|
|
286
|
-
}, [v(t(ne), {
|
|
287
|
-
class: "feedback-message-avatar"
|
|
288
|
-
}, {
|
|
289
|
-
default: f(() => [i.value ? (a(), o("img", {
|
|
290
|
-
key: 0,
|
|
291
|
-
alt: "avatar",
|
|
292
|
-
src: i.value
|
|
293
|
-
}, null, 8, Rt)) : (a(), o("span", Tt, F(l.avatarText), 1))]),
|
|
294
|
-
_: 1
|
|
295
|
-
}), _("div", Bt, [l.text ? (a(), o("div", Vt, F(l.text), 1)) : R("", !0), l.showClipboard || l.showRefresh ? (a(), B(t(le), {
|
|
296
|
-
key: 1,
|
|
297
|
-
class: "feedback-message-footer"
|
|
298
|
-
}, {
|
|
299
|
-
default: f(() => [l.showClipboard ? (a(), B(re, {
|
|
300
|
-
key: 0,
|
|
301
|
-
value: l.text
|
|
302
|
-
}, null, 8, ["value"])) : R("", !0), l.showRefresh ? (a(), B(_e, {
|
|
303
|
-
key: 1,
|
|
304
|
-
onClick: h
|
|
305
|
-
})) : R("", !0)]),
|
|
306
|
-
_: 1
|
|
307
|
-
})) : R("", !0), v(we, {
|
|
308
|
-
attachments: l.attachments
|
|
309
|
-
}, null, 8, ["attachments"])])], 4)) : (a(), o("div", Lt, [v(t(he), {
|
|
310
|
-
placement: "end",
|
|
311
|
-
style: J(l.bubbleStyle)
|
|
312
|
-
}, {
|
|
313
|
-
avatar: f(() => [v(t(ne), null, {
|
|
314
|
-
default: f(() => [i.value ? (a(), o("img", {
|
|
315
|
-
key: 0,
|
|
316
|
-
alt: "avatar",
|
|
317
|
-
src: i.value
|
|
318
|
-
}, null, 8, Mt)) : (a(), o("span", Et, F(l.avatarText), 1))]),
|
|
319
|
-
_: 1
|
|
320
|
-
})]),
|
|
321
|
-
message: f(() => [l.text ? (a(), o(L, {
|
|
322
|
-
key: 0
|
|
323
|
-
}, [M(F(l.text), 1)], 64)) : R("", !0)]),
|
|
324
|
-
footer: f(() => [v(t(le), null, {
|
|
325
|
-
default: f(() => [l.showClipboard && l.text ? (a(), B(re, {
|
|
326
|
-
key: 0,
|
|
327
|
-
value: l.text
|
|
328
|
-
}, null, 8, ["value"])) : R("", !0), l.showRefresh ? (a(), B(_e, {
|
|
329
|
-
key: 1,
|
|
330
|
-
onClick: h
|
|
331
|
-
})) : R("", !0)]),
|
|
332
|
-
_: 1
|
|
333
|
-
})]),
|
|
334
|
-
_: 1
|
|
335
|
-
}, 8, ["style"])]));
|
|
336
|
-
}
|
|
337
|
-
}), qt = /* @__PURE__ */ W(Dt, [["__scopeId", "data-v-ed8f32cc"]]), zt = ["src"], Ot = {
|
|
338
|
-
key: 1
|
|
339
|
-
}, Nt = {
|
|
340
|
-
class: "feedback-message-body"
|
|
341
|
-
}, jt = {
|
|
342
|
-
key: 0,
|
|
343
|
-
class: "feedback-text-bubble"
|
|
344
|
-
}, Wt = {
|
|
345
|
-
key: 1,
|
|
346
|
-
class: "feedback-bubble-stack feedback-bubble-stack--start"
|
|
347
|
-
}, Kt = ["src"], Ht = {
|
|
348
|
-
key: 1
|
|
349
|
-
}, Gt = /* @__PURE__ */ D({
|
|
350
|
-
__name: "FeedbackBubbleStart",
|
|
351
|
-
props: {
|
|
352
|
-
text: {
|
|
353
|
-
type: String,
|
|
354
|
-
default: ""
|
|
355
|
-
},
|
|
356
|
-
attachments: {
|
|
357
|
-
type: Array,
|
|
358
|
-
default: () => []
|
|
359
|
-
},
|
|
360
|
-
avatarUrl: {
|
|
361
|
-
type: String,
|
|
362
|
-
default: ""
|
|
363
|
-
},
|
|
364
|
-
avatarText: {
|
|
365
|
-
type: String,
|
|
366
|
-
default: "U"
|
|
367
|
-
},
|
|
368
|
-
bubbleStyle: {
|
|
369
|
-
type: Object,
|
|
370
|
-
default: () => ({
|
|
371
|
-
paddingRight: "52px"
|
|
372
|
-
})
|
|
373
|
-
},
|
|
374
|
-
showClipboard: {
|
|
375
|
-
type: Boolean,
|
|
376
|
-
default: !1
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
setup(s) {
|
|
380
|
-
const e = s;
|
|
381
|
-
function l(i) {
|
|
382
|
-
return i.startsWith("http://") || i.startsWith("https://") || i.startsWith("data:");
|
|
383
|
-
}
|
|
384
|
-
const u = A(() => {
|
|
385
|
-
const i = e.avatarUrl.trim();
|
|
386
|
-
return l(i) ? i : "";
|
|
387
|
-
}), k = A(() => e.attachments.length > 0);
|
|
388
|
-
return (i, b) => k.value ? (a(), o("div", {
|
|
389
|
-
key: 0,
|
|
390
|
-
class: "feedback-message-group feedback-message-group--start",
|
|
391
|
-
style: J(e.bubbleStyle)
|
|
392
|
-
}, [v(t(ne), {
|
|
393
|
-
class: "feedback-message-avatar"
|
|
394
|
-
}, {
|
|
395
|
-
default: f(() => [u.value ? (a(), o("img", {
|
|
396
|
-
key: 0,
|
|
397
|
-
alt: "avatar",
|
|
398
|
-
src: u.value
|
|
399
|
-
}, null, 8, zt)) : (a(), o("span", Ot, F(e.avatarText), 1))]),
|
|
400
|
-
_: 1
|
|
401
|
-
}), _("div", Nt, [e.text ? (a(), o("div", jt, F(e.text), 1)) : R("", !0), e.showClipboard ? (a(), B(t(le), {
|
|
402
|
-
key: 1,
|
|
403
|
-
class: "feedback-message-footer"
|
|
404
|
-
}, {
|
|
405
|
-
default: f(() => [v(re, {
|
|
406
|
-
value: e.text
|
|
407
|
-
}, null, 8, ["value"])]),
|
|
408
|
-
_: 1
|
|
409
|
-
})) : R("", !0), v(we, {
|
|
410
|
-
attachments: e.attachments
|
|
411
|
-
}, null, 8, ["attachments"])])], 4)) : (a(), o("div", Wt, [v(t(he), {
|
|
412
|
-
placement: "start",
|
|
413
|
-
style: J(e.bubbleStyle)
|
|
414
|
-
}, {
|
|
415
|
-
avatar: f(() => [v(t(ne), null, {
|
|
416
|
-
default: f(() => [u.value ? (a(), o("img", {
|
|
417
|
-
key: 0,
|
|
418
|
-
alt: "avatar",
|
|
419
|
-
src: u.value
|
|
420
|
-
}, null, 8, Kt)) : (a(), o("span", Ht, F(e.avatarText), 1))]),
|
|
421
|
-
_: 1
|
|
422
|
-
})]),
|
|
423
|
-
message: f(() => [e.text ? (a(), o(L, {
|
|
424
|
-
key: 0
|
|
425
|
-
}, [M(F(e.text), 1)], 64)) : R("", !0)]),
|
|
426
|
-
footer: f(() => [v(t(le), null, {
|
|
427
|
-
default: f(() => [e.showClipboard && e.text ? (a(), B(re, {
|
|
428
|
-
key: 0,
|
|
429
|
-
value: e.text
|
|
430
|
-
}, null, 8, ["value"])) : R("", !0)]),
|
|
431
|
-
_: 1
|
|
432
|
-
})]),
|
|
433
|
-
_: 1
|
|
434
|
-
}, 8, ["style"])]));
|
|
435
|
-
}
|
|
436
|
-
}), Xt = /* @__PURE__ */ W(Gt, [["__scopeId", "data-v-a88b5650"]]), Ce = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".mp4", ".webm", ".mov", ".pdf", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".txt", ".md", ".csv", ".json", ".zip"], xe = Ce.join(","), Yt = /* @__PURE__ */ new Set(["image/jpeg", "image/png", "image/gif", "image/webp"]), Jt = /* @__PURE__ */ new Set(["video/mp4", "video/webm", "video/quicktime"]);
|
|
437
|
-
function Zt(s) {
|
|
438
|
-
const e = s.lastIndexOf(".");
|
|
439
|
-
return e < 0 ? "" : s.slice(e).toLowerCase();
|
|
440
|
-
}
|
|
441
|
-
function Qt(s) {
|
|
442
|
-
return Ce.includes(Zt(s.name));
|
|
443
|
-
}
|
|
444
|
-
function $e(s, e = s.type) {
|
|
445
|
-
return Yt.has(e) ? "image" : Jt.has(e) ? "video" : "file";
|
|
446
|
-
}
|
|
447
|
-
const te = 9;
|
|
448
|
-
function ea(s) {
|
|
449
|
-
const e = $e(s);
|
|
450
|
-
return {
|
|
451
|
-
id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
452
|
-
file: s,
|
|
453
|
-
kind: e,
|
|
454
|
-
previewUrl: e === "image" || e === "video" ? URL.createObjectURL(s) : void 0
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
function Ue(s) {
|
|
458
|
-
const e = g([]), l = A(() => e.value.length > 0), u = A(() => e.value.filter((w) => w.kind === "image" && !!w.previewUrl)), k = A(() => e.value.filter((w) => w.kind === "video" && !!w.previewUrl)), i = A(() => e.value.filter((w) => w.kind === "file"));
|
|
459
|
-
function b(w) {
|
|
460
|
-
s == null || s(w);
|
|
461
|
-
}
|
|
462
|
-
function h(w) {
|
|
463
|
-
w.previewUrl && URL.revokeObjectURL(w.previewUrl);
|
|
464
|
-
}
|
|
465
|
-
function x(w) {
|
|
466
|
-
if (w.length === 0) return;
|
|
467
|
-
const C = w.filter(Qt);
|
|
468
|
-
if (w.length - C.length > 0 && b("仅支持常见图片、浏览器可预览视频、文档、文本、CSV、JSON 和 ZIP 文件"), C.length === 0) return;
|
|
469
|
-
const c = te - e.value.length;
|
|
470
|
-
if (c <= 0) {
|
|
471
|
-
b(`最多只能添加 ${te} 个附件`);
|
|
472
|
-
return;
|
|
473
|
-
}
|
|
474
|
-
const $ = C.slice(0, c);
|
|
475
|
-
C.length > c && b(`最多只能添加 ${te} 个附件,已跳过多余文件`), e.value.push(...$.map(ea));
|
|
476
|
-
}
|
|
477
|
-
function P(w) {
|
|
478
|
-
const C = e.value[w];
|
|
479
|
-
C && (h(C), e.value.splice(w, 1));
|
|
480
|
-
}
|
|
481
|
-
function V() {
|
|
482
|
-
e.value.forEach(h), e.value = [];
|
|
483
|
-
}
|
|
484
|
-
return He(() => {
|
|
485
|
-
V();
|
|
486
|
-
}), {
|
|
487
|
-
items: e,
|
|
488
|
-
imageItems: u,
|
|
489
|
-
videoItems: k,
|
|
490
|
-
fileItems: i,
|
|
491
|
-
hasAttachments: l,
|
|
492
|
-
addFiles: x,
|
|
493
|
-
removeAt: P,
|
|
494
|
-
clear: V,
|
|
495
|
-
maxAttachments: te
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
function ta(s, e) {
|
|
499
|
-
const {
|
|
500
|
-
uploadFile: l
|
|
501
|
-
} = lt();
|
|
502
|
-
return new Promise((u, k) => {
|
|
503
|
-
l({
|
|
504
|
-
file: s,
|
|
505
|
-
bucketId: e,
|
|
506
|
-
onFileFinish(i, b, h) {
|
|
507
|
-
if (i) {
|
|
508
|
-
k(i);
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
|
-
u(h.Key);
|
|
512
|
-
},
|
|
513
|
-
onError(i) {
|
|
514
|
-
k(i);
|
|
515
|
-
}
|
|
516
|
-
});
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
async function Fe(s, e) {
|
|
520
|
-
const l = [];
|
|
521
|
-
for (const u of s) {
|
|
522
|
-
const k = await ta(u, e), i = nt(u);
|
|
523
|
-
l.push({
|
|
524
|
-
key: k,
|
|
525
|
-
name: u.name,
|
|
526
|
-
size: u.size,
|
|
527
|
-
mimeType: i,
|
|
528
|
-
kind: $e(u, i)
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
return l;
|
|
532
|
-
}
|
|
533
|
-
function aa(s, e = {}) {
|
|
534
|
-
const {
|
|
535
|
-
interval: l = 2e3,
|
|
536
|
-
immediate: u = !1,
|
|
537
|
-
autoStart: k = !1
|
|
538
|
-
} = e, i = g(!1);
|
|
539
|
-
let b = null;
|
|
540
|
-
async function h() {
|
|
541
|
-
try {
|
|
542
|
-
await s();
|
|
543
|
-
} catch (w) {
|
|
544
|
-
console.error("轮询回调执行失败:", w);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
function x() {
|
|
548
|
-
if (i.value) {
|
|
549
|
-
console.warn("轮询已在运行中");
|
|
550
|
-
return;
|
|
551
|
-
}
|
|
552
|
-
i.value = !0, u && h(), b = setInterval(h, l);
|
|
553
|
-
}
|
|
554
|
-
function P() {
|
|
555
|
-
b && (clearInterval(b), b = null), i.value = !1;
|
|
556
|
-
}
|
|
557
|
-
function V() {
|
|
558
|
-
P(), x();
|
|
559
|
-
}
|
|
560
|
-
return k && x(), Ge(() => {
|
|
561
|
-
P();
|
|
562
|
-
}), {
|
|
563
|
-
isPolling: i,
|
|
564
|
-
start: x,
|
|
565
|
-
stop: P,
|
|
566
|
-
restart: V
|
|
567
|
-
};
|
|
568
|
-
}
|
|
569
|
-
const ve = [{
|
|
570
|
-
key: "bugReports",
|
|
571
|
-
label: "问题报告"
|
|
572
|
-
}, {
|
|
573
|
-
key: "featureSuggestions",
|
|
574
|
-
label: "功能建议"
|
|
575
|
-
}, {
|
|
576
|
-
key: "technicalSupportRequests",
|
|
577
|
-
label: "技术支持请求"
|
|
578
|
-
}, {
|
|
579
|
-
key: "generalOpinions",
|
|
580
|
-
label: "一般意见"
|
|
581
|
-
}], Se = [{
|
|
582
|
-
key: "urgent",
|
|
583
|
-
label: "紧急"
|
|
584
|
-
}, {
|
|
585
|
-
key: "high",
|
|
586
|
-
label: "高"
|
|
587
|
-
}, {
|
|
588
|
-
key: "normal",
|
|
589
|
-
label: "普通"
|
|
590
|
-
}, {
|
|
591
|
-
key: "low",
|
|
592
|
-
label: "低"
|
|
593
|
-
}], Ie = [{
|
|
594
|
-
key: "newFeedback",
|
|
595
|
-
label: "新反馈"
|
|
596
|
-
}, {
|
|
597
|
-
key: "inProgress",
|
|
598
|
-
label: "处理中"
|
|
599
|
-
}, {
|
|
600
|
-
key: "pending",
|
|
601
|
-
label: "待处理"
|
|
602
|
-
}, {
|
|
603
|
-
key: "resolved",
|
|
604
|
-
label: "已解决"
|
|
605
|
-
}, {
|
|
606
|
-
key: "closed",
|
|
607
|
-
label: "已关闭"
|
|
608
|
-
}];
|
|
609
|
-
function sa(s) {
|
|
610
|
-
return s ? s.startsWith("http://") || s.startsWith("https://") || s.startsWith("data:") : !1;
|
|
611
|
-
}
|
|
612
|
-
function ae(s) {
|
|
613
|
-
const e = (s.attachments ?? []).filter((l) => sa(l.url));
|
|
614
|
-
return {
|
|
615
|
-
text: s.content ?? "",
|
|
616
|
-
attachments: e
|
|
617
|
-
};
|
|
618
|
-
}
|
|
619
|
-
const na = {
|
|
620
|
-
class: "FeedBackDetails"
|
|
621
|
-
}, la = {
|
|
622
|
-
class: "scrollable-content__inner"
|
|
623
|
-
}, ia = {
|
|
624
|
-
class: "content"
|
|
625
|
-
}, ra = {
|
|
626
|
-
class: "empty-title"
|
|
627
|
-
}, oa = {
|
|
628
|
-
class: "empty-tips"
|
|
629
|
-
}, ua = {
|
|
630
|
-
key: 1,
|
|
631
|
-
class: "Bubbles"
|
|
632
|
-
}, ca = {
|
|
633
|
-
class: "sender-container"
|
|
634
|
-
}, da = {
|
|
635
|
-
key: 0,
|
|
636
|
-
class: "attachments-preview"
|
|
637
|
-
}, va = ["onClick"], fa = ["src"], pa = ["src"], ma = {
|
|
638
|
-
class: "attachment-file-name"
|
|
639
|
-
}, ga = ["onClick"], ba = ["accept"], ka = /* @__PURE__ */ D({
|
|
640
|
-
__name: "FeedbackDetails",
|
|
641
|
-
props: {
|
|
642
|
-
id: {
|
|
643
|
-
type: String,
|
|
644
|
-
required: !0,
|
|
645
|
-
default: () => ""
|
|
646
|
-
},
|
|
647
|
-
senderRole: {
|
|
648
|
-
type: String,
|
|
649
|
-
required: !0,
|
|
650
|
-
validator: (s) => ["user", "support"].includes(s)
|
|
651
|
-
}
|
|
652
|
-
},
|
|
653
|
-
setup(s) {
|
|
654
|
-
function e(r) {
|
|
655
|
-
return r === "inProgress" ? "orangered" : r === "pending" ? "gold" : r === "resolved" ? "green" : r === "closed" ? "gray" : "arcoblue";
|
|
656
|
-
}
|
|
657
|
-
const l = g(""), u = g(!1), k = g(null), i = g(null), b = g(null), h = g(!1), x = g(!1), P = g(0), V = g(!1), w = g(""), C = g(""), I = Ue((r) => {
|
|
658
|
-
ie.warning(r);
|
|
659
|
-
}), c = A(() => I.imageItems.value.map((r) => r.previewUrl || "")), $ = A(() => l.value.trim().length > 0 || I.hasAttachments.value), m = () => {
|
|
660
|
-
var r;
|
|
661
|
-
(r = k.value) == null || r.focus({
|
|
662
|
-
cursor: "end"
|
|
663
|
-
}), Q(() => {
|
|
664
|
-
i.value && (i.value.scrollTop = i.value.scrollHeight);
|
|
665
|
-
});
|
|
666
|
-
}, S = s, Z = A(() => S.senderRole === "support" ? "暂无沟通记录" : "还没有消息"), U = A(() => S.senderRole === "support" ? ["可在下方输入框回复用户", "支持发送文字、图片和文件附件"] : ["请尽量详细描述问题或需求", "可上传多张图片或文件附件,支持与文字一起发送"]), y = A(() => S.senderRole === "support" ? "输入回复内容,Enter 发送" : "补充问题描述或追问,Enter 发送"), p = g(!1), E = g([]), z = g(void 0);
|
|
667
|
-
function Ae(r, d) {
|
|
668
|
-
const n = "seq" in r && typeof r.seq == "number" ? r.seq : d;
|
|
669
|
-
return `${r.senderRole}-${n}-${d}`;
|
|
670
|
-
}
|
|
671
|
-
function fe(r) {
|
|
672
|
-
var d;
|
|
673
|
-
return String(((d = r.senderInfo) == null ? void 0 : d.avatarUrl) || "");
|
|
674
|
-
}
|
|
675
|
-
function pe(r) {
|
|
676
|
-
var n;
|
|
677
|
-
const d = String(((n = r.senderInfo) == null ? void 0 : n.nickname) || "").trim();
|
|
678
|
-
return d ? d.slice(0, 1).toUpperCase() : r.senderRole === "support" ? "S" : "U";
|
|
679
|
-
}
|
|
680
|
-
const N = g({
|
|
681
|
-
id: void 0,
|
|
682
|
-
title: "",
|
|
683
|
-
description: "",
|
|
684
|
-
type: "bugReports",
|
|
685
|
-
status: "newFeedback",
|
|
686
|
-
reply: "",
|
|
687
|
-
createAt: ""
|
|
688
|
-
});
|
|
689
|
-
function Pe() {
|
|
690
|
-
var r;
|
|
691
|
-
(r = b.value) == null || r.click();
|
|
692
|
-
}
|
|
693
|
-
function Re(r) {
|
|
694
|
-
const d = r.target, n = d.files;
|
|
695
|
-
n != null && n.length && I.addFiles(Array.from(n)), d.value = "";
|
|
696
|
-
}
|
|
697
|
-
function Te(r) {
|
|
698
|
-
if (r.kind === "image" && r.previewUrl) {
|
|
699
|
-
const d = I.imageItems.value.findIndex((n) => n.id === r.id);
|
|
700
|
-
if (d < 0) return;
|
|
701
|
-
P.value = d, x.value = !0;
|
|
702
|
-
return;
|
|
703
|
-
}
|
|
704
|
-
r.kind === "video" && r.previewUrl && (w.value = r.previewUrl, C.value = r.file.name, V.value = !0);
|
|
705
|
-
}
|
|
706
|
-
function Be(r) {
|
|
707
|
-
var T;
|
|
708
|
-
const d = (T = r.clipboardData) == null ? void 0 : T.items;
|
|
709
|
-
if (!d) return;
|
|
710
|
-
const n = [];
|
|
711
|
-
for (const O of d)
|
|
712
|
-
if (O.type.startsWith("image/")) {
|
|
713
|
-
const H = O.getAsFile();
|
|
714
|
-
H && n.push(H);
|
|
715
|
-
}
|
|
716
|
-
n.length > 0 && (r.preventDefault(), I.addFiles(n));
|
|
717
|
-
}
|
|
718
|
-
function Ve(r) {
|
|
719
|
-
var d;
|
|
720
|
-
(d = r.dataTransfer) != null && d.types.includes("Files") && (h.value = !0);
|
|
721
|
-
}
|
|
722
|
-
function Le() {
|
|
723
|
-
h.value = !1;
|
|
724
|
-
}
|
|
725
|
-
function Me(r) {
|
|
726
|
-
var n;
|
|
727
|
-
h.value = !1;
|
|
728
|
-
const d = (n = r.dataTransfer) == null ? void 0 : n.files;
|
|
729
|
-
d && I.addFiles(Array.from(d));
|
|
730
|
-
}
|
|
731
|
-
async function Ee() {
|
|
732
|
-
S.senderRole === "support" && N.value.status === "newFeedback" && await me();
|
|
733
|
-
}
|
|
734
|
-
async function De() {
|
|
735
|
-
const r = l.value, d = I.items.value.map((n) => n.file);
|
|
736
|
-
if (!(!r.trim() && d.length === 0)) {
|
|
737
|
-
u.value = !0;
|
|
738
|
-
try {
|
|
739
|
-
const n = d.length > 0 ? await Fe(d, ye.feedbackBucketId) : [], T = r.trim(), {
|
|
740
|
-
data: O
|
|
741
|
-
} = await j.feedbackCenter.update.messages.post({
|
|
742
|
-
id: S.id,
|
|
743
|
-
message: {
|
|
744
|
-
type: "text",
|
|
745
|
-
content: T,
|
|
746
|
-
attachments: n,
|
|
747
|
-
senderRole: S.senderRole
|
|
748
|
-
}
|
|
749
|
-
});
|
|
750
|
-
if (O) {
|
|
751
|
-
E.value.push(O.message);
|
|
752
|
-
const H = O.message.seq;
|
|
753
|
-
typeof H == "number" && (z.value = H), l.value = "", I.clear(), Q(() => {
|
|
754
|
-
m();
|
|
755
|
-
}), await Ee();
|
|
756
|
-
}
|
|
757
|
-
} catch {
|
|
758
|
-
ie.error("发送失败,请稍后重试");
|
|
759
|
-
} finally {
|
|
760
|
-
u.value = !1;
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
async function me() {
|
|
765
|
-
p.value = !0;
|
|
766
|
-
const {
|
|
767
|
-
data: r
|
|
768
|
-
} = await j.feedbackCenter.findOne.post({
|
|
769
|
-
id: S.id
|
|
770
|
-
});
|
|
771
|
-
p.value = !1, r && (N.value = r);
|
|
772
|
-
}
|
|
773
|
-
async function qe() {
|
|
774
|
-
var d;
|
|
775
|
-
const {
|
|
776
|
-
data: r
|
|
777
|
-
} = await j.messages.list.incremental.post({
|
|
778
|
-
id: S.id,
|
|
779
|
-
lastSeq: z.value
|
|
780
|
-
});
|
|
781
|
-
if (r && ((d = r.messages) != null && d.length)) {
|
|
782
|
-
const n = r.messages;
|
|
783
|
-
E.value.push(...n);
|
|
784
|
-
const T = n.at(-1);
|
|
785
|
-
T && "seq" in T && typeof T.seq == "number" && (z.value = T.seq), Q(() => {
|
|
786
|
-
m();
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
async function ze() {
|
|
791
|
-
var d;
|
|
792
|
-
p.value = !0;
|
|
793
|
-
const {
|
|
794
|
-
data: r
|
|
795
|
-
} = await j.messages.list.post({
|
|
796
|
-
id: S.id
|
|
797
|
-
});
|
|
798
|
-
if (p.value = !1, r && ((d = r.messages) != null && d.length)) {
|
|
799
|
-
const n = r.messages;
|
|
800
|
-
E.value = n;
|
|
801
|
-
const T = n.at(-1);
|
|
802
|
-
T && "seq" in T && typeof T.seq == "number" && (z.value = T.seq), Q(() => {
|
|
803
|
-
m();
|
|
804
|
-
});
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
return aa(qe, {
|
|
808
|
-
interval: 2e3,
|
|
809
|
-
autoStart: !0
|
|
810
|
-
}), me(), ze(), (r, d) => (a(), o("div", na, [_("div", {
|
|
811
|
-
ref_key: "scrollableContentRef",
|
|
812
|
-
ref: i,
|
|
813
|
-
class: "scrollable-content"
|
|
814
|
-
}, [_("div", la, [v(t(Xe), {
|
|
815
|
-
title: "基本信息"
|
|
816
|
-
}, {
|
|
817
|
-
title: f(() => [...d[4] || (d[4] = [_("div", {
|
|
818
|
-
class: "title"
|
|
819
|
-
}, "基本信息", -1)])]),
|
|
820
|
-
default: f(() => [v(t(ee), {
|
|
821
|
-
label: "标题:",
|
|
822
|
-
span: 3
|
|
823
|
-
}, {
|
|
824
|
-
default: f(() => [M(F(N.value.title), 1)]),
|
|
825
|
-
_: 1
|
|
826
|
-
}), v(t(ee), {
|
|
827
|
-
label: "问题描述:",
|
|
828
|
-
span: 3
|
|
829
|
-
}, {
|
|
830
|
-
default: f(() => [M(F(N.value.description || "-"), 1)]),
|
|
831
|
-
_: 1
|
|
832
|
-
}), v(t(ee), {
|
|
833
|
-
label: "反馈类型:",
|
|
834
|
-
span: 1
|
|
835
|
-
}, {
|
|
836
|
-
default: f(() => [v(t(X), {
|
|
837
|
-
color: "arcoblue"
|
|
838
|
-
}, {
|
|
839
|
-
default: f(() => {
|
|
840
|
-
var n;
|
|
841
|
-
return [M(F((n = t(Y)(t(ve), N.value.type)) == null ? void 0 : n.label), 1)];
|
|
842
|
-
}),
|
|
843
|
-
_: 1
|
|
844
|
-
})]),
|
|
845
|
-
_: 1
|
|
846
|
-
}), v(t(ee), {
|
|
847
|
-
label: "状态:",
|
|
848
|
-
span: 1
|
|
849
|
-
}, {
|
|
850
|
-
default: f(() => [v(t(X), {
|
|
851
|
-
color: e(N.value.status)
|
|
852
|
-
}, {
|
|
853
|
-
default: f(() => {
|
|
854
|
-
var n;
|
|
855
|
-
return [M(F((n = t(Y)(t(Ie), N.value.status)) == null ? void 0 : n.label), 1)];
|
|
856
|
-
}),
|
|
857
|
-
_: 1
|
|
858
|
-
}, 8, ["color"])]),
|
|
859
|
-
_: 1
|
|
860
|
-
})]),
|
|
861
|
-
_: 1
|
|
862
|
-
}), _("div", ia, [d[5] || (d[5] = _("div", {
|
|
863
|
-
class: "title"
|
|
864
|
-
}, "沟通记录", -1)), v(t(Ye), {
|
|
865
|
-
class: "messageContent",
|
|
866
|
-
loading: p.value
|
|
867
|
-
}, {
|
|
868
|
-
default: f(() => [E.value.length === 0 ? (a(), B(t(Je), {
|
|
869
|
-
key: 0,
|
|
870
|
-
class: "message-empty"
|
|
871
|
-
}, {
|
|
872
|
-
description: f(() => [_("div", ra, F(Z.value), 1), _("ul", oa, [(a(!0), o(L, null, q(U.value, (n) => (a(), o("li", {
|
|
873
|
-
key: n
|
|
874
|
-
}, F(n), 1))), 128))])]),
|
|
875
|
-
_: 1
|
|
876
|
-
})) : (a(), o("div", ua, [(a(!0), o(L, null, q(E.value, (n, T) => (a(), o(L, {
|
|
877
|
-
key: Ae(n, T)
|
|
878
|
-
}, [n.senderRole !== S.senderRole ? (a(), B(Xt, {
|
|
879
|
-
key: 0,
|
|
880
|
-
text: t(ae)(n).text,
|
|
881
|
-
attachments: t(ae)(n).attachments,
|
|
882
|
-
"avatar-url": fe(n),
|
|
883
|
-
"avatar-text": pe(n)
|
|
884
|
-
}, null, 8, ["text", "attachments", "avatar-url", "avatar-text"])) : (a(), B(qt, {
|
|
885
|
-
key: 1,
|
|
886
|
-
text: t(ae)(n).text,
|
|
887
|
-
attachments: t(ae)(n).attachments,
|
|
888
|
-
"avatar-url": fe(n),
|
|
889
|
-
"avatar-text": pe(n)
|
|
890
|
-
}, null, 8, ["text", "attachments", "avatar-url", "avatar-text"]))], 64))), 128))]))]),
|
|
891
|
-
_: 1
|
|
892
|
-
}, 8, ["loading"])])])], 512), _("div", ca, [_("div", {
|
|
893
|
-
class: se(["sender-panel", {
|
|
894
|
-
"is-drag-over": h.value
|
|
895
|
-
}]),
|
|
896
|
-
onDragover: K(Ve, ["prevent"]),
|
|
897
|
-
onDragleave: Le,
|
|
898
|
-
onDrop: K(Me, ["prevent"]),
|
|
899
|
-
onPaste: Be
|
|
900
|
-
}, [t(I).hasAttachments.value ? (a(), o("div", da, [(a(!0), o(L, null, q(t(I).items.value, (n, T) => (a(), o("div", {
|
|
901
|
-
key: n.id,
|
|
902
|
-
class: se(["attachment-preview-item", {
|
|
903
|
-
"is-image": n.kind === "image",
|
|
904
|
-
"is-video": n.kind === "video"
|
|
905
|
-
}]),
|
|
906
|
-
onClick: (O) => Te(n)
|
|
907
|
-
}, [n.kind === "image" && n.previewUrl ? (a(), o("img", {
|
|
908
|
-
key: 0,
|
|
909
|
-
src: n.previewUrl,
|
|
910
|
-
alt: "预览",
|
|
911
|
-
class: "attachment-thumbnail"
|
|
912
|
-
}, null, 8, fa)) : n.kind === "video" && n.previewUrl ? (a(), o(L, {
|
|
913
|
-
key: 1
|
|
914
|
-
}, [_("video", {
|
|
915
|
-
class: "attachment-thumbnail",
|
|
916
|
-
src: n.previewUrl,
|
|
917
|
-
muted: "",
|
|
918
|
-
preload: "metadata"
|
|
919
|
-
}, null, 8, pa), d[6] || (d[6] = _("span", {
|
|
920
|
-
class: "attachment-video-play"
|
|
921
|
-
}, "播放", -1))], 64)) : (a(), o(L, {
|
|
922
|
-
key: 2
|
|
923
|
-
}, [d[7] || (d[7] = _("span", {
|
|
924
|
-
class: "attachment-file-icon"
|
|
925
|
-
}, "FILE", -1)), _("span", ma, F(n.file.name), 1)], 64)), _("button", {
|
|
926
|
-
type: "button",
|
|
927
|
-
class: "attachment-remove-btn",
|
|
928
|
-
title: "移除附件",
|
|
929
|
-
onClick: K((O) => t(I).removeAt(T), ["stop"])
|
|
930
|
-
}, " × ", 8, ga)], 10, va))), 128))])) : R("", !0), v(t(ce), {
|
|
931
|
-
"src-list": c.value,
|
|
932
|
-
visible: x.value,
|
|
933
|
-
"onUpdate:visible": d[0] || (d[0] = (n) => x.value = n),
|
|
934
|
-
current: P.value,
|
|
935
|
-
"onUpdate:current": d[1] || (d[1] = (n) => P.value = n)
|
|
936
|
-
}, null, 8, ["src-list", "visible", "current"]), v(de, {
|
|
937
|
-
visible: V.value,
|
|
938
|
-
"onUpdate:visible": d[2] || (d[2] = (n) => V.value = n),
|
|
939
|
-
title: C.value,
|
|
940
|
-
src: w.value
|
|
941
|
-
}, null, 8, ["visible", "title", "src"]), v(t(rt), {
|
|
942
|
-
ref_key: "senderRef",
|
|
943
|
-
ref: k,
|
|
944
|
-
value: l.value,
|
|
945
|
-
"onUpdate:value": d[3] || (d[3] = (n) => l.value = n),
|
|
946
|
-
placeholder: y.value,
|
|
947
|
-
loading: u.value,
|
|
948
|
-
"allow-speech": !1,
|
|
949
|
-
"read-only": u.value,
|
|
950
|
-
"send-disabled": !$.value,
|
|
951
|
-
onSubmit: De
|
|
952
|
-
}, {
|
|
953
|
-
prefix: f(() => [v(t(ue), {
|
|
954
|
-
type: "text",
|
|
955
|
-
class: "IconLink",
|
|
956
|
-
disabled: u.value,
|
|
957
|
-
onClick: Pe
|
|
958
|
-
}, {
|
|
959
|
-
icon: f(() => [v(t(mt))]),
|
|
960
|
-
_: 1
|
|
961
|
-
}, 8, ["disabled"])]),
|
|
962
|
-
_: 1
|
|
963
|
-
}, 8, ["value", "placeholder", "loading", "read-only", "send-disabled"]), _("input", {
|
|
964
|
-
ref_key: "fileInputRef",
|
|
965
|
-
ref: b,
|
|
966
|
-
type: "file",
|
|
967
|
-
accept: t(xe),
|
|
968
|
-
multiple: "",
|
|
969
|
-
class: "hidden-file-input",
|
|
970
|
-
onChange: Re
|
|
971
|
-
}, null, 40, ba)], 34)])]));
|
|
972
|
-
}
|
|
973
|
-
}), _a = /* @__PURE__ */ W(ka, [["__scopeId", "data-v-c3b02cb7"]]), ya = {
|
|
974
|
-
class: "FeedBackFrom"
|
|
975
|
-
}, ha = {
|
|
976
|
-
class: "feedback-attachments-field"
|
|
977
|
-
}, wa = {
|
|
978
|
-
key: 0,
|
|
979
|
-
class: "attachments-preview"
|
|
980
|
-
}, Ca = ["onClick"], xa = ["src"], $a = ["src"], Ua = {
|
|
981
|
-
class: "attachment-file-name"
|
|
982
|
-
}, Fa = ["onClick"], Sa = ["accept"], Ia = /* @__PURE__ */ D({
|
|
983
|
-
__name: "FeedbackForm",
|
|
984
|
-
emits: ["confirm"],
|
|
985
|
-
setup(s, {
|
|
986
|
-
emit: e
|
|
987
|
-
}) {
|
|
988
|
-
const l = e, u = g(), k = g(!1), i = g({
|
|
989
|
-
id: void 0,
|
|
990
|
-
title: "",
|
|
991
|
-
type: "bugReports",
|
|
992
|
-
priority: "normal",
|
|
993
|
-
description: ""
|
|
994
|
-
}), b = g(null), h = g(!1), x = g(0), P = g(!1), V = g(""), w = g(""), C = Ue((U) => {
|
|
995
|
-
ie.warning(U);
|
|
996
|
-
}), I = A(() => C.imageItems.value.map((U) => U.previewUrl || ""));
|
|
997
|
-
function c() {
|
|
998
|
-
var U;
|
|
999
|
-
(U = b.value) == null || U.click();
|
|
1000
|
-
}
|
|
1001
|
-
function $(U) {
|
|
1002
|
-
const y = U.target, p = y.files;
|
|
1003
|
-
p != null && p.length && C.addFiles(Array.from(p)), y.value = "";
|
|
1004
|
-
}
|
|
1005
|
-
function m(U) {
|
|
1006
|
-
if (U.kind === "image" && U.previewUrl) {
|
|
1007
|
-
const y = C.imageItems.value.findIndex((p) => p.id === U.id);
|
|
1008
|
-
if (y < 0) return;
|
|
1009
|
-
x.value = y, h.value = !0;
|
|
1010
|
-
return;
|
|
1011
|
-
}
|
|
1012
|
-
U.kind === "video" && U.previewUrl && (V.value = U.previewUrl, w.value = U.file.name, P.value = !0);
|
|
1013
|
-
}
|
|
1014
|
-
function S() {
|
|
1015
|
-
var U, y;
|
|
1016
|
-
i.value = {
|
|
1017
|
-
id: void 0,
|
|
1018
|
-
title: "",
|
|
1019
|
-
type: "bugReports",
|
|
1020
|
-
priority: "normal",
|
|
1021
|
-
description: ""
|
|
1022
|
-
}, C.clear(), (y = (U = u.value) == null ? void 0 : U.resetFields) == null || y.call(U);
|
|
1023
|
-
}
|
|
1024
|
-
async function Z() {
|
|
1025
|
-
if (!await u.value.validate()) {
|
|
1026
|
-
k.value = !0;
|
|
1027
|
-
try {
|
|
1028
|
-
const y = C.items.value.map((z) => z.file), p = y.length > 0 ? await Fe(y, ye.feedbackBucketId) : [], {
|
|
1029
|
-
error: E
|
|
1030
|
-
} = await j.feedbackCenter.create.post({
|
|
1031
|
-
title: i.value.title,
|
|
1032
|
-
type: i.value.type,
|
|
1033
|
-
priority: i.value.priority,
|
|
1034
|
-
description: i.value.description,
|
|
1035
|
-
attachments: p
|
|
1036
|
-
});
|
|
1037
|
-
E || (ie.success("新建反馈成功"), S(), l("confirm"));
|
|
1038
|
-
} finally {
|
|
1039
|
-
k.value = !1;
|
|
1040
|
-
}
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
return (U, y) => (a(), o("div", ya, [v(t(Ze), {
|
|
1044
|
-
ref_key: "formRef",
|
|
1045
|
-
ref: u,
|
|
1046
|
-
model: i.value,
|
|
1047
|
-
"auto-label-width": "",
|
|
1048
|
-
layout: "vertical"
|
|
1049
|
-
}, {
|
|
1050
|
-
default: f(() => [v(t(G), {
|
|
1051
|
-
field: "title",
|
|
1052
|
-
label: "标题",
|
|
1053
|
-
rules: [{
|
|
1054
|
-
required: !0,
|
|
1055
|
-
message: "请输入标题"
|
|
1056
|
-
}]
|
|
1057
|
-
}, {
|
|
1058
|
-
default: f(() => [v(t(Qe), {
|
|
1059
|
-
modelValue: i.value.title,
|
|
1060
|
-
"onUpdate:modelValue": y[0] || (y[0] = (p) => i.value.title = p),
|
|
1061
|
-
placeholder: "请输入标题"
|
|
1062
|
-
}, null, 8, ["modelValue"])]),
|
|
1063
|
-
_: 1
|
|
1064
|
-
}), v(t(G), {
|
|
1065
|
-
field: "type",
|
|
1066
|
-
label: "反馈类型",
|
|
1067
|
-
rules: [{
|
|
1068
|
-
required: !0,
|
|
1069
|
-
message: "请选择反馈类型"
|
|
1070
|
-
}]
|
|
1071
|
-
}, {
|
|
1072
|
-
default: f(() => [v(t(ge), {
|
|
1073
|
-
modelValue: i.value.type,
|
|
1074
|
-
"onUpdate:modelValue": y[1] || (y[1] = (p) => i.value.type = p),
|
|
1075
|
-
placeholder: "请选择反馈类型"
|
|
1076
|
-
}, {
|
|
1077
|
-
default: f(() => [(a(!0), o(L, null, q(t(ve), (p, E) => (a(), B(t(be), {
|
|
1078
|
-
key: E,
|
|
1079
|
-
value: p.key
|
|
1080
|
-
}, {
|
|
1081
|
-
default: f(() => [M(F(p.label), 1)]),
|
|
1082
|
-
_: 2
|
|
1083
|
-
}, 1032, ["value"]))), 128))]),
|
|
1084
|
-
_: 1
|
|
1085
|
-
}, 8, ["modelValue"])]),
|
|
1086
|
-
_: 1
|
|
1087
|
-
}), v(t(G), {
|
|
1088
|
-
field: "priority",
|
|
1089
|
-
label: "优先级",
|
|
1090
|
-
rules: [{
|
|
1091
|
-
required: !0,
|
|
1092
|
-
message: "请选择优先级"
|
|
1093
|
-
}]
|
|
1094
|
-
}, {
|
|
1095
|
-
default: f(() => [v(t(ge), {
|
|
1096
|
-
modelValue: i.value.priority,
|
|
1097
|
-
"onUpdate:modelValue": y[2] || (y[2] = (p) => i.value.priority = p),
|
|
1098
|
-
placeholder: "请选择优先级"
|
|
1099
|
-
}, {
|
|
1100
|
-
default: f(() => [(a(!0), o(L, null, q(t(Se), (p, E) => (a(), B(t(be), {
|
|
1101
|
-
key: E,
|
|
1102
|
-
value: p.key
|
|
1103
|
-
}, {
|
|
1104
|
-
default: f(() => [M(F(p.label), 1)]),
|
|
1105
|
-
_: 2
|
|
1106
|
-
}, 1032, ["value"]))), 128))]),
|
|
1107
|
-
_: 1
|
|
1108
|
-
}, 8, ["modelValue"])]),
|
|
1109
|
-
_: 1
|
|
1110
|
-
}), v(t(G), {
|
|
1111
|
-
field: "description",
|
|
1112
|
-
label: "问题描述",
|
|
1113
|
-
rules: [{
|
|
1114
|
-
required: !0,
|
|
1115
|
-
message: "请输入问题描述"
|
|
1116
|
-
}]
|
|
1117
|
-
}, {
|
|
1118
|
-
default: f(() => [v(t(et), {
|
|
1119
|
-
modelValue: i.value.description,
|
|
1120
|
-
"onUpdate:modelValue": y[3] || (y[3] = (p) => i.value.description = p),
|
|
1121
|
-
placeholder: "请输入问题描述",
|
|
1122
|
-
"allow-clear": "",
|
|
1123
|
-
"auto-size": {
|
|
1124
|
-
minRows: 5
|
|
1125
|
-
}
|
|
1126
|
-
}, null, 8, ["modelValue"])]),
|
|
1127
|
-
_: 1
|
|
1128
|
-
}), v(t(G), {
|
|
1129
|
-
field: "attachments",
|
|
1130
|
-
label: "附件"
|
|
1131
|
-
}, {
|
|
1132
|
-
default: f(() => [_("div", ha, [v(t(ue), {
|
|
1133
|
-
type: "outline",
|
|
1134
|
-
disabled: k.value,
|
|
1135
|
-
onClick: c
|
|
1136
|
-
}, {
|
|
1137
|
-
default: f(() => [...y[7] || (y[7] = [M(" 添加图片、视频或文件 ", -1)])]),
|
|
1138
|
-
_: 1
|
|
1139
|
-
}, 8, ["disabled"]), t(C).hasAttachments.value ? (a(), o("div", wa, [(a(!0), o(L, null, q(t(C).items.value, (p, E) => (a(), o("div", {
|
|
1140
|
-
key: p.id,
|
|
1141
|
-
class: se(["attachment-preview-item", {
|
|
1142
|
-
"is-image": p.kind === "image",
|
|
1143
|
-
"is-video": p.kind === "video"
|
|
1144
|
-
}]),
|
|
1145
|
-
onClick: (z) => m(p)
|
|
1146
|
-
}, [p.kind === "image" && p.previewUrl ? (a(), o("img", {
|
|
1147
|
-
key: 0,
|
|
1148
|
-
src: p.previewUrl,
|
|
1149
|
-
alt: "预览",
|
|
1150
|
-
class: "attachment-thumbnail"
|
|
1151
|
-
}, null, 8, xa)) : p.kind === "video" && p.previewUrl ? (a(), o(L, {
|
|
1152
|
-
key: 1
|
|
1153
|
-
}, [_("video", {
|
|
1154
|
-
class: "attachment-thumbnail",
|
|
1155
|
-
src: p.previewUrl,
|
|
1156
|
-
muted: "",
|
|
1157
|
-
preload: "metadata"
|
|
1158
|
-
}, null, 8, $a), y[8] || (y[8] = _("span", {
|
|
1159
|
-
class: "attachment-video-play"
|
|
1160
|
-
}, "播放", -1))], 64)) : (a(), o(L, {
|
|
1161
|
-
key: 2
|
|
1162
|
-
}, [y[9] || (y[9] = _("span", {
|
|
1163
|
-
class: "attachment-file-icon"
|
|
1164
|
-
}, "FILE", -1)), _("span", Ua, F(p.file.name), 1)], 64)), _("button", {
|
|
1165
|
-
type: "button",
|
|
1166
|
-
class: "attachment-remove-btn",
|
|
1167
|
-
title: "移除附件",
|
|
1168
|
-
onClick: K((z) => t(C).removeAt(E), ["stop"])
|
|
1169
|
-
}, " × ", 8, Fa)], 10, Ca))), 128))])) : R("", !0), v(t(ce), {
|
|
1170
|
-
"src-list": I.value,
|
|
1171
|
-
visible: h.value,
|
|
1172
|
-
"onUpdate:visible": y[4] || (y[4] = (p) => h.value = p),
|
|
1173
|
-
current: x.value,
|
|
1174
|
-
"onUpdate:current": y[5] || (y[5] = (p) => x.value = p)
|
|
1175
|
-
}, null, 8, ["src-list", "visible", "current"]), v(de, {
|
|
1176
|
-
visible: P.value,
|
|
1177
|
-
"onUpdate:visible": y[6] || (y[6] = (p) => P.value = p),
|
|
1178
|
-
title: w.value,
|
|
1179
|
-
src: V.value
|
|
1180
|
-
}, null, 8, ["visible", "title", "src"]), _("input", {
|
|
1181
|
-
ref_key: "fileInputRef",
|
|
1182
|
-
ref: b,
|
|
1183
|
-
type: "file",
|
|
1184
|
-
accept: t(xe),
|
|
1185
|
-
multiple: "",
|
|
1186
|
-
class: "hidden-file-input",
|
|
1187
|
-
onChange: $
|
|
1188
|
-
}, null, 40, Sa)])]),
|
|
1189
|
-
_: 1
|
|
1190
|
-
}), v(t(ue), {
|
|
1191
|
-
loading: k.value,
|
|
1192
|
-
type: "primary",
|
|
1193
|
-
onClick: Z
|
|
1194
|
-
}, {
|
|
1195
|
-
default: f(() => [...y[10] || (y[10] = [M(" 提交 ", -1)])]),
|
|
1196
|
-
_: 1
|
|
1197
|
-
}, 8, ["loading"])]),
|
|
1198
|
-
_: 1
|
|
1199
|
-
}, 8, ["model"])]));
|
|
1200
|
-
}
|
|
1201
|
-
}), Aa = /* @__PURE__ */ W(Ia, [["__scopeId", "data-v-9589e32c"]]), Pa = {
|
|
1202
|
-
class: "message-panel"
|
|
1203
|
-
}, Ra = {
|
|
1204
|
-
key: 2,
|
|
1205
|
-
class: "message-panel__detail"
|
|
1206
|
-
}, Ta = /* @__PURE__ */ D({
|
|
1207
|
-
__name: "FeedbackList",
|
|
1208
|
-
emits: ["toDetail"],
|
|
1209
|
-
setup(s, {
|
|
1210
|
-
emit: e
|
|
1211
|
-
}) {
|
|
1212
|
-
const l = g(!0), u = g([]), k = g(!1), i = g(!1), b = g(""), h = g({
|
|
1213
|
-
total: 0,
|
|
1214
|
-
current: 1,
|
|
1215
|
-
pageSize: 10
|
|
1216
|
-
});
|
|
1217
|
-
function x() {
|
|
1218
|
-
l.value = !0, h.value.current = 1, C();
|
|
1219
|
-
}
|
|
1220
|
-
function P(c) {
|
|
1221
|
-
b.value = c.id, l.value = !1;
|
|
1222
|
-
}
|
|
1223
|
-
function V(c) {
|
|
1224
|
-
return c === "inProgress" ? "orangered" : c === "pending" ? "gold" : c === "resolved" ? "green" : c === "closed" ? "gray" : "arcoblue";
|
|
1225
|
-
}
|
|
1226
|
-
function w(c) {
|
|
1227
|
-
return c === "urgent" ? "red" : c === "high" ? "orangered" : c === "low" ? "gray" : "blue";
|
|
1228
|
-
}
|
|
1229
|
-
async function C() {
|
|
1230
|
-
k.value = !0;
|
|
1231
|
-
const {
|
|
1232
|
-
data: c
|
|
1233
|
-
} = await j.feedbackCenter.own.post({
|
|
1234
|
-
current: h.value.current,
|
|
1235
|
-
pageSize: h.value.pageSize
|
|
1236
|
-
});
|
|
1237
|
-
if (k.value = !1, c) {
|
|
1238
|
-
const $ = c, m = $.items || [];
|
|
1239
|
-
u.value = m, h.value.total = $.count || 0, i.value = m.length < h.value.pageSize;
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
async function I() {
|
|
1243
|
-
if (k.value || i.value) return;
|
|
1244
|
-
h.value.current += 1, k.value = !0;
|
|
1245
|
-
const {
|
|
1246
|
-
data: c
|
|
1247
|
-
} = await j.feedbackCenter.own.post({
|
|
1248
|
-
current: h.value.current,
|
|
1249
|
-
pageSize: h.value.pageSize
|
|
1250
|
-
});
|
|
1251
|
-
if (k.value = !1, c) {
|
|
1252
|
-
const m = c.items || [];
|
|
1253
|
-
u.value = [...u.value, ...m], i.value = m.length < h.value.pageSize;
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
return C(), (c, $) => (a(), o("div", Pa, [l.value ? R("", !0) : (a(), B(t(tt), {
|
|
1257
|
-
key: 0,
|
|
1258
|
-
class: "message-panel__breadcrumb"
|
|
1259
|
-
}, {
|
|
1260
|
-
default: f(() => [v(t(ke), {
|
|
1261
|
-
onClick: x
|
|
1262
|
-
}, {
|
|
1263
|
-
default: f(() => [...$[0] || ($[0] = [M("我的反馈", -1)])]),
|
|
1264
|
-
_: 1
|
|
1265
|
-
}), v(t(ke), null, {
|
|
1266
|
-
default: f(() => [...$[1] || ($[1] = [M("反馈详情", -1)])]),
|
|
1267
|
-
_: 1
|
|
1268
|
-
})]),
|
|
1269
|
-
_: 1
|
|
1270
|
-
})), l.value ? (a(), B(it, {
|
|
1271
|
-
key: 1,
|
|
1272
|
-
"message-list": u.value,
|
|
1273
|
-
loading: k.value,
|
|
1274
|
-
finished: i.value,
|
|
1275
|
-
"show-view-button": !1,
|
|
1276
|
-
onItemClick: P,
|
|
1277
|
-
onLoadMore: I
|
|
1278
|
-
}, {
|
|
1279
|
-
tags: f(({
|
|
1280
|
-
item: m
|
|
1281
|
-
}) => [v(t(X), {
|
|
1282
|
-
color: "arcoblue",
|
|
1283
|
-
size: "small"
|
|
1284
|
-
}, {
|
|
1285
|
-
default: f(() => {
|
|
1286
|
-
var S;
|
|
1287
|
-
return [M(F((S = t(Y)(t(ve), m.type)) == null ? void 0 : S.label), 1)];
|
|
1288
|
-
}),
|
|
1289
|
-
_: 2
|
|
1290
|
-
}, 1024), v(t(X), {
|
|
1291
|
-
color: w(m.priority),
|
|
1292
|
-
size: "small"
|
|
1293
|
-
}, {
|
|
1294
|
-
default: f(() => {
|
|
1295
|
-
var S;
|
|
1296
|
-
return [M(F(((S = t(Y)(t(Se), m.priority)) == null ? void 0 : S.label) || "普通"), 1)];
|
|
1297
|
-
}),
|
|
1298
|
-
_: 2
|
|
1299
|
-
}, 1032, ["color"]), v(t(X), {
|
|
1300
|
-
color: V(m.status),
|
|
1301
|
-
size: "small"
|
|
1302
|
-
}, {
|
|
1303
|
-
default: f(() => {
|
|
1304
|
-
var S;
|
|
1305
|
-
return [M(F((S = t(Y)(t(Ie), m.status)) == null ? void 0 : S.label), 1)];
|
|
1306
|
-
}),
|
|
1307
|
-
_: 2
|
|
1308
|
-
}, 1032, ["color"])]),
|
|
1309
|
-
description: f(({
|
|
1310
|
-
item: m
|
|
1311
|
-
}) => [M(F(m.description || "暂无描述"), 1)]),
|
|
1312
|
-
_: 1
|
|
1313
|
-
}, 8, ["message-list", "loading", "finished"])) : (a(), o("div", Ra, [v(_a, {
|
|
1314
|
-
id: b.value,
|
|
1315
|
-
"sender-role": "user",
|
|
1316
|
-
class: "feedback-details-panel"
|
|
1317
|
-
}, null, 8, ["id"])]))]));
|
|
1318
|
-
}
|
|
1319
|
-
}), Ba = {
|
|
1320
|
-
key: 0,
|
|
1321
|
-
class: "user-menu-modal-content"
|
|
1322
|
-
}, Va = {
|
|
1323
|
-
class: "left"
|
|
1324
|
-
}, La = {
|
|
1325
|
-
key: 1,
|
|
1326
|
-
class: "user-menu-modal-form"
|
|
1327
|
-
}, ss = /* @__PURE__ */ D({
|
|
1328
|
-
__name: "FeedbackModal",
|
|
1329
|
-
emits: ["confirm", "cancel"],
|
|
1330
|
-
setup(s, {
|
|
1331
|
-
expose: e,
|
|
1332
|
-
emit: l
|
|
1333
|
-
}) {
|
|
1334
|
-
const u = g(!1), k = l;
|
|
1335
|
-
function i() {
|
|
1336
|
-
k("cancel");
|
|
1337
|
-
}
|
|
1338
|
-
const b = g(["FeedbackList"]), h = g([{
|
|
1339
|
-
name: "我的反馈",
|
|
1340
|
-
path: "FeedbackList",
|
|
1341
|
-
meta: {
|
|
1342
|
-
icon: "mingcute:cube-3d-fill"
|
|
1343
|
-
}
|
|
1344
|
-
}, {
|
|
1345
|
-
name: "新建反馈",
|
|
1346
|
-
path: "CreateFeedback",
|
|
1347
|
-
meta: {
|
|
1348
|
-
icon: "mingcute:cube-3d-fill"
|
|
1349
|
-
}
|
|
1350
|
-
}]), x = A(() => b.value.length !== 0 ? b.value[0] : "");
|
|
1351
|
-
function P() {
|
|
1352
|
-
b.value = ["FeedbackList"];
|
|
1353
|
-
}
|
|
1354
|
-
function V(C) {
|
|
1355
|
-
b.value = [C.path];
|
|
1356
|
-
}
|
|
1357
|
-
function w(C) {
|
|
1358
|
-
u.value = C;
|
|
1359
|
-
}
|
|
1360
|
-
return e({
|
|
1361
|
-
setData: w
|
|
1362
|
-
}), (C, I) => (a(), B(t(at), {
|
|
1363
|
-
visible: u.value,
|
|
1364
|
-
"onUpdate:visible": I[1] || (I[1] = (c) => u.value = c),
|
|
1365
|
-
loading: !1,
|
|
1366
|
-
"body-class": "AppMessagebodyClass",
|
|
1367
|
-
"mask-closable": !1,
|
|
1368
|
-
footer: !1,
|
|
1369
|
-
width: t(Oe),
|
|
1370
|
-
title: "用户反馈",
|
|
1371
|
-
"hide-title": !1,
|
|
1372
|
-
onCancel: i
|
|
1373
|
-
}, {
|
|
1374
|
-
default: f(() => [u.value ? (a(), o("div", Ba, [_("div", Va, [v(st, {
|
|
1375
|
-
"selected-keys": b.value,
|
|
1376
|
-
"onUpdate:selectedKeys": I[0] || (I[0] = (c) => b.value = c),
|
|
1377
|
-
menus: h.value,
|
|
1378
|
-
onChange: V
|
|
1379
|
-
}, null, 8, ["selected-keys", "menus"])]), x.value === "FeedbackList" ? (a(), B(Ta, {
|
|
1380
|
-
key: 0
|
|
1381
|
-
})) : R("", !0), x.value === "CreateFeedback" ? (a(), o("div", La, [v(Aa, {
|
|
1382
|
-
onConfirm: P
|
|
1383
|
-
})])) : R("", !0)])) : R("", !0)]),
|
|
1384
|
-
_: 1
|
|
1385
|
-
}, 8, ["visible", "width"]));
|
|
1386
|
-
}
|
|
1387
|
-
});
|
|
1388
|
-
export {
|
|
1389
|
-
qt as B,
|
|
1390
|
-
_a as F,
|
|
1391
|
-
_e as R,
|
|
1392
|
-
Ta as _,
|
|
1393
|
-
Xt as a,
|
|
1394
|
-
Aa as b,
|
|
1395
|
-
ss as c
|
|
1396
|
-
};
|