cnhis-design-vue 3.2.13-release.0 → 3.2.14-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/ai-chat/index.d.ts +3 -4
- package/es/components/ai-chat/src/Index.vue.d.ts +3 -4
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +101 -0
- package/es/components/ai-chat/src/components/ChatBI.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatBI.vue2.js +1 -0
- package/es/components/ai-chat/src/components/ChatCard.d.ts +13 -0
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +2 -3
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.d.ts +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
- package/es/components/ai-chat/src/utils/index.d.ts +1 -0
- package/es/components/ai-chat/src/utils/index.js +1 -0
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/form-config/index.d.ts +9 -110
- package/es/components/form-config/index.js +1 -1
- package/es/components/form-config/src/FormConfig.vue.d.ts +9 -110
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +4 -2
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +2 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
- package/es/components/form-config/src/constants/index.d.ts +2 -11
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/hooks/useLocale.d.ts +52 -0
- package/es/components/form-config/src/hooks/useLocale.js +1 -0
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-config/src/utils/index.d.ts +1 -0
- package/es/components/form-config/src/utils/index.js +1 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-chat/index.d.ts +104 -1
- package/es/components/iho-chat/src/Index.vue.d.ts +104 -1
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.d.ts +1 -0
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +14 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +48 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +14 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +2 -0
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +11 -2
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/hooks/useSession.d.ts +2 -0
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +1 -0
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +20 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +4 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +4 -7
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -7
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -7
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/index.d.ts +3 -0
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +0 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +0 -1
@@ -2,6 +2,9 @@ import { AnyObject } from '../../../../shared/types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{}, {
|
3
3
|
state: import("../types").IState;
|
4
4
|
isGroupChat: import("vue").ComputedRef<boolean>;
|
5
|
+
isGroupLeader: import("vue").ComputedRef<boolean>;
|
6
|
+
isEnded: import("vue").ComputedRef<boolean>;
|
7
|
+
setCurrentSessionItem: (item: AnyObject) => void;
|
5
8
|
showChatSet: import("vue").Ref<boolean>;
|
6
9
|
showChatFile: import("vue").Ref<boolean>;
|
7
10
|
chatFileType: import("vue").Ref<string>;
|
@@ -9,17 +12,21 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
9
12
|
chatAddProps: import("vue").ComputedRef<{
|
10
13
|
mode: string;
|
11
14
|
disabledIds: any[];
|
15
|
+
disabled: boolean;
|
12
16
|
defaultValue?: undefined;
|
13
17
|
} | {
|
14
18
|
mode: string;
|
15
19
|
defaultValue: AnyObject[];
|
16
20
|
disabledIds?: undefined;
|
21
|
+
disabled?: undefined;
|
17
22
|
}>;
|
18
23
|
handleOpenChatFile: (type: string) => void;
|
24
|
+
handleClose: () => Promise<void>;
|
19
25
|
NAvatar: any;
|
20
26
|
NIcon: any;
|
21
27
|
NButton: any;
|
22
28
|
NTooltip: any;
|
29
|
+
NPopconfirm: any;
|
23
30
|
PersonProfile: import("vue").DefineComponent<{
|
24
31
|
userId: {
|
25
32
|
type: StringConstructor;
|
@@ -94,11 +101,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
94
101
|
state: import("../types").IState;
|
95
102
|
setCurrentSessionItem: (item: AnyObject) => void;
|
96
103
|
isGroupChat: import("vue").ComputedRef<boolean>;
|
104
|
+
isGroupLeader: import("vue").ComputedRef<boolean>;
|
97
105
|
inputRef: import("vue").Ref<any>;
|
98
106
|
groupNameEditing: import("vue").Ref<boolean>;
|
99
107
|
groupName: import("vue").Ref<string>;
|
100
108
|
showGroupDetail: import("vue").Ref<boolean>;
|
101
|
-
isGroupLeader: import("vue").ComputedRef<boolean>;
|
102
109
|
currentGroupUserIds: import("vue").ComputedRef<any[]>;
|
103
110
|
currentGroupUser: import("vue").ComputedRef<AnyObject[]>;
|
104
111
|
handleTopping: (value: boolean) => Promise<void>;
|
@@ -211,6 +218,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
211
218
|
type: import("vue").PropType<AnyObject[]>;
|
212
219
|
default: () => never[];
|
213
220
|
};
|
221
|
+
disabled: {
|
222
|
+
type: BooleanConstructor;
|
223
|
+
default: boolean;
|
224
|
+
};
|
214
225
|
}, {
|
215
226
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
216
227
|
title: {
|
@@ -232,6 +243,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
232
243
|
type: import("vue").PropType<AnyObject[]>;
|
233
244
|
default: () => never[];
|
234
245
|
};
|
246
|
+
disabled: {
|
247
|
+
type: BooleanConstructor;
|
248
|
+
default: boolean;
|
249
|
+
};
|
235
250
|
}>> & {
|
236
251
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
237
252
|
}>>;
|
@@ -296,11 +311,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
296
311
|
type: import("vue").PropType<AnyObject[]>;
|
297
312
|
default: () => never[];
|
298
313
|
};
|
314
|
+
disabled: {
|
315
|
+
type: BooleanConstructor;
|
316
|
+
default: boolean;
|
317
|
+
};
|
299
318
|
}>> & {
|
300
319
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
301
320
|
}, {
|
302
321
|
title: string;
|
303
322
|
defaultValue: AnyObject[];
|
323
|
+
disabled: boolean;
|
304
324
|
mode: string;
|
305
325
|
disabledIds: string[];
|
306
326
|
}>;
|
@@ -380,6 +400,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
380
400
|
type: import("vue").PropType<AnyObject[]>;
|
381
401
|
default: () => never[];
|
382
402
|
};
|
403
|
+
disabled: {
|
404
|
+
type: BooleanConstructor;
|
405
|
+
default: boolean;
|
406
|
+
};
|
383
407
|
}, {
|
384
408
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
385
409
|
title: {
|
@@ -401,6 +425,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
401
425
|
type: import("vue").PropType<AnyObject[]>;
|
402
426
|
default: () => never[];
|
403
427
|
};
|
428
|
+
disabled: {
|
429
|
+
type: BooleanConstructor;
|
430
|
+
default: boolean;
|
431
|
+
};
|
404
432
|
}>> & {
|
405
433
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
406
434
|
}>>;
|
@@ -465,11 +493,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
465
493
|
type: import("vue").PropType<AnyObject[]>;
|
466
494
|
default: () => never[];
|
467
495
|
};
|
496
|
+
disabled: {
|
497
|
+
type: BooleanConstructor;
|
498
|
+
default: boolean;
|
499
|
+
};
|
468
500
|
}>> & {
|
469
501
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
470
502
|
}, {
|
471
503
|
title: string;
|
472
504
|
defaultValue: AnyObject[];
|
505
|
+
disabled: boolean;
|
473
506
|
mode: string;
|
474
507
|
disabledIds: string[];
|
475
508
|
}>;
|
@@ -680,6 +713,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
680
713
|
type: import("vue").PropType<AnyObject[]>;
|
681
714
|
default: () => never[];
|
682
715
|
};
|
716
|
+
disabled: {
|
717
|
+
type: BooleanConstructor;
|
718
|
+
default: boolean;
|
719
|
+
};
|
683
720
|
}, {
|
684
721
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
685
722
|
title: {
|
@@ -701,6 +738,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
701
738
|
type: import("vue").PropType<AnyObject[]>;
|
702
739
|
default: () => never[];
|
703
740
|
};
|
741
|
+
disabled: {
|
742
|
+
type: BooleanConstructor;
|
743
|
+
default: boolean;
|
744
|
+
};
|
704
745
|
}>> & {
|
705
746
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
706
747
|
}>>;
|
@@ -765,14 +806,20 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
765
806
|
type: import("vue").PropType<AnyObject[]>;
|
766
807
|
default: () => never[];
|
767
808
|
};
|
809
|
+
disabled: {
|
810
|
+
type: BooleanConstructor;
|
811
|
+
default: boolean;
|
812
|
+
};
|
768
813
|
}>> & {
|
769
814
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
770
815
|
}, {
|
771
816
|
title: string;
|
772
817
|
defaultValue: AnyObject[];
|
818
|
+
disabled: boolean;
|
773
819
|
mode: string;
|
774
820
|
disabledIds: string[];
|
775
821
|
}>;
|
776
822
|
PersonAddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
823
|
+
CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
777
824
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
778
825
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as o,openBlock as
|
1
|
+
import{defineComponent as e,ref as t,computed as o,openBlock as i,createElementBlock as r,Fragment as a,unref as s,createElementVNode as n,createVNode as l,withCtx as c,toDisplayString as u,createTextVNode as m,normalizeProps as d,guardReactiveProps as h,createBlock as p,createCommentVNode as v}from"vue";import{NAvatar as f,NTooltip as g,NButton as w,NIcon as _,NPopconfirm as y}from"naive-ui";import{useState as b}from"../hooks/useState.js";import{useSession as C}from"../hooks/useSession.js";import{STATUS as j}from"../constants/index.js";import"trtc-sdk-v5";import{$message as k}from"../utils/index.js";import z from"./PersonProfile.vue.js";import S from"./ChatSet.vue.js";import q from"./ChatFile.vue.js";import I from"./ChatRecord.vue.js";import x from"./ChatAdd.vue.js";import{PersonAddOutline as E,CloseOutline as U}from"@vicons/ionicons5";import{updateStatusApi as D}from"../api/index.js";const G={key:0,class:"chat-header box-shadow"},P={class:"chat-header__left"},N={class:"name"},A={class:"chat-header__right"},F=n("i",{class:"chat--iconfont chat--icon-image"},null,-1),H=n("i",{class:"chat--iconfont chat--icon-folder"},null,-1),L=n("i",{class:"chat--iconfont chat--icon-list-search"},null,-1),R=n("i",{class:"chat--iconfont chat--icon-set"},null,-1);var V=e({__name:"ChatHeader",setup(e){const{state:V}=b(),{isGroupChat:B,isGroupLeader:J,isEnded:K,setCurrentSessionItem:M}=C(V),O=t(!1),Q=t(!1),T=t("image"),W=t(!1),X=o((()=>{const e=V.currentGroupUser.map((e=>e.id));return B.value?{mode:"join",disabledIds:e,disabled:K.value}:{mode:"create",defaultValue:V.currentGroupUser}}));function Y(e){T.value=e,Q.value=!0}async function Z(){try{await D({id:V.currentSessionItem.id,status:j.ENDED}),M({status:j.ENDED}),k.success("当前会话已结束")}catch(e){console.log(e)}}return(e,t)=>(i(),r(a,null,[s(V).id?(i(),r("section",G,[n("div",P,[l(z,{"user-id":s(V).currentSessionItem.receiver,disabled:s(B),placement:"bottom"},{trigger:c((()=>[l(s(f),{round:"",size:30,src:s(V).currentSessionItem.avatar},null,8,["src"])])),_:1},8,["user-id","disabled"]),n("span",N,u(s(V).currentSessionItem.name),1)]),n("div",A,[l(s(g),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny",onClick:t[0]||(t[0]=()=>Y("image"))},{icon:c((()=>[F])),_:1})])),default:c((()=>[m(" 图片 ")])),_:1}),l(s(g),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny",onClick:t[1]||(t[1]=()=>Y("file"))},{icon:c((()=>[H])),_:1})])),default:c((()=>[m(" 文件 ")])),_:1}),l(x,d(h(s(X))),{trigger:c((()=>[l(s(g),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny"},{icon:c((()=>[l(s(_),{size:"18",component:s(E)},null,8,["component"])])),_:1})])),default:c((()=>[m(" 添加成员 ")])),_:1})])),_:1},16),l(s(g),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny",onClick:t[2]||(t[2]=()=>W.value=!0)},{icon:c((()=>[L])),_:1})])),default:c((()=>[m(" 聊天记录 ")])),_:1}),l(s(g),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny",onClick:t[3]||(t[3]=()=>O.value=!0)},{icon:c((()=>[R])),_:1})])),default:c((()=>[m(" 聊天设置 ")])),_:1}),s(B)&&s(J)?(i(),p(s(y),{key:0,onPositiveClick:Z},{trigger:c((()=>[l(s(g),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny"},{icon:c((()=>[l(s(_),{size:"18",component:s(U)},null,8,["component"])])),_:1})])),default:c((()=>[m(" 结束聊天 ")])),_:1})])),default:c((()=>[m(" 是否确认结束群聊? ")])),_:1})):v("v-if",!0)])])):v("v-if",!0),l(S,{show:O.value,"onUpdate:show":t[4]||(t[4]=e=>O.value=e)},null,8,["show"]),l(q,{show:Q.value,"onUpdate:show":t[5]||(t[5]=e=>Q.value=e),type:T.value,visible:Q.value},null,8,["show","type","visible"]),l(I,{show:W.value,"onUpdate:show":t[6]||(t[6]=e=>W.value=e),visible:W.value},null,8,["show","visible"])],64))}});export{V as default};
|
@@ -251,6 +251,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
251
251
|
type: import("vue").PropType<AnyObject[]>;
|
252
252
|
default: () => never[];
|
253
253
|
};
|
254
|
+
disabled: {
|
255
|
+
type: BooleanConstructor;
|
256
|
+
default: boolean;
|
257
|
+
};
|
254
258
|
}, {
|
255
259
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
256
260
|
title: {
|
@@ -272,6 +276,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
272
276
|
type: import("vue").PropType<AnyObject[]>;
|
273
277
|
default: () => never[];
|
274
278
|
};
|
279
|
+
disabled: {
|
280
|
+
type: BooleanConstructor;
|
281
|
+
default: boolean;
|
282
|
+
};
|
275
283
|
}>> & {
|
276
284
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
277
285
|
}>>;
|
@@ -336,11 +344,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
336
344
|
type: import("vue").PropType<AnyObject[]>;
|
337
345
|
default: () => never[];
|
338
346
|
};
|
347
|
+
disabled: {
|
348
|
+
type: BooleanConstructor;
|
349
|
+
default: boolean;
|
350
|
+
};
|
339
351
|
}>> & {
|
340
352
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
341
353
|
}, {
|
342
354
|
title: string;
|
343
355
|
defaultValue: AnyObject[];
|
356
|
+
disabled: boolean;
|
344
357
|
mode: string;
|
345
358
|
disabledIds: string[];
|
346
359
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as n,watch as s,openBlock as o,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as c,createVNode as l,withCtx as u,Fragment as m,renderList as p,toDisplayString as d,createCommentVNode as f,createBlock as g,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as k,NAvatar as _,NImage as x,NIcon as I,NSpace as C,NButtonGroup as w,NTooltip as S}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as L}from"../api/index.js";import{useState as b}from"../hooks/useState.js";import{useSession as A}from"../hooks/useSession.js";import{MESSAGE_TYPE as z}from"../constants/index.js";import"trtc-sdk-v5";import{isAudioOrVideoMessage as H,simplifyMessage as D,getAVTime as R,downloadFile as N}from"../utils/index.js";import{first as O,last as P,toString as q}from"lodash-es";import B from"./PersonProfile.vue.js";import J from"./MessageTemplate.vue.js";import{emojis as W}from"../utils/emoji.js";import U from"./ContextMenu.js";import X from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as F,VideocamOutline as G,DocumentSharp as K,ChatbubbleEllipsesOutline as Y,EllipsisHorizontal as $,ArrowDownSharp as Q}from"@vicons/ionicons5";import{useScrollLoading as V}from"../../../../shared/hooks/useScrollLoading.js";const Z={key:0,class:"tip-text"},ee={key:1,class:"tip-text"},te={key:2,class:"message-box"},ne={key:0,class:"content-box"},se={class:"name-box"},oe=["data-time"],ie=["onContextmenu"],re={key:0,class:"reference-content"},ae=["innerHTML"],ce=["src"],le=["innerHTML"],ue=["innerHTML"],me={style:{"margin-left":"8px"}},pe={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:fe,setMsgList:ge,relayMessage:ve}=b(),{setCurrentSessionItem:ye,isGroupChat:he}=A(fe),Te=t(),Me=t(!1),ke=t({left:0,top:0}),_e=t(),xe=t(),Ie={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":he.value?"1px":"-20px","--c-tip-gap":he.value?"10px":"0px"})));function we({nodes:e}){var t,n;const{_ctx:s}=null==(t=e.download)?void 0:t.children,o=s?null==(n=null==s?void 0:s.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,l(S,null,{trigger:()=>l(I,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:Q,onClick:()=>o&&N(o,"img")},null),default:()=>"下载"}),e.close]}async function Se(){try{if(!Ie.hasMore)return;Ie.page++;const e=await E({sessionKey:fe.currentSessionItem.sessionKey,page:Ie.page,lastSendTime:Ie.lastSendTime});if(!Array.isArray(e)||0===e.length)return Ie.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=O(e).id;Ie.lastSendTime=P(e).sendTime,ge(Ie.page>1?[...fe.msgList,...e]:e),1===Ie.page&&fe.currentSessionItem.unreadNum&&(await L({chatType:fe.currentSessionItem.chatType,messageIdSet:[t],receiver:fe.userInfo.id,sender:fe.currentSessionItem.receiver}),ye({unreadNum:0}))}catch(e){console.log(e)}}async function je(e,t){_e.value=t,async function(e){var t,n,s,o,i,r;Me.value=!0,await T();const{clientX:a,clientY:c}=e,{width:l=0,height:u=0,left:m=0,top:p=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},d=null!=(o=null==(s=null==(n=Te.value)?void 0:n.$el)?void 0:s.getBoundingClientRect().height)?o:220,f=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,g=5,v={};a<=m+l/2?v.left=a-m+g+"px":v.right=m+l-a-g+"px";c-p<d/2?v.top=f+g+"px":p+u-c<=d/2?v.bottom=Math.abs(f)+g+"px":v.top=f+c-p-d/2+"px";ke.value=v}(e)}function Ee(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==z.TEMPLATE||!!n}function Le(e){const{chatMessageType:t}=e.content;return e.sender===fe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[z.TEXT,z.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===z.BLEND){const e=q(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[z.TEXT,z.EMOJI].includes(t)}function Ae(e){const{chatMessageType:t,msg:n=""}=e.content,s=q(n).match(/<img[^>]*>/gi);return t===z.BLEND&&s&&s.length}function ze(e,t){var n,s;const{chatMessageType:o,messageTemplate:i}=e.content;if(o===z.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(s=null==i?void 0:i.setting)?void 0:s.style.id)}function He(e){var t,n;const{chatMessageType:s,messageTemplate:o}=e;return s===z.TEMPLATE&&3==(null==(n=null==(t=null==o?void 0:o.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const s=new Date(e.sendTime).getTime(),o=null==(n=fe.msgList[t+1])?void 0:n.sendTime;if(o){return s-new Date(o).getTime()>3e5}return!0}function Re(e){fe.currentReferenceMsg=e,fe.currentReferenceMsg.content.referenceContent=null,Object.assign(fe.currentReferenceMsg,{chatType:fe.currentSessionItem.chatType,receiver:fe.currentSessionItem.receiver,receiverAvatar:fe.currentSessionItem.avatar,receiverName:fe.currentSessionItem.name})}function Ne(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=xe.value)||n.click()):Re(t)}function Oe(e,t){const n=fe.msgList.find((e=>e.id===_e.value));ve({checkedIds:e,remark:t,content:n.content})}return V(de,(()=>{Se()}),"top",(()=>{Me.value=!1})),s((()=>fe.id),(e=>{e&&(fe.currentReferenceMsg=null,Object.assign(Ie,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Se())}),{immediate:!0}),s((()=>fe.isAppendMsg),(e=>{e&&(ge([fe.currentMsg,...fe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),fe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>(o(),i("div",{class:r(["chat-main",{"home-bg":!a(fe).id}]),ref_key:"chatMainRef",ref:de,style:c(a(Ce))},[l(a(M),{"show-toolbar-tooltip":"","render-toolbar":we},{default:u((()=>[(o(!0),i(m,null,p(a(fe).msgList,((e,t)=>(o(),i(m,{key:e.id},[Ee(e)?(o(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(fe).userInfo.id}])},[De(e,t)?(o(),i("p",Z,d(e.__sendTime),1)):f("v-if",!0),ze(e,"system")||"WITHDRAWN"===e.status?(o(),i(m,{key:1},[ze(e,"system")?(o(),g(J,{key:0,data:e},null,8,["data"])):f("v-if",!0),"WITHDRAWN"===e.status?(o(),i("p",ee,[v("span",null,d(e.sender==a(fe).userInfo.id?"你":e.senderName)+"撤回了一条消息",1),Le(e)?(o(),g(a(k),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){fe.currentReEditMsg=e}(e)},{default:u((()=>[y(" 重新编辑 ")])),_:2},1032,["onClick"])):f("v-if",!0)])):f("v-if",!0)],64)):(o(),i("div",te,[l(B,{"user-id":e.sender,placement:e.sender==a(fe).userInfo.id?"left":"right"},{trigger:u((()=>[l(a(_),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(o(),i("div",ne,[v("div",se,[v("span",{class:"name","data-time":e.__time},d(a(he)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(z).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(z).TEMPLATE,"template--3":He(e.content),"audio-video":a(H)(e.content),file:e.content.chatMessageType===a(z).FILE}]),onContextmenu:h((t=>je(t,e.id)),["prevent"])},[be(e)?(o(),i(m,{key:0},[e.content.referenceContent?(o(),i("div",re,[v("span",null,d(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,ae)])):f("v-if",!0),e.content.chatMessageType===a(z).EMOJI?(o(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(W).findEmoji(e.__content)},null,10,ce)):(o(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):f("v-if",!0),Ae(e)?(o(),i("pre",{key:1,innerHTML:e.__content},null,8,ue)):f("v-if",!0),ze(e,"template")?(o(),g(J,{key:2,data:e},null,8,["data"])):f("v-if",!0),e.content.chatMessageType===a(z).IMAGE?(o(),g(a(x),{key:3,width:"240",src:e.__content},null,8,["src"])):f("v-if",!0),a(H)(e.content)?(o(),i(m,{key:4},[l(a(I),{class:r({"is-audio":e.content.chatMessageType===a(z).AUDIO}),component:e.content.chatMessageType===a(z).AUDIO?a(F):a(G)},null,8,["class","component"]),v("span",me,d(a(R)(e.__content)),1)],64)):f("v-if",!0),e.content.chatMessageType===a(z).FILE?(o(),g(a(C),{key:5,"wrap-item":!1},{default:u((()=>[l(a(I),{class:"icon-file",size:"40",component:a(K)},null,8,["component"]),l(a(C),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,d(e.__content),1),v("span",pe,d(e.__size),1)])),_:2},1024)])),_:2},1024)):f("v-if",!0),l(a(w),{class:"quick-menu"},{default:u((()=>[a(H)(e.content)?f("v-if",!0):(o(),i(m,{key:0},[f(' <n-button quaternary size="tiny">\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),l(a(k),{quaternary:"",size:"tiny",onClick:()=>Re(e)},{icon:u((()=>[l(a(I),{size:"17",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])],64)),l(a(k),{quaternary:"",size:"tiny",onClick:t=>je(t,e.id)},{icon:u((()=>[l(a(I),{size:"14",component:a($)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,ie)])):f("v-if",!0)]))],2)):f("v-if",!0)],64)))),128))])),_:1}),l(a(U),{ref_key:"contextmenuRef",ref:Te,show:Me.value,"onUpdate:show":t[0]||(t[0]=e=>Me.value=e),position:ke.value,"msg-id":_e.value,onSelect:Ne},null,8,["show","position","msg-id"]),l(X,{title:"转发消息",mode:"relay",onComfirm:Oe},{trigger:u((()=>[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:xe},"转发",512)])),_:1})],6))}});export{de as default};
|
1
|
+
import{defineComponent as e,ref as t,computed as n,watch as s,openBlock as o,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as c,createVNode as l,withCtx as u,Fragment as m,renderList as p,toDisplayString as d,createCommentVNode as f,createBlock as g,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as k,NAvatar as _,NImage as x,NIcon as I,NSpace as C,NButtonGroup as w,NTooltip as S}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as L}from"../api/index.js";import{useState as b}from"../hooks/useState.js";import{useSession as A}from"../hooks/useSession.js";import{MESSAGE_TYPE as z}from"../constants/index.js";import"trtc-sdk-v5";import{isAudioOrVideoMessage as H,simplifyMessage as D,getAVTime as R,downloadFile as N}from"../utils/index.js";import{first as O,last as P,toString as q}from"lodash-es";import B from"./PersonProfile.vue.js";import J from"./MessageTemplate.vue.js";import{emojis as W}from"../utils/emoji.js";import U from"./ContextMenu.js";import X from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as F,VideocamOutline as G,DocumentSharp as K,ChatbubbleEllipsesOutline as Y,EllipsisHorizontal as $,ArrowDownSharp as Q}from"@vicons/ionicons5";import{useScrollLoading as V}from"../../../../shared/hooks/useScrollLoading.js";const Z={key:0,class:"tip-text"},ee={key:1,class:"tip-text"},te={key:2,class:"message-box"},ne={key:0,class:"content-box"},se={class:"name-box"},oe=["data-time"],ie=["onContextmenu"],re={key:0,class:"reference-content"},ae=["innerHTML"],ce=["src"],le=["innerHTML"],ue=["innerHTML"],me={style:{"margin-left":"8px"}},pe={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:fe,setMsgList:ge,relayMessage:ve}=b(),{setCurrentSessionItem:ye,isGroupChat:he}=A(fe),Te=t(),Me=t(!1),ke=t({left:0,top:0}),_e=t(),xe=t(),Ie={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":he.value?"1px":"-20px","--c-tip-gap":he.value?"10px":"0px"})));function we({nodes:e}){var t,n;const{_ctx:s}=null==(t=e.download)?void 0:t.children,o=s?null==(n=null==s?void 0:s.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,l(S,null,{trigger:()=>l(I,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:Q,onClick:()=>o&&N(o,"img")},null),default:()=>"下载"}),e.close]}async function Se(){try{if(!Ie.hasMore)return;Ie.page++;const e=await E({sessionKey:fe.currentSessionItem.sessionKey,page:Ie.page,lastSendTime:Ie.lastSendTime});if(!Array.isArray(e)||0===e.length)return Ie.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=O(e).id;Ie.lastSendTime=P(e).sendTime,ge(Ie.page>1?[...fe.msgList,...e]:e),1===Ie.page&&fe.currentSessionItem.unreadNum&&(await L({chatType:fe.currentSessionItem.chatType,messageIdSet:[t],receiver:fe.userInfo.id,sender:fe.currentSessionItem.receiver}),ye({unreadNum:0}))}catch(e){console.log(e)}}async function je(e,t){_e.value=t,async function(e){var t,n,s,o,i,r;Me.value=!0,await T();const{clientX:a,clientY:c}=e,{width:l=0,height:u=0,left:m=0,top:p=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},d=null!=(o=null==(s=null==(n=Te.value)?void 0:n.$el)?void 0:s.getBoundingClientRect().height)?o:220,f=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,g=5,v={};a<=m+l/2?v.left=a-m+g+"px":v.right=m+l-a-g+"px";c-p<d/2?v.top=f+g+"px":p+u-c<=d/2?v.bottom=Math.abs(f)+g+"px":v.top=f+c-p-d/2+"px";ke.value=v}(e)}function Ee(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==z.TEMPLATE||!!n}function Le(e){const{chatMessageType:t}=e.content;return e.sender===fe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[z.TEXT,z.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===z.BLEND){const e=q(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[z.TEXT,z.EMOJI].includes(t)}function Ae(e){const{chatMessageType:t,msg:n=""}=e.content,s=q(n).match(/<img[^>]*>/gi);return t===z.BLEND&&s&&s.length}function ze(e,t){var n,s;const{chatMessageType:o,messageTemplate:i}=e.content;if(o===z.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(s=null==i?void 0:i.setting)?void 0:s.style.id)}function He(e){var t,n;const{chatMessageType:s,messageTemplate:o}=e;return s===z.TEMPLATE&&3==(null==(n=null==(t=null==o?void 0:o.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const s=new Date(e.sendTime).getTime(),o=null==(n=fe.msgList[t+1])?void 0:n.sendTime;if(o){return s-new Date(o).getTime()>3e5}return!0}function Re(e){fe.currentReferenceMsg=e,fe.currentReferenceMsg.content.referenceContent=null,Object.assign(fe.currentReferenceMsg,{chatType:fe.currentSessionItem.chatType,receiver:fe.currentSessionItem.receiver,receiverAvatar:fe.currentSessionItem.avatar,receiverName:fe.currentSessionItem.name})}function Ne(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=xe.value)||n.click()):Re(t)}function Oe(e,t){const n=fe.msgList.find((e=>e.id===_e.value));ve({checkedIds:e,remark:t,content:n.content})}return V(de,(()=>{Se()}),"top",(()=>{Me.value=!1})),s((()=>fe.id),(e=>{e&&(fe.currentReferenceMsg=null,Object.assign(Ie,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Se())}),{immediate:!0}),s((()=>fe.isAppendMsg),(e=>{e&&(ge([fe.currentMsg,...fe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),fe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>(o(),i("div",{class:r(["chat-main",{"home-bg":!a(fe).id}]),ref_key:"chatMainRef",ref:de,style:c(a(Ce))},[l(a(M),{"show-toolbar-tooltip":"","render-toolbar":we},{default:u((()=>[(o(!0),i(m,null,p(a(fe).msgList,((e,t)=>(o(),i(m,{key:e.id},[Ee(e)?(o(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(fe).userInfo.id}])},[De(e,t)?(o(),i("p",Z,d(e.__sendTime),1)):f("v-if",!0),ze(e,"system")||"WITHDRAWN"===e.status?(o(),i(m,{key:1},[ze(e,"system")?(o(),g(J,{key:0,data:e},null,8,["data"])):f("v-if",!0),"WITHDRAWN"===e.status?(o(),i("p",ee,[v("span",null,d(e.sender==a(fe).userInfo.id?"你":e.senderName)+"撤回了一条消息",1),Le(e)?(o(),g(a(k),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){fe.currentReEditMsg=e}(e)},{default:u((()=>[y(" 重新编辑 ")])),_:2},1032,["onClick"])):f("v-if",!0)])):f("v-if",!0)],64)):(o(),i("div",te,[l(B,{"user-id":e.sender,placement:e.sender==a(fe).userInfo.id?"left":"right"},{trigger:u((()=>[l(a(_),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(o(),i("div",ne,[v("div",se,[v("span",{class:"name","data-time":e.__time},d(a(he)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(z).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(z).TEMPLATE,"template--3":He(e.content),"audio-video":a(H)(e.content),file:e.content.chatMessageType===a(z).FILE}]),onContextmenu:h((t=>je(t,e.id)),["prevent"])},[be(e)?(o(),i(m,{key:0},[e.content.referenceContent?(o(),i("div",re,[v("span",null,d(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,ae)])):f("v-if",!0),e.content.chatMessageType===a(z).EMOJI?(o(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(W).findEmoji(e.__content)},null,10,ce)):(o(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):f("v-if",!0),Ae(e)?(o(),i("pre",{key:1,innerHTML:e.__content},null,8,ue)):f("v-if",!0),ze(e,"template")?(o(),g(J,{key:2,data:e},null,8,["data"])):f("v-if",!0),e.content.chatMessageType===a(z).IMAGE?(o(),g(a(x),{key:3,width:"240",src:e.__content},null,8,["src"])):f("v-if",!0),a(H)(e.content)?(o(),i(m,{key:4},[l(a(I),{class:r({"is-audio":e.content.chatMessageType===a(z).AUDIO}),component:e.content.chatMessageType===a(z).AUDIO?a(F):a(G)},null,8,["class","component"]),v("span",me,d(a(R)(e.__content)),1)],64)):f("v-if",!0),e.content.chatMessageType===a(z).FILE?(o(),g(a(C),{key:5,"wrap-item":!1},{default:u((()=>[l(a(I),{class:"icon-file",size:"40",component:a(K)},null,8,["component"]),l(a(C),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,d(e.__content),1),v("span",pe,d(e.__size),1)])),_:2},1024)])),_:2},1024)):f("v-if",!0),l(a(w),{class:"quick-menu"},{default:u((()=>[a(H)(e.content)?f("v-if",!0):(o(),i(m,{key:0},[f(' <n-button quaternary size="tiny">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),l(a(k),{quaternary:"",size:"tiny",onClick:()=>Re(e)},{icon:u((()=>[l(a(I),{size:"17",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])],64)),l(a(k),{quaternary:"",size:"tiny",onClick:t=>je(t,e.id)},{icon:u((()=>[l(a(I),{size:"14",component:a($)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,ie)])):f("v-if",!0)]))],2)):f("v-if",!0)],64)))),128))])),_:1}),l(a(U),{ref_key:"contextmenuRef",ref:Te,show:Me.value,"onUpdate:show":t[0]||(t[0]=e=>Me.value=e),position:ke.value,"msg-id":_e.value,onSelect:Ne},null,8,["show","position","msg-id"]),l(X,{title:"转发消息",mode:"relay",onComfirm:Oe},{trigger:u((()=>[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:xe},"转发",512)])),_:1})],6))}});export{de as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as
|
1
|
+
import{defineComponent as e,ref as s,computed as o,watch as r,nextTick as t,openBlock as a,createBlock as l,unref as n,normalizeStyle as i,withCtx as u,createVNode as p,createTextVNode as c,createElementVNode as f,createElementBlock as m,Fragment as d,renderList as h,toDisplayString as v,withDirectives as k,vShow as w}from"vue";import{NPopover as y,NButton as g,NIcon as j,NInput as S,NAvatar as _}from"naive-ui";import{SearchOutline as x}from"@vicons/ionicons5";import{useState as C}from"../hooks/useState.js";import{useSession as L}from"../hooks/useSession.js";import"trtc-sdk-v5";import"../utils/index.js";import{openSessionApi as R}from"../api/index.js";import{useTheme as U}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";import{useSearchUserList as I}from"../hooks/useSearchUserList.js";import b from"../../../default-page/index.js";const z=["onClick"],N={class:"user-info"};var T=e({__name:"ChatSearch",setup(e){const T=U(),D=s(),E=s(),G=s(!1),H=s(""),{state:$}=C(),{openSession:q}=L($),{userList:A,handleInput:B}=I({wrapperRef:D,keywordRef:H}),F=o((()=>!A.value.length&&!!(H.value||"").replace(/^\s+|\s+$/g,"")));return r((()=>G.value),(async e=>{var s;e&&(await t(),null==(s=E.value)||s.focus())})),(e,s)=>(a(),l(n(y),{raw:"","content-class":"search-content",class:"search-wrapper",style:i(n(T)),show:G.value,"onUpdate:show":s[1]||(s[1]=e=>G.value=e),placement:"top",trigger:"click","display-directive":"show","show-arrow":!1,delay:0,overlap:""},{trigger:u((()=>[p(n(g),{color:"#ffffff4D",class:"search-trigger-btn"},{icon:u((()=>[p(n(j),{component:n(x),color:"#ffffff80"},null,8,["component"])])),default:u((()=>[c(" 搜索联系人 ")])),_:1})])),default:u((()=>[p(n(S),{ref_key:"inputRef",ref:E,size:"small",clearable:"",autofocus:"",value:H.value,"onUpdate:value":[s[0]||(s[0]=e=>H.value=e),n(B)]},{prefix:u((()=>[p(n(j),{color:"#ffffff80",component:n(x)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),f("div",{class:"user-list-wrapper",ref_key:"listRef",ref:D},[(a(!0),m(d,null,h(n(A),(e=>(a(),m("div",{class:"user-item",key:e.id,onClick:()=>async function(e){G.value=!1;const s=await R({chatType:"SINGLE",receiver:e,sender:$.userInfo.id});q(s)}(e.id)},[p(n(_),{round:"",size:32,src:e.avatar},null,8,["src"]),f("div",N,[f("span",null,v(e.name),1),f("span",null,v(e.deptName),1),f("span",null,v(e.post),1)])],8,z)))),128)),k(p(n(b),{config:{title:" ",content:"找不到相关的结果"},type:"5"},null,512),[[w,n(F)]])],512)])),_:1},8,["style","show"]))}});export{T as default};
|
@@ -7,11 +7,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
7
7
|
state: import("../types").IState;
|
8
8
|
setCurrentSessionItem: (item: AnyObject) => void;
|
9
9
|
isGroupChat: import("vue").ComputedRef<boolean>;
|
10
|
+
isGroupLeader: import("vue").ComputedRef<boolean>;
|
10
11
|
inputRef: import("vue").Ref<any>;
|
11
12
|
groupNameEditing: import("vue").Ref<boolean>;
|
12
13
|
groupName: import("vue").Ref<string>;
|
13
14
|
showGroupDetail: import("vue").Ref<boolean>;
|
14
|
-
isGroupLeader: import("vue").ComputedRef<boolean>;
|
15
15
|
currentGroupUserIds: import("vue").ComputedRef<any[]>;
|
16
16
|
currentGroupUser: import("vue").ComputedRef<AnyObject[]>;
|
17
17
|
handleTopping: (value: boolean) => Promise<void>;
|
@@ -124,6 +124,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
124
124
|
type: import("vue").PropType<AnyObject[]>;
|
125
125
|
default: () => never[];
|
126
126
|
};
|
127
|
+
disabled: {
|
128
|
+
type: BooleanConstructor;
|
129
|
+
default: boolean;
|
130
|
+
};
|
127
131
|
}, {
|
128
132
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
129
133
|
title: {
|
@@ -145,6 +149,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
145
149
|
type: import("vue").PropType<AnyObject[]>;
|
146
150
|
default: () => never[];
|
147
151
|
};
|
152
|
+
disabled: {
|
153
|
+
type: BooleanConstructor;
|
154
|
+
default: boolean;
|
155
|
+
};
|
148
156
|
}>> & {
|
149
157
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
150
158
|
}>>;
|
@@ -209,11 +217,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
209
217
|
type: import("vue").PropType<AnyObject[]>;
|
210
218
|
default: () => never[];
|
211
219
|
};
|
220
|
+
disabled: {
|
221
|
+
type: BooleanConstructor;
|
222
|
+
default: boolean;
|
223
|
+
};
|
212
224
|
}>> & {
|
213
225
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
214
226
|
}, {
|
215
227
|
title: string;
|
216
228
|
defaultValue: AnyObject[];
|
229
|
+
disabled: boolean;
|
217
230
|
mode: string;
|
218
231
|
disabledIds: string[];
|
219
232
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as n,computed as s,watch as i,openBlock as
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as n,computed as s,watch as i,openBlock as a,createBlock as o,unref as r,withCtx as l,createVNode as c,createTextVNode as u,createElementBlock as m,Fragment as p,renderList as d,createElementVNode as v,toDisplayString as f,createCommentVNode as g,withKeys as _,nextTick as y}from"vue";import{NDrawer as k,NDrawerContent as h,NButton as b,NIcon as I,NAvatar as w,NUpload as S,NUploadTrigger as x,NInput as C,NSpace as z,NSwitch as U,NPopconfirm as j}from"naive-ui";import{ChevronBackOutline as G,ChevronForwardOutline as P,AddOutline as A,RemoveOutline as L,Pencil as R}from"@vicons/ionicons5";import{useState as D}from"../hooks/useState.js";import{useSession as F}from"../hooks/useSession.js";import"trtc-sdk-v5";import"../utils/index.js";import B from"./PersonProfile.vue.js";import K from"./ChatAdd.vue.js";import{toppingSessionApi as N,groupLeaveApi as O,groupUpdateApi as q}from"../api/index.js";import{trim as E,isFunction as H}from"lodash-es";const J={key:0,class:"chat-set-wrapper"},M={class:"item"},Q={class:"name"},T={key:0,class:"item__right",style:{color:"var(--c-primary-color)"}},V={class:"item user-info"},W={class:"name"},X={class:"item item-column"},Y=v("span",{class:"label"},"群成员",-1),Z={class:"group-box"},$={class:"group-box__item"},ee={class:"name"},te={class:"group-box__item"},ne=v("span",{class:"name"},"添加",-1),se={class:"group-box__item"},ie=v("span",{class:"name"},"移除",-1),ae=["onClick"],oe=v("span",{class:"label"},"群头像",-1),re={class:"item"},le=v("span",{class:"label"},"群名称",-1),ce={class:"item__right"},ue={class:"txt"},me={class:"item"},pe=v("span",{class:"label"},"置顶聊天",-1),de={class:"item item--red"},ve=v("span",{class:"label"},"退出群聊",-1),fe=v("p",{style:{width:"230px"}},"是否确认退出群聊?",-1),ge={class:"item item--red"},_e=v("span",{class:"label"},"解散该群",-1),ye=v("p",{style:{width:"230px"}},"是否确认解散群聊?",-1);var ke=e({__name:"ChatSet",setup(e){const ke=t(),{state:he}=D(),{setCurrentSessionItem:be,isGroupChat:Ie,isGroupLeader:we}=F(he),Se=n(),xe=n(!1),Ce=n(""),ze=n(!1),Ue=s((()=>he.currentGroupUser.map((e=>e.id)))),je=s((()=>he.currentGroupUser?we.value?he.currentGroupUser.slice(0,6):he.currentGroupUser.slice(0,7):[]));async function Ge(e){try{await N({id:he.currentSessionItem.id,topping:e}),be({topping:e})}catch(e){}}async function Pe(e){await O({dissolution:!!e,groupId:he.currentSessionItem.receiver,operator:he.userInfo.id,memberIdSet:e?Ue.value:[he.userInfo.id]})}async function Ae(){var e;Ce.value=he.currentSessionItem.name,xe.value=!0,await y(),null==(e=Se.value)||e.select()}async function Le(e){const t=new FormData,n=Object.assign({id:he.currentSessionItem.receiver},e);for(const e in n)t.append(e,n[e]);await q(t)}async function Re(){xe.value=!1;const e=E(Ce.value);e&&e!==he.currentSessionItem.name&&(await Le({name:e}),be({name:e,defaultName:e}))}async function De(e){const{file:t}=e.file,n=new FileReader;n.onload=function(e){var t;(null==(t=e.target)?void 0:t.result)&&be({avatar:e.target.result})},n.readAsDataURL(e.file.file),await Le({file:t})}function Fe(){H(ke["onUpdate:show"])&&ke["onUpdate:show"](!1)}return i((()=>he.id),(e=>{Fe()})),(e,t)=>(a(),o(r(k),{width:320,"trap-focus":!1,"block-scroll":!1,to:".iho-chat",onAfterLeave:t[7]||(t[7]=e=>ze.value=!1)},{default:l((()=>[c(r(h),null,{header:l((()=>[r(Ie)&&ze.value?(a(),o(r(b),{key:0,text:"",color:"#666",onClick:t[0]||(t[0]=e=>ze.value=!1),style:{"font-size":"var(--n-title-font-size)"}},{icon:l((()=>[c(r(I),{size:20,component:r(G)},null,8,["component"])])),default:l((()=>[u(" 返回 ")])),_:1})):r(Ie)?(a(),m(p,{key:1},[u("群设置")],64)):(a(),m(p,{key:2},[u("聊天设置")],64))])),default:l((()=>[r(he).id?(a(),m("div",J,[r(Ie)&&ze.value?(a(!0),m(p,{key:0},d(r(he).currentGroupUser,((e,t)=>(a(),o(B,{key:e.id,"user-id":e.id,placement:"left"},{trigger:l((()=>[v("div",M,[c(r(w),{round:"",size:40,src:e.avatar},null,8,["src"]),v("span",Q,f(e.name),1),0===t?(a(),m("span",T,"群主")):g("v-if",!0)])])),_:2},1032,["user-id"])))),128)):(a(),m(p,{key:1},[c(B,{"user-id":r(he).currentSessionItem.receiver,onClose:Fe,disabled:!!r(Ie),placement:"bottom-end"},{trigger:l((()=>[v("div",V,[c(r(w),{round:"",size:40,src:r(he).currentSessionItem.avatar},null,8,["src"]),v("span",W,f(r(he).currentSessionItem.name),1),r(Ie)?g("v-if",!0):(a(),o(r(I),{key:0,size:24,component:r(P),class:"item__right"},null,8,["component"]))])])),_:1},8,["user-id","disabled"]),r(Ie)?(a(),m(p,{key:0},[v("div",X,[Y,v("div",Z,[(a(!0),m(p,null,d(r(je),(e=>(a(),o(B,{key:e.id,"user-id":e.id,placement:"left-start"},{trigger:l((()=>[v("div",$,[c(r(w),{round:"",size:40,src:e.avatar},null,8,["src"]),v("span",ee,f(e.name),1)])])),_:2},1032,["user-id"])))),128)),c(K,{mode:"join",disabledIds:r(Ue)},{trigger:l((()=>[v("div",te,[c(r(b),{strong:"",secondary:"",circle:""},{icon:l((()=>[c(r(I),{component:r(A)},null,8,["component"])])),_:1}),ne])])),_:1},8,["disabledIds"]),r(we)?(a(),o(K,{key:0,title:"移除成员",mode:"remove",options:r(he).currentGroupUser},{trigger:l((()=>[v("div",se,[c(r(b),{strong:"",secondary:"",circle:""},{icon:l((()=>[c(r(I),{component:r(L)},null,8,["component"])])),_:1}),ie])])),_:1},8,["options"])):g("v-if",!0)]),c(r(b),{text:"","icon-placement":"right",color:"#999",onClick:t[1]||(t[1]=e=>ze.value=!0)},{icon:l((()=>[c(r(I),{component:r(P)},null,8,["component"])])),default:l((()=>[u(" 查看全部群成员 ")])),_:1})]),c(r(S),{abstract:"",multiple:"",accept:"image/*",onChange:De},{default:l((()=>[c(r(x),{abstract:""},{default:l((({handleClick:e})=>[v("div",{class:"item",onClick:e},[oe,c(r(I),{size:20,component:r(P),class:"item__right"},null,8,["component"])],8,ae)])),_:1})])),_:1}),v("div",re,[le,v("div",ce,[xe.value?(a(),o(r(C),{key:0,ref_key:"inputRef",ref:Se,value:Ce.value,"onUpdate:value":t[2]||(t[2]=e=>Ce.value=e),onBlur:Re,onKeydown:t[3]||(t[3]=_((e=>e.target.blur()),["enter"]))},null,8,["value"])):(a(),o(r(z),{key:1,"wrap-item":!1,onClick:Ae,align:"center"},{default:l((()=>[v("span",ue,f(r(he).currentSessionItem.name),1),c(r(b),{text:"",style:{"font-size":"14px","--n-text-color":"#999"}},{default:l((()=>[c(r(I),{component:r(R)},null,8,["component"])])),_:1})])),_:1}))])])],64)):g("v-if",!0),v("div",me,[pe,c(r(U),{value:r(he).currentSessionItem.topping,"onUpdate:value":[t[4]||(t[4]=e=>r(he).currentSessionItem.topping=e),Ge],class:"item__right"},null,8,["value"])]),r(Ie)?(a(),m(p,{key:1},[c(r(j),{onPositiveClick:t[5]||(t[5]=()=>Pe(!1))},{trigger:l((()=>[v("div",de,[ve,c(r(I),{size:20,component:r(P),class:"item__right"},null,8,["component"])])])),default:l((()=>[fe])),_:1}),r(we)?(a(),o(r(j),{key:0,onPositiveClick:t[6]||(t[6]=()=>Pe(!0))},{trigger:l((()=>[v("div",ge,[_e,c(r(I),{size:20,component:r(P),class:"item__right"},null,8,["component"])])])),default:l((()=>[ye])),_:1})):g("v-if",!0)],64)):g("v-if",!0)],64))])):g("v-if",!0)])),_:1})])),_:1}))}});export{ke as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as s,withDirectives as o,createVNode as i,vShow as n,isVNode as r}from"vue";import{NButtonGroup as a,NButton as l,NIcon as c}from"naive-ui";import{CopyOutline as m,OpenOutline as d,ChatbubbleEllipsesOutline as u,ReturnDownBack as p,DownloadOutline as g}from"@vicons/ionicons5";import{onClickOutside as
|
1
|
+
import{defineComponent as e,ref as t,computed as s,withDirectives as o,createVNode as i,vShow as n,isVNode as r}from"vue";import{NButtonGroup as a,NButton as l,NIcon as c}from"naive-ui";import{CopyOutline as m,OpenOutline as d,ChatbubbleEllipsesOutline as u,ReturnDownBack as p,DownloadOutline as g}from"@vicons/ionicons5";import{onClickOutside as y}from"@vueuse/core";import{useState as f}from"../hooks/useState.js";import{useSession as w}from"../hooks/useSession.js";import{MESSAGE_TYPE as h}from"../constants/index.js";import"trtc-sdk-v5";import{isAudioOrVideoMessage as I,$message as v,downloadFile as T}from"../utils/index.js";import{emojis as M}from"../utils/emoji.js";import{recallMessageApi as b}from"../api/index.js";import{format as E}from"date-fns";var j=e({name:"PopupMenu",inheritAttrs:!1,props:{show:{type:Boolean,default:!1},position:{type:Object},msgId:{type:String}},emits:["update:show","select"],setup(e,{attrs:j,slots:k,emit:S}){const{state:x,setMsgList:L}=f(),{setCurrentSessionItem:A}=w(x),O=[{icon:m,label:"复制",key:"copy"},{icon:d,label:"转发",key:"relay"},{icon:u,label:"回复",key:"reply"},{icon:p,label:"撤回",key:"withdraw"},{icon:g,label:"下载",key:"download"}],D=t(null),W=s((()=>x.msgList.find((({id:t})=>t===e.msgId)))),$=s((()=>{if(!e.msgId)return[];if(!(null==W?void 0:W.value))return[];const{content:t={},sendTime:s,sender:o}=W.value,{chatMessageType:i}=t,n=[];return(o!==x.userInfo.id||i===h.TEMPLATE||o===x.userInfo.id&&Date.now()-new Date(s).getTime()>2592e5)&&n.push("withdraw"),[h.TEXT,h.EMOJI,h.BLEND].includes(i)?n.push("download"):I(t)?n.push("copy","relay","reply","download"):i===h.FILE?n.push("copy"):[h.FORWARD,h.TEMPLATE].includes(i)&&n.push("copy","download"),n.length?O.filter((e=>!n.includes(e.key))):O}));return y(D,(e=>{S("update:show",!1)})),()=>{let t;return e.msgId&&$.value?o(i("div",{class:"contextmenu-wrapper",ref:D,style:e.position},[i(a,{vertical:!0},(s=t=$.value.map((t=>i(l,{onClick:()=>async function(t){S("update:show",!1);const{content:s={},sendTime:o,sender:i}=W.value||{},{chatMessageType:n}=s;switch(t){case"copy":if(!s.msg)return console.log("复制内容为空!");if(!navigator||!("clipboard"in navigator))return console.log("当前浏览器版本不支持复制!");try{if(n===h.TEXT)await navigator.clipboard.writeText(s.msg);else{let e;if([h.EMOJI,h.IMAGE].includes(n)){const t=n===h.EMOJI?M.findEmoji(s.msg):s.msg;e=`<img data-msg=${s.msg} data-type=${n} class=${n===h.EMOJI?"emoji--min":""} src=${t} />`}else e=s.msg;await navigator.clipboard.write([new window.ClipboardItem({"text/html":new Blob([e],{type:"text/html"})})])}}catch(e){console.log("复制失败!")}return;case"download":{let{fileUrl:e,msg:t}=s;return n===h.IMAGE&&(e=t,t=t.match(/\/([^\/?#]+)$/)[1]),void T(e,t)}case"withdraw":try{const t=x.msgList.findIndex((({id:t})=>t===e.msgId)),s=0===t;if(await b({chatType:x.currentSessionItem.chatType,messageIdSet:[e.msgId],receiver:x.currentSessionItem.receiver,sender:x.userInfo.id,isLastMessage:s}),x.msgList[t].status="WITHDRAWN",s){const e=E(new Date,"yyyy-MM-dd HH:mm:ss");A({lastMessageStatus:"WITHDRAWN",lastMessageSendTime:e,sortTime:e,updatedTime:e})}}catch(e){v.error("撤回失败")}return}S("select",t,W.value)}(t.key),quaternary:!0},{default:()=>t.label,icon:()=>i(c,{component:t.icon},null)}))),"function"==typeof s||"[object Object]"===Object.prototype.toString.call(s)&&!r(s)?t:{default:()=>[t]}))]),[[n,e.show]]):null;var s}}});export{j as default};
|
@@ -72,6 +72,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
72
72
|
type: import("vue").PropType<AnyObject[]>;
|
73
73
|
default: () => never[];
|
74
74
|
};
|
75
|
+
disabled: {
|
76
|
+
type: BooleanConstructor;
|
77
|
+
default: boolean;
|
78
|
+
};
|
75
79
|
}, {
|
76
80
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
77
81
|
title: {
|
@@ -93,6 +97,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
93
97
|
type: import("vue").PropType<AnyObject[]>;
|
94
98
|
default: () => never[];
|
95
99
|
};
|
100
|
+
disabled: {
|
101
|
+
type: BooleanConstructor;
|
102
|
+
default: boolean;
|
103
|
+
};
|
96
104
|
}>> & {
|
97
105
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
98
106
|
}>>;
|
@@ -157,11 +165,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
157
165
|
type: import("vue").PropType<AnyObject[]>;
|
158
166
|
default: () => never[];
|
159
167
|
};
|
168
|
+
disabled: {
|
169
|
+
type: BooleanConstructor;
|
170
|
+
default: boolean;
|
171
|
+
};
|
160
172
|
}>> & {
|
161
173
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
162
174
|
}, {
|
163
175
|
title: string;
|
164
176
|
defaultValue: AnyObject[];
|
177
|
+
disabled: boolean;
|
165
178
|
mode: string;
|
166
179
|
disabledIds: string[];
|
167
180
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as o,computed as n,onBeforeUnmount as t,openBlock as s,createElementBlock as l,createElementVNode as i,withDirectives as a,toDisplayString as c,unref as r,vShow as d,createVNode as u,withCtx as m,Fragment as p,renderList as v,createCommentVNode as f,createTextVNode as g,nextTick as h}from"vue";import{NButton as I,NIcon as k}from"naive-ui";import A from"./ChatAdd.vue.js";import{Close as y,Mic as V,MicOff as b,Videocam as w,VideocamOff as _,Call as M,PersonAdd as x}from"@vicons/ionicons5";import{xorBy as R}from"lodash-es";import"
|
1
|
+
import{defineComponent as e,ref as o,computed as n,onBeforeUnmount as t,openBlock as s,createElementBlock as l,createElementVNode as i,withDirectives as a,toDisplayString as c,unref as r,vShow as d,createVNode as u,withCtx as m,Fragment as p,renderList as v,createCommentVNode as f,createTextVNode as g,nextTick as h}from"vue";import{NButton as I,NIcon as k}from"naive-ui";import A from"./ChatAdd.vue.js";import{Close as y,Mic as V,MicOff as b,Videocam as w,VideocamOff as _,Call as M,PersonAdd as x}from"@vicons/ionicons5";import{xorBy as R}from"lodash-es";import"../utils/index.js";import{CHAT_TYPE as E,SUBSCRIBE_MESSAGE_TYPE as T}from"../constants/index.js";import"@vueuse/core";import{getUserDetailApi as C}from"../api/index.js";import{useVideo as S}from"../hooks/useVideo.js";import $ from"trtc-sdk-v5";const j={class:"video-wrapper video-wrapper--multiple"},L={class:"video-header"},U={key:0,class:"video-main"},z={class:"video-main__left"},H=["data-name"],N={class:"video-bottom"},D={class:"btn-group"},O={class:"btn"},P=i("span",{class:"text"},"静音",-1),Y={class:"btn"},q=i("span",{class:"text"},"摄像头",-1),G=i("span",{class:"text"},"结束会诊",-1),B={class:"btn"},F=i("span",{class:"text"},"添加参会人",-1),J={class:"video-main__right"},K=["id","data-name"],Q={class:"user"},W={class:"name"},X={key:0,class:"tip"},Z={key:0,class:"calling-box"},ee={class:"btn-box"},oe={key:1,class:"opt-btn"},ne={class:"btn"},te=i("span",null,"拒接",-1),se={class:"btn"},le=i("span",null,"接听",-1);var ie=e({__name:"MultipleVideo",setup(e){const ie=o(),ae=o([]),{state:ce,sendMessage:re,trtc:de,voiceOpen:ue,isAudio:me,isCall:pe,startTimer:ve,resetTimer:fe,toggleAudio:ge,messageTypeText:he,timing:Ie,toggleVideo:ke,videocamOpen:Ae,installEventHandlers:ye,uninstallEventHandlers:Ve}=S(),be=o(!1),we=n((()=>pe.value?ce.userInfo.name:ce.currentAVMsg.sendName)),_e=n((()=>{if(!be.value)return"";const e=pe.value?`(${ae.value.length+1}/${ce.currentAVMsg.checkedIds.length+1})`:"";return`${we.value}发起的${he.value}会诊${e} ${Ie.value}`}));function Me(e){console.log("checkedIds :>> ",e),ce.currentAVMsg.checkedIds.push(...e),xe()}function xe(){var e;(null==(e=ce.currentAVMsg.checkedIds)?void 0:e.length)&&ce.currentAVMsg.checkedIds.forEach((e=>{re({chatType:E.SINGLE,content:{msg:ce.currentAVMsg.chatMessageType+","+ce.currentAVMsg.strRoomId,chatMessageType:T.AV_STATUS},receiver:e})})),be.value||Re()}async function Re(){const e=await $.isSupported();if(!e.result||!e.detail.isH264EncodeSupported||!e.detail.isH264DecodeSupported)return console.log("checkResult :>> ",e),void(ce.showMultipleVideo=!1);try{if(await de.enterRoom({strRoomId:ce.currentAVMsg.strRoomId,sdkAppId:parseInt(ce.userInfo.sdkAppID),userId:ce.userInfo.id,userSig:ce.userInfo.userSig}),be.value=!0,ve(),ye({handleError:Le,handleRemoteUserEnter:Se,handleRemoteAudioAvailable:Ce,handleRemoteUserExit:je,handleRemoteVideoAvailable:Te}),await de.startLocalAudio(),me.value)return;await de.startLocalVideo({view:ie.value})}catch(e){console.log("error :>> ",e),ce.showMultipleVideo=!1}}async function Ee(){try{if(ce.showMultipleVideo=!1,Ve({handleError:Le,handleRemoteUserEnter:Se,handleRemoteAudioAvailable:Ce,handleRemoteUserExit:je,handleRemoteVideoAvailable:Te}),await de.exitRoom(),await de.stopLocalAudio(),me.value)return;await de.stopLocalVideo()}catch(e){console.log("error :>> ",e)}}async function Te(e){const{userId:o,streamType:n}=e;try{n===$.TYPE.STREAM_TYPE_MAIN&&(await h(),await de.startRemoteVideo({userId:o,streamType:n,view:o}))}catch(e){console.log("error :>> ",e)}}async function Ce(e){var o;const{userId:n}=e;if(n&&!(null==(o=ae.value.map((e=>e.id)))?void 0:o.includes(n))){const e=await $e(n);ae.value.push({id:n,name:e})}}async function Se(e){const{userId:o}=e,n=await $e(o);ae.value.push({id:o,name:n}),ve()}async function $e(e){const o=await C({userId:e});return(null==o?void 0:o.name)||""}function je(e){console.log("event :>> 退房",e);const{userId:o}=e;ae.value=R(ae.value,[{id:o,name:""}],"id")}function Le(e){console.log("error :>> ",e),ce.showMultipleVideo=!1}return t((()=>{Ee()})),(e,o)=>(s(),l("div",j,[i("div",L,[a(i("span",{class:"title"},c(r(_e)),513),[[d,be.value]]),u(r(I),{quaternary:"",circle:"",color:"#ffffffcc",onClick:Ee},{icon:m((()=>[u(r(k),{component:r(y)},null,8,["component"])])),_:1})]),be.value?(s(),l("div",U,[i("div",z,[i("div",{ref_key:"selfVideoRef",ref:ie,class:"video-view","data-name":r(ce).userInfo.name},null,8,H),i("div",N,[i("div",D,[i("div",O,[u(r(I),{text:"",color:r(ue)?"#fff":"#000",onClick:r(ge)},{icon:m((()=>[u(r(k),{component:r(ue)?r(V):r(b)},null,8,["component"])])),_:1},8,["color","onClick"]),P]),i("div",Y,[u(r(I),{text:"",color:r(Ae)?"#fff":"#000",disabled:r(me),onClick:r(ke)},{icon:m((()=>[u(r(k),{component:r(Ae)?r(w):r(_)},null,8,["component"])])),_:1},8,["color","disabled","onClick"]),q]),i("div",{class:"btn",onClick:Ee},[u(r(I),{circle:"",color:"#f17568",class:"btn--rotate"},{icon:m((()=>[u(r(k),{component:r(M)},null,8,["component"])])),_:1}),G]),u(A,{onComfirm:Me},{trigger:m((()=>[i("div",B,[u(r(I),{text:"",color:"#fff"},{icon:m((()=>[u(r(k),{component:r(x)},null,8,["component"])])),_:1}),F])])),_:1})])])]),i("div",J,[(s(!0),l(p,null,v(ae.value,(e=>(s(),l("div",{key:e.id,id:e.id,class:"video-view","data-name":e.name},null,8,K)))),128))])])):(s(),l(p,{key:1},[i("div",Q,[i("span",W,c(r(we))+"发起的"+c(r(he))+"会议",1),r(pe)?f("v-if",!0):(s(),l("span",X,"邀请你加入"+c(r(he))+"会议",1))]),r(pe)?(s(),l("div",Z,[u(A,{onComfirm:Me,disabledIds:r(ce).currentAVMsg.checkedIds},{trigger:m((()=>[u(r(I),{size:"large",circle:"",color:"#000"},{icon:m((()=>[u(r(k),{component:r(x)},null,8,["component"])])),_:1})])),_:1},8,["disabledIds"]),i("p",null,"已邀请共"+c(r(ce).currentAVMsg.checkedIds.length)+"人",1),u(r(I),{size:"large",strong:"",round:"",type:"primary",onClick:xe},{default:m((()=>[g("开始会诊")])),_:1}),i("div",ee,[u(r(I),{color:"#000",round:""},{icon:m((()=>[u(r(k),{component:r(V)},null,8,["component"])])),_:1}),u(r(I),{color:"#000",round:""},{icon:m((()=>[u(r(k),{component:r(w)},null,8,["component"])])),_:1})])])):(s(),l("div",oe,[i("div",ne,[u(r(I),{circle:"",color:"#f17568",class:"btn--rotate",onClick:o[0]||(o[0]=()=>r(ce).showMultipleVideo=!1)},{icon:m((()=>[u(r(k),{size:"30",component:r(M)},null,8,["component"])])),_:1}),te]),i("div",se,[u(r(I),{circle:"",color:"#2ac98b",onClick:Re},{icon:m((()=>[u(r(k),{size:"30",component:r(M)},null,8,["component"])])),_:1}),le])]))],64))]))}});export{ie as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as a,computed as
|
1
|
+
import{defineComponent as t,ref as e,reactive as a,computed as l,openBlock as n,createBlock as o,unref as r,withCtx as s,renderSlot as i,createElementBlock as c,Fragment as u,withDirectives as d,createElementVNode as p,createVNode as v,createCommentVNode as m,toDisplayString as f,createTextVNode as g,renderList as y,vShow as k}from"vue";import{NPopover as h,NAvatar as b,NButton as w,NIcon as C}from"naive-ui";import{ChatbubbleEllipses as I,EyeOffOutline as _,EyeOutline as j,Close as x}from"@vicons/ionicons5";import{useState as z}from"../hooks/useState.js";import{useSession as N}from"../hooks/useSession.js";import{CHAT_TYPE as S}from"../constants/index.js";import"trtc-sdk-v5";import"../utils/index.js";import{openSessionApi as $,getUserDetailApi as D}from"../api/index.js";const E={class:"person-profile-main"},L={class:"left"},P={class:"profile"},q={class:"profile__text"},B={class:"right"},G={class:"right__content"},O={class:"label"},T={class:"content"};var U=t({__name:"PersonProfile",props:{userId:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:U}){const A=t,{state:F}=z(),{openSession:H}=N(F),J=e(!1),K=e(!1),M=e(!1),Q=a({}),R=[{label:"机构",value:"",key:"orgName"},{label:"姓名",value:"",key:"name"},{label:"归属科室",value:"",key:"deptName"},{label:"业务科室",value:"",key:"businessDeptNames"},{label:"手机号",value:"",key:"phone"},{label:"岗位",value:"",key:"post"},{label:"工号",value:"",key:"jobId"},{label:"性别",value:"",key:"orgName"}],V=l((()=>(Q.id&&R.forEach((t=>{const{key:e}=t;t.value=Q[e]})),R)));async function W(){J.value=!1;let t=F.sessionList.find((t=>t.receiver===A.userId));if(!t)try{t=await $({chatType:S.SINGLE,receiver:A.userId,sender:F.userInfo.id})}catch(t){console.log("error :>> ",t)}t&&H(t),U("close")}async function X(t){if(!t)return;const e=await D({userId:A.userId});(null==e?void 0:e.id)?Object.assign(Q,e):Q.id=""}function Y(t){const{key:e,value:a}=t;return"phone"!==e||M.value?a:(a||"").replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}return(e,a)=>(n(),o(r(h),{raw:"",class:"person-profile-wrapper",show:J.value,"onUpdate:show":[a[3]||(a[3]=t=>J.value=t),X],trigger:t.disabled?"manual":"click","show-arrow":!1,to:"body",shift:""},{trigger:s((()=>[i(e.$slots,"trigger")])),default:s((()=>[Q.id?(n(),c(u,{key:0},[d(p("div",E,[p("div",L,[p("div",P,[v(r(b),{src:Q.avatar,bordered:"",round:"",size:100,onClickCapture:a[0]||(a[0]=t=>K.value=!0)},null,8,["src"]),m(' <n-upload abstract accept="image/*" @change="onChange">\r\n\t\t\t\t\t\t\t<n-upload-trigger #="{ handleClick }" abstract>\r\n\t\t\t\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t\t\t\tcircle\r\n\t\t\t\t\t\t\t\t\tsecondary\r\n\t\t\t\t\t\t\t\t\tclass="edit-avatar"\r\n\t\t\t\t\t\t\t\t\tv-show="userDetail.id === state.userInfo.id"\r\n\t\t\t\t\t\t\t\t\t@click="handleClick"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t<n-icon size="16" color="#666666" :component="Camera" />\r\n\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t</n-button>\r\n\t\t\t\t\t\t\t</n-upload-trigger>\r\n\t\t\t\t\t\t</n-upload> '),p("div",q,[p("h4",null,f(Q.name),1),p("p",null,f(Q.orgName),1)]),v(r(w),{strong:"",secondary:"",onClick:W},{default:s((()=>[v(r(C),{size:"13",color:"#666666",component:r(I),style:{"margin-right":"6px"}},null,8,["component"]),g(" 发消息 ")])),_:1})])]),p("div",B,[p("div",G,[(n(!0),c(u,null,y(r(V),((t,e)=>(n(),c("div",{class:"info-item",key:e},[p("span",O,f(t.label),1),p("div",T,[p("span",null,f(Y(t)),1),"phone"===t.key&&Y(t)?(n(),o(r(C),{key:0,size:"16",color:"#666666",component:M.value?r(_):r(j),style:{"margin-left":"10px"},onClick:a[1]||(a[1]=t=>M.value=!M.value)},null,8,["component"])):m("v-if",!0)])])))),128))])])],512),[[k,!K.value]]),d(p("div",{class:"large-avatar",onClick:a[2]||(a[2]=t=>K.value=!1)},[v(r(w),{circle:"",size:"small",secondary:""},{icon:s((()=>[v(r(C),{size:24,component:r(x),color:"#fff"},null,8,["component"])])),_:1}),v(r(b),{size:310,round:"",src:Q.avatar},null,8,["src"])],512),[[k,K.value]])],64)):m("v-if",!0)])),_:3},8,["show","trigger"]))}});export{U as default};
|
@@ -4,6 +4,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
4
4
|
filterKey: {
|
5
5
|
all: string;
|
6
6
|
unread: string;
|
7
|
+
ended: string;
|
7
8
|
};
|
8
9
|
unreadSessionKeys: string[];
|
9
10
|
flexWidth: import("vue").Ref<number>;
|
@@ -19,6 +20,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
19
20
|
openSession: (item: AnyObject) => Promise<void>;
|
20
21
|
currentWidth: import("vue").ComputedRef<number>;
|
21
22
|
sessionList: import("vue").ComputedRef<AnyObject[]>;
|
23
|
+
getLabelNum: (session: AnyObject) => number;
|
22
24
|
changeWidth: ({ distance }: AnyObject) => void;
|
23
25
|
handleFilter: (key: string) => void;
|
24
26
|
showSession: (item: AnyObject, currentKey?: string) => boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as s,computed as l,withDirectives as
|
1
|
+
import{defineComponent as e,ref as s,computed as l,withDirectives as t,openBlock as i,createElementBlock as a,normalizeStyle as n,unref as r,createBlock as o,createCommentVNode as u,createElementVNode as d,Fragment as v,renderList as m,withCtx as c,createTextVNode as p,toDisplayString as k,normalizeClass as f,createVNode as y,vShow as _}from"vue";import{NSpin as h,NTag as g,NAvatar as x,NBadge as b}from"naive-ui";import{useState as M}from"../hooks/useState.js";import{useSession as N}from"../hooks/useSession.js";import{STATUS as S}from"../constants/index.js";import"trtc-sdk-v5";import{listSort as T,formatTime as j}from"../utils/index.js";import{vFlexibleResize as C}from"../../../../shared/directive/flexibleResize.js";const D={class:"sider-list__filter box-shadow"},E=["onClick"],L={class:"avatar-right"},R={class:"name"},w={class:"msg-tip"},H={class:"msg-tip__content"},z={key:0},K=["innerHTML"];var W=e({__name:"SiderList",setup(e){const W="all",A="unread",B="ended";let I=[];const V=s(300),q=s(),F=s(!1),G=s([{label:"全部",key:W},{label:"未读",key:A},{label:"结束",key:B}]),J=s("all"),{state:O,unreadTotal:P}=M(),{openSession:Q}=N(O),U=l((()=>Math.min(Math.max(V.value,240),360))),X=l((()=>T(O.sessionList)));function Y({distance:e}){V.value=V.value+e}function Z(e,s=r(J)){var l;return s===W||(s===A?I.includes(e.sessionKey)||(null!=(l=e.unreadNum)?l:0)>0:s===B?e.status===S.ENDED:void 0)}return(e,s)=>t((i(),a("section",{class:"sider-list",style:n({width:r(U)+"px"})},[F.value?(i(),o(r(h),{key:0,stroke:"#5585f5"})):u("v-if",!0),u(' <n-input v-else placeholder="输入用户名模糊搜索" v-model:value="keyword" @keyup.enter="handleSearch"></n-input> '),d("div",D,[(i(!0),a(v,null,m(G.value,(e=>(i(),o(r(g),{type:J.value===e.key?"info":"default",round:"",bordered:!1,key:e.key,onClick:()=>{return s=e.key,J.value=s,void(s===A&&(I=(X.value.filter((e=>{var s;return(null!=(s=e.unreadNum)?s:0)>0}))||[]).map((e=>e.sessionKey))));var s}},{default:c((()=>{return[p(k(e.label)+"("+k((s=e,s.key===B?X.value.filter((e=>e.status===S.ENDED)).length:P.value))+") ",1)];var s})),_:2},1032,["type","onClick"])))),128))]),d("div",{class:"sider-list__box",ref_key:"listBoxRef",ref:q},[(i(!0),a(v,null,m(r(X),(e=>t((i(),a("div",{key:e.id,onClick:()=>r(Q)(e),class:f(["sider-list__box__item",{active:e.id===r(O).id},e.topping?"sider-list__box__item--top":""])},[y(r(x),{round:"",size:"large",src:e.avatar},null,8,["src"]),d("div",L,[d("div",R,[d("h4",null,k(e.name),1),d("span",null,k(e.lastMessage?r(j)(e.lastMessageSendTime).siderMsgTime:""),1)]),d("div",w,[d("div",H,["WITHDRAWN"===e.lastMessageStatus?(i(),a("div",z,"撤回了一条消息")):(i(),a("div",{key:1,innerHTML:e.lastMessageContent},null,8,K))]),y(r(b),{value:e.unreadNum>99?"99+":e.unreadNum},null,8,["value"])])])],10,E)),[[_,Z(e)]]))),128))],512)],4)),[[r(C),{mode:"VR",onMove:Y}]])}});export{W as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as o,computed as n,watch as t,onBeforeUnmount as s,openBlock as r,createElementBlock as a,withDirectives as l,createElementVNode as i,vShow as c,createVNode as u,unref as d,toDisplayString as v,Fragment as m,normalizeClass as p,withCtx as f}from"vue";import{NAvatar as g,NButton as I,NIcon as h}from"naive-ui";import{Mic as A,MicOffCircle as y,Call as E}from"@vicons/ionicons5";import"lodash-es";import"
|
1
|
+
import{defineComponent as e,ref as o,computed as n,watch as t,onBeforeUnmount as s,openBlock as r,createElementBlock as a,withDirectives as l,createElementVNode as i,vShow as c,createVNode as u,unref as d,toDisplayString as v,Fragment as m,normalizeClass as p,withCtx as f}from"vue";import{NAvatar as g,NButton as I,NIcon as h}from"naive-ui";import{Mic as A,MicOffCircle as y,Call as E}from"@vicons/ionicons5";import"lodash-es";import"../utils/index.js";import{AV_STATUS as V,CHAT_TYPE as R}from"../constants/index.js";import"@vueuse/core";import{avFinishApi as w}from"../api/index.js";import{useVideo as k}from"../hooks/useVideo.js";import S from"trtc-sdk-v5";const M={class:"video-wrapper"},b={class:"user"},T={class:"name"},x={class:"tip"},C={class:"opt-btn"},_={class:"btn"},N=i("span",null,"静音",-1),L=i("span",null,"拒接",-1),D={class:"btn"},H=i("span",null,"挂断",-1),z=i("span",null,"接听",-1);var j=e({__name:"Video",setup(e){const{sendMessage:j,state:U,trtc:F,timing:O,voiceOpen:G,isAudio:J,isCall:P,startTimer:$,resetTimer:q,toggleAudio:B,messageTypeText:K,time:Q,installEventHandlers:W,uninstallEventHandlers:X}=k(),Y=o(),Z=o(),ee=o(!1);let oe=null;const ne=n((()=>{var e,o,n;return P.value?{avatar:U.currentSessionItem.avatar,name:U.currentSessionItem.name,userId:U.currentSessionItem.receiver}:{avatar:null==(e=U.currentAVMsg.currentMsg)?void 0:e.senderAvatar,name:null==(o=U.currentAVMsg.currentMsg)?void 0:o.senderName,userId:null==(n=U.currentAVMsg.currentMsg)?void 0:n.sender}})),te=n((()=>ee.value?J.value?O.value:"":P.value?"正在呼叫...":`邀请你${K.value}问诊...`)),se=n((()=>{var e,o;return null==(o=null==(e=U.currentAVMsg.currentMsg)?void 0:e.content)?void 0:o.avStatus}));async function re(e=V.FINISHED){j({chatType:R.SINGLE,content:{msg:e===V.FINISHED?""+Q.seconds:"s",chatMessageType:U.currentAVMsg.chatMessageType,avStatus:e},receiver:ne.value.userId}),await w({recordId:U.currentAVMsg.currentMsg.id,status:e,duration:e===V.FINISHED?Q.seconds:0})}async function ae(){const e=await S.isSupported();if(!e.result||!e.detail.isH264EncodeSupported||!e.detail.isH264DecodeSupported)return console.log("checkResult :>> ",e),void(U.showVideo=!1);try{if(await F.enterRoom({strRoomId:U.currentAVMsg.strRoomId,sdkAppId:parseInt(U.userInfo.sdkAppID),userId:U.userInfo.id,userSig:U.userInfo.userSig}),P.value||(ee.value=!0,$()),W({handleError:me,handleRemoteUserEnter:de,handleRemoteAudioAvailable:ue,handleRemoteUserExit:ve,handleRemoteVideoAvailable:ce}),await F.startLocalAudio(),J.value)return;await F.startLocalVideo({view:Z.value})}catch(e){console.log("error :>> ",e),U.showVideo=!1}}function le(){P.value&&!ee.value?re(V.CANCELED):re()}async function ie(){try{if(U.showVideo=!1,X({handleError:me,handleRemoteUserEnter:de,handleRemoteAudioAvailable:ue,handleRemoteUserExit:ve,handleRemoteVideoAvailable:ce}),await F.exitRoom(),await F.stopLocalAudio(),J.value)return;await F.stopLocalVideo()}catch(e){console.log("error :>> ",e)}}async function ce(e){const{userId:o,streamType:n}=e;try{await F.startRemoteVideo({userId:o,streamType:n,view:Y.value})}catch(e){console.log("error :>> ",e)}}function ue(e){}function de(){ee.value=!0,$()}function ve(e){console.log("event :>> 对方已挂断",e),ie()}function me(e){console.log("error :>> ",e),U.showVideo=!1}return t((()=>se.value),(e=>{U.showVideo&&(e===V.IN_CALL?async function(){P.value?ae():(oe&&clearTimeout(oe),oe=setTimeout((async()=>{ee.value||re(V.NO_RESPONSE)}),6e4))}():ie())}),{immediate:!0}),s((()=>{ie()})),(e,o)=>(r(),a("div",M,[l(i("div",{class:"video-box",ref_key:"videoRef",ref:Y},null,512),[[c,ee.value]]),l(i("div",{class:"video-box--self",ref_key:"selfVideoRef",ref:Z},null,512),[[c,ee.value]]),l(i("div",b,[u(d(g),{size:58,round:"",src:d(ne).avatar},null,8,["src"]),i("span",T,v(d(ne).name),1),i("span",x,v(d(te)),1)],512),[[c,d(J)||!ee.value]]),i("div",C,[i("div",_,[d(P)&&!ee.value||ee.value?(r(),a(m,{key:0},[u(d(I),{circle:"",onClick:d(B),class:p({bordered:d(G)})},{icon:f((()=>[u(d(h),{size:"30",color:d(G)?"#fff":"#626262",component:d(G)?d(A):d(y)},null,8,["color","component"])])),_:1},8,["onClick","class"]),N],64)):(r(),a(m,{key:1},[u(d(I),{circle:"",color:"#f17568",class:"btn--rotate",onClick:o[0]||(o[0]=()=>re(d(V).REJECTED))},{icon:f((()=>[u(d(h),{size:"30",component:d(E)},null,8,["component"])])),_:1}),L],64))]),i("div",D,[d(P)&&!ee.value||ee.value?(r(),a(m,{key:0},[u(d(I),{circle:"",color:"#f17568",class:"btn--rotate",onClick:le},{icon:f((()=>[u(d(h),{size:"30",component:d(E)},null,8,["component"])])),_:1}),H],64)):(r(),a(m,{key:1},[u(d(I),{circle:"",color:"#2ac98b",onClick:ae},{icon:f((()=>[u(d(h),{size:"30",component:d(E)},null,8,["component"])])),_:1}),z],64))])])]))}});export{j as default};
|