cnhis-design-vue 3.2.9-beta.0 → 3.2.9-beta.12
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/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/types/index.d.ts +8 -7
- package/es/components/base-search/index.d.ts +6 -2
- package/es/components/base-search/src/index.vue.d.ts +6 -2
- package/es/components/button-print/index.d.ts +7 -45
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -45
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +6 -35
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +1 -5
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +4 -3
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +3 -1
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +2 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +2 -0
- package/es/components/classification/src/index.vue.d.ts +3 -1
- package/es/components/expand-field/index.d.ts +1 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +1 -1
- package/es/components/expand-field/src/index.vue.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +14 -0
- package/es/components/field-set/src/FieldFilter.vue.d.ts +14 -0
- package/es/components/field-set/src/FieldSet.vue.d.ts +42 -19
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +14 -0
- package/es/components/field-set/src/components/table-row.vue2.js +1 -1
- package/es/components/iho-chat/index.d.ts +4 -0
- package/es/components/iho-chat/src/Index.vue.d.ts +4 -0
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +2 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -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/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +2 -1
- 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/useState.js +1 -1
- package/es/components/iho-chat/src/types/index.d.ts +1 -0
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.d.ts +2 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +3 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/quick-search/index.d.ts +6 -2
- package/es/components/quick-search/src/index.vue.d.ts +6 -2
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.d.ts +51 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +49 -1
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +65 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +6 -2
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -235,6 +235,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
235
235
|
type: PropType<AnyObject[]>;
|
236
236
|
default: () => never[];
|
237
237
|
};
|
238
|
+
primaryKey: {
|
239
|
+
type: StringConstructor;
|
240
|
+
default: string;
|
241
|
+
};
|
238
242
|
}, {
|
239
243
|
fixedWayOptions: {
|
240
244
|
label: string;
|
@@ -333,6 +337,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
333
337
|
type: PropType<AnyObject[]>;
|
334
338
|
default: () => never[];
|
335
339
|
};
|
340
|
+
primaryKey: {
|
341
|
+
type: StringConstructor;
|
342
|
+
default: string;
|
343
|
+
};
|
336
344
|
}>> & {
|
337
345
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
338
346
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -350,6 +358,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
350
358
|
label: string;
|
351
359
|
value: number;
|
352
360
|
}[];
|
361
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
353
362
|
selectProps: (field: string) => {
|
354
363
|
valueField: string;
|
355
364
|
labelField: string;
|
@@ -458,6 +467,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
458
467
|
type: PropType<AnyObject[]>;
|
459
468
|
default: () => never[];
|
460
469
|
};
|
470
|
+
primaryKey: {
|
471
|
+
type: StringConstructor;
|
472
|
+
default: string;
|
473
|
+
};
|
461
474
|
}>> & {
|
462
475
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
463
476
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -480,6 +493,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
480
493
|
requiredDisable: boolean;
|
481
494
|
hide: boolean;
|
482
495
|
}>[];
|
496
|
+
primaryKey: string;
|
483
497
|
index: number;
|
484
498
|
columns: FieldSetColumnItem[];
|
485
499
|
element: Partial<{
|
@@ -257,6 +257,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
257
257
|
type: PropType<AnyObject[]>;
|
258
258
|
default: () => never[];
|
259
259
|
};
|
260
|
+
primaryKey: {
|
261
|
+
type: StringConstructor;
|
262
|
+
default: string;
|
263
|
+
};
|
260
264
|
}, {
|
261
265
|
fixedWayOptions: {
|
262
266
|
label: string;
|
@@ -355,6 +359,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
355
359
|
type: PropType<AnyObject[]>;
|
356
360
|
default: () => never[];
|
357
361
|
};
|
362
|
+
primaryKey: {
|
363
|
+
type: StringConstructor;
|
364
|
+
default: string;
|
365
|
+
};
|
358
366
|
}>> & {
|
359
367
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
360
368
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -372,6 +380,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
372
380
|
label: string;
|
373
381
|
value: number;
|
374
382
|
}[];
|
383
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
375
384
|
selectProps: (field: string) => {
|
376
385
|
valueField: string;
|
377
386
|
labelField: string;
|
@@ -480,6 +489,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
480
489
|
type: PropType<AnyObject[]>;
|
481
490
|
default: () => never[];
|
482
491
|
};
|
492
|
+
primaryKey: {
|
493
|
+
type: StringConstructor;
|
494
|
+
default: string;
|
495
|
+
};
|
483
496
|
}>> & {
|
484
497
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
485
498
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -502,6 +515,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
502
515
|
requiredDisable: boolean;
|
503
516
|
hide: boolean;
|
504
517
|
}>[];
|
518
|
+
primaryKey: string;
|
505
519
|
index: number;
|
506
520
|
columns: FieldSetColumnItem[];
|
507
521
|
element: Partial<{
|
@@ -79,12 +79,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
79
|
columnWidthProps: {
|
80
80
|
type: ObjectConstructor;
|
81
81
|
};
|
82
|
-
|
83
|
-
type:
|
82
|
+
hideExpressionConfig: {
|
83
|
+
type: PropType<{
|
84
|
+
show: boolean;
|
85
|
+
option: AnyObject[];
|
86
|
+
}>;
|
84
87
|
};
|
85
|
-
|
86
|
-
type:
|
87
|
-
default:
|
88
|
+
primaryKey: {
|
89
|
+
type: StringConstructor;
|
90
|
+
default: string;
|
88
91
|
};
|
89
92
|
}, {
|
90
93
|
fieldsMapping: Record<string, string>;
|
@@ -168,12 +171,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
168
171
|
columnWidthProps: {
|
169
172
|
type: ObjectConstructor;
|
170
173
|
};
|
171
|
-
|
172
|
-
type:
|
174
|
+
hideExpressionConfig: {
|
175
|
+
type: PropType<{
|
176
|
+
show: boolean;
|
177
|
+
option: AnyObject[];
|
178
|
+
}>;
|
173
179
|
};
|
174
|
-
|
175
|
-
type:
|
176
|
-
default:
|
180
|
+
primaryKey: {
|
181
|
+
type: StringConstructor;
|
182
|
+
default: string;
|
177
183
|
};
|
178
184
|
}>> & {
|
179
185
|
onSave?: ((...args: any[]) => any) | undefined;
|
@@ -225,7 +231,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
225
231
|
fieldDescribeMode: "column" | "tooltip";
|
226
232
|
developMode: boolean;
|
227
233
|
columnWidthProps: Record<string, any> | undefined;
|
228
|
-
hideExpressionOption: AnyObject[];
|
234
|
+
hideExpressionOption: AnyObject[] | never[];
|
235
|
+
primaryKey: string;
|
229
236
|
};
|
230
237
|
searchData: {
|
231
238
|
keyword: string;
|
@@ -412,6 +419,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
412
419
|
type: PropType<AnyObject[]>;
|
413
420
|
default: () => never[];
|
414
421
|
};
|
422
|
+
primaryKey: {
|
423
|
+
type: StringConstructor;
|
424
|
+
default: string;
|
425
|
+
};
|
415
426
|
}, {
|
416
427
|
fixedWayOptions: {
|
417
428
|
label: string;
|
@@ -510,6 +521,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
510
521
|
type: PropType<AnyObject[]>;
|
511
522
|
default: () => never[];
|
512
523
|
};
|
524
|
+
primaryKey: {
|
525
|
+
type: StringConstructor;
|
526
|
+
default: string;
|
527
|
+
};
|
513
528
|
}>> & {
|
514
529
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
515
530
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -527,6 +542,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
527
542
|
label: string;
|
528
543
|
value: number;
|
529
544
|
}[];
|
545
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
530
546
|
selectProps: (field: string) => {
|
531
547
|
valueField: string;
|
532
548
|
labelField: string;
|
@@ -635,6 +651,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
635
651
|
type: PropType<AnyObject[]>;
|
636
652
|
default: () => never[];
|
637
653
|
};
|
654
|
+
primaryKey: {
|
655
|
+
type: StringConstructor;
|
656
|
+
default: string;
|
657
|
+
};
|
638
658
|
}>> & {
|
639
659
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
640
660
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -657,6 +677,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
657
677
|
requiredDisable: boolean;
|
658
678
|
hide: boolean;
|
659
679
|
}>[];
|
680
|
+
primaryKey: string;
|
660
681
|
index: number;
|
661
682
|
columns: FieldSetColumnItem[];
|
662
683
|
element: Partial<{
|
@@ -770,18 +791,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
770
791
|
columnWidthProps: {
|
771
792
|
type: ObjectConstructor;
|
772
793
|
};
|
773
|
-
|
774
|
-
type:
|
794
|
+
hideExpressionConfig: {
|
795
|
+
type: PropType<{
|
796
|
+
show: boolean;
|
797
|
+
option: AnyObject[];
|
798
|
+
}>;
|
775
799
|
};
|
776
|
-
|
777
|
-
type:
|
778
|
-
default:
|
800
|
+
primaryKey: {
|
801
|
+
type: StringConstructor;
|
802
|
+
default: string;
|
779
803
|
};
|
780
804
|
}>> & {
|
781
805
|
onSave?: ((...args: any[]) => any) | undefined;
|
782
806
|
onClose?: ((...args: any[]) => any) | undefined;
|
783
807
|
onReset?: ((...args: any[]) => any) | undefined;
|
784
808
|
}, {
|
809
|
+
primaryKey: string;
|
785
810
|
type: string;
|
786
811
|
isEdit: boolean;
|
787
812
|
fields: Partial<{
|
@@ -807,11 +832,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
807
832
|
developMode: boolean;
|
808
833
|
footerFlag: boolean;
|
809
834
|
fieldDescribeMode: "column" | "tooltip";
|
810
|
-
hideExpressionOption: AnyObject[];
|
811
|
-
showSearch: boolean;
|
812
835
|
customColumns: FieldSetColumnItem[];
|
836
|
+
showSearch: boolean;
|
813
837
|
showSortPriority: boolean;
|
814
838
|
showHeadFilter: boolean;
|
815
|
-
showHideExpression: boolean;
|
816
839
|
}>;
|
817
840
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,useAttrs as l,ref as t,computed as i,reactive as o,
|
1
|
+
import{defineComponent as e,useAttrs as l,ref as t,computed as i,reactive as o,toRef as d,watch as a,openBlock as r,createElementBlock as s,createBlock as n,unref as u,withKeys as c,withModifiers as f,createCommentVNode as p,createElementVNode as h,Fragment as m,renderList as y,normalizeStyle as v,withCtx as b,createTextVNode as g,toDisplayString as x,createVNode as k,normalizeClass as w,mergeProps as S,renderSlot as A}from"vue";import{NInput as _,NCheckbox as C,NTooltip as W,NIcon as E,NPopconfirm as D,NButton as F}from"naive-ui";import M from"../../../shared/components/VueDraggable/src/vuedraggable.js";import P from"./components/table-row.vue.js";import{isArray as j,cloneDeep as B,isString as H,omit as N}from"lodash-es";import{isDisable as V,setStyle as O,isDraggableItem as R,isDraggable as q,getGroupTree as I}from"./utils/index.js";import{uuidGenerator as K}from"../../../shared/utils/index.js";import{HelpCircleSharp as U}from"@vicons/ionicons5";const T={class:"main-wrapper"},G={class:"main-wrapper__table-header"},L=h("span",null,"数值越小,优先级越高",-1),$=["tabindex"],z={key:1,class:"main-wrapper__table-footer"};var J=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1},showSortPriority:{type:Boolean,default:!1},showHeadFilter:{type:Boolean,default:!1},fieldShowMaxValue:{type:Number},rowDraggable:{type:Boolean,default:!0},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},hideExpressionConfig:{type:Object},primaryKey:{type:String,default:"id"}},emits:["save","close","reset"],setup(e,{expose:J,emit:Q}){const X=e,Y={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"};l();const Z=t(Date.now()),ee=t(""),le=t(),te=t([]),ie=[{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!!X.fieldShowMaxValue,field:"show",fieldShowMaxValue:X.fieldShowMaxValue},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"排序优先级",type:"select",field:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"},{title:"表头筛选",type:"checkbox",isHeadCheckHide:!0,field:"isShowHeaderFilter"},{title:"脱敏配置",type:"select",field:"hideExpression"}],oe=t([]),de=i((()=>te.value.flat())),ae=i((()=>de.value.some((e=>e.feildDescribe)))),re=o({columns:oe,data:de,onUpdateChecked:function({checked:e,column:l}){const t=!e||ye(l.field);l.checkedAll=!t},draggable:X.rowDraggable,isFieldSet:!0,fieldDescribeMode:X.fieldDescribeMode,developMode:X.developMode,columnWidthProps:X.columnWidthProps,hideExpressionOption:d(X.hideExpressionConfig||{option:[]},"option"),primaryKey:d(X,"primaryKey")}),se={keyword:ee.value,idx:0,startIdx:0},ne=()=>{Q("save")},ue=()=>{Q("close")};function ce(){te.value=fe(),me(),Z.value=Date.now(),Q("reset")}function fe(){const e=B(X.fields).map((e=>({...e,uuid:K()})));return Object.keys(Y).forEach((l=>{e.forEach((e=>{"old"==X.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[Y[l]]=1==e[l]:e[Y[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1),e.draggable=!!q(e)}))})),function(e){if(X.groupSetting){return I(X.groupSetting,e).reduce(((t,i)=>{const o=H(i)?e.find((e=>e.name===i)):l(i.children);return o&&t.push(o),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}function pe(){const e=se.keyword!==ee.value;let l=ee.value?de.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(ee.value))return!!e||t>se.idx})):0;-1!==l||e||(l=se.startIdx),le.value.scrollTop=52*l,Object.assign(se,{keyword:ee.value,idx:l},e?{startIdx:l}:{})}function he(e){var l;return!!ee.value&&(null==(l=e.title)?void 0:l.includes(ee.value))}function me(){var e,l;oe.value=B(ie),(null==(e=X.showColumnNames)?void 0:e.length)&&(oe.value=ie.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=X.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=X.customColumns)?void 0:l.length)&&oe.value.push(...X.customColumns),"column"===X.fieldDescribeMode&&ae.value&&oe.value.push({title:"字段描述",type:"text",field:"feildDescribe"}),X.showSeq&&oe.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),oe.value.forEach((e=>{if(e.isShow=function(e){var l;return!(["editable","required"].includes(e.field)&&!X.isEdit||"sortPriority"===e.field&&!X.showSortPriority||"isShowHeaderFilter"===e.field&&!X.showHeadFilter||"hideExpression"===e.field&&!(null==(l=X.hideExpressionConfig)?void 0:l.show))}(e),"checkbox"===e.type){const l=te.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ye(e.field)&&!l}}))}function ye(e){return te.value.flat().some((l=>!V(l,e)&&!l[e]&&"0001"!=l.id))}function ve(e){return!!R(e.relatedContext.element)}return a([()=>X.fields,()=>{var e;return null==(e=X.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(te.value=fe(),me())}),{immediate:!0,deep:!0}),J({getTableFields:function(){let e=[];return e="old"==X.type?de.value.map(((e,l)=>N({...e,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth},["name","show","sort","alias","fixedWay","columnWidth"]))):de.value,e.map((e=>N(e,["uuid"])))}}),(l,t)=>(r(),s("div",T,[e.showSearch?(r(),n(u(_),{key:0,class:"main-wrapper__search-wrapper",value:ee.value,"onUpdate:value":t[0]||(t[0]=e=>ee.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:c(f(pe,["prevent"]),["enter"])},null,8,["value","onKeydown"])):p("v-if",!0),h("div",G,[(r(!0),s(m,null,y(oe.value,((l,t)=>(r(),s(m,{key:t},[l.isShow?(r(),s("span",{key:0,class:"table-cell",style:v(u(O)(l,t,e.columnWidthProps))},["checkbox"!==l.type||l.isHeadCheckHide?(r(),s(m,{key:1},[g(x(l.title),1)],64)):(r(),n(u(C),{key:0,checked:l.checkedAll,"onUpdate:checked":[e=>l.checkedAll=e,e=>{return t=e,i=l.field,void de.value.forEach((e=>{V(e,i)||(e[i]=t)}));var t,i}],disabled:l.disabledAll},{default:b((()=>[g(x(l.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===l.field?(r(),n(u(W),{key:2,trigger:"hover"},{trigger:b((()=>[k(u(E),{component:u(U),style:{top:"2px"}},null,8,["component"])])),default:b((()=>[L])),_:1})):p("v-if",!0)],4)):p("v-if",!0)],64)))),128))]),h("div",{class:"main-wrapper__table-body",ref_key:"tableBodyRef",ref:le},[(r(),n(u(M),{modelValue:te.value,"onUpdate:modelValue":t[1]||(t[1]=e=>te.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:ve,disabled:!e.rowDraggable,key:Z.value},{item:b((({element:e,index:l})=>[e.hide?p("v-if",!0):(r(),s("div",{key:0,class:w(["item",u(R)(e)?"":"disabled"]),tabindex:l},[u(j)(e)?(r(!0),s(m,{key:0},y(e,((e,t)=>(r(),n(P,S(re,{key:t,element:e,idx:l+1,"is-highlight":he(e)}),null,16,["element","idx","is-highlight"])))),128)):(r(),n(P,S({key:1},re,{element:e,idx:l+1,"is-highlight":he(e)}),null,16,["element","idx","is-highlight"]))],10,$))])),_:1},8,["modelValue","disabled"]))],512),e.footerFlag?(r(),s("div",z,[p(" 底部按钮插槽 "),A(l.$slots,"footer",{},(()=>[k(u(D),{onPositiveClick:ce},{trigger:b((()=>[k(u(F),{style:{"margin-right":"8px"}},{default:b((()=>[g("恢复默认设置")])),_:1})])),default:b((()=>[g(" 确认要恢复系统默认设置吗? ")])),_:1}),k(u(F),{style:{"margin-right":"8px"},onClick:ue},{default:b((()=>[g("取消")])),_:1}),k(u(F),{type:"primary",onClick:ne},{default:b((()=>[g("保存")])),_:1})]))])):p("v-if",!0)]))}});export{J as default};
|
@@ -86,6 +86,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
86
86
|
type: PropType<AnyObject[]>;
|
87
87
|
default: () => never[];
|
88
88
|
};
|
89
|
+
primaryKey: {
|
90
|
+
type: StringConstructor;
|
91
|
+
default: string;
|
92
|
+
};
|
89
93
|
}, {
|
90
94
|
fixedWayOptions: {
|
91
95
|
label: string;
|
@@ -184,6 +188,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
184
188
|
type: PropType<AnyObject[]>;
|
185
189
|
default: () => never[];
|
186
190
|
};
|
191
|
+
primaryKey: {
|
192
|
+
type: StringConstructor;
|
193
|
+
default: string;
|
194
|
+
};
|
187
195
|
}>> & {
|
188
196
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
189
197
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -201,6 +209,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
201
209
|
label: string;
|
202
210
|
value: number;
|
203
211
|
}[];
|
212
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
204
213
|
selectProps: (field: string) => {
|
205
214
|
valueField: string;
|
206
215
|
labelField: string;
|
@@ -309,6 +318,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
309
318
|
type: PropType<AnyObject[]>;
|
310
319
|
default: () => never[];
|
311
320
|
};
|
321
|
+
primaryKey: {
|
322
|
+
type: StringConstructor;
|
323
|
+
default: string;
|
324
|
+
};
|
312
325
|
}>> & {
|
313
326
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
314
327
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -331,6 +344,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
331
344
|
requiredDisable: boolean;
|
332
345
|
hide: boolean;
|
333
346
|
}>[];
|
347
|
+
primaryKey: string;
|
334
348
|
index: number;
|
335
349
|
columns: FieldSetColumnItem[];
|
336
350
|
element: Partial<{
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as
|
1
|
+
import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as r,unref as a,createBlock as o,withCtx as d,createVNode as u,createCommentVNode as s,createElementVNode as c,toDisplayString as f,normalizeClass as p,withDirectives as m,vShow as v,mergeProps as y,resolveDynamicComponent as b,createTextVNode as h}from"vue";import{NTooltip as g,NIcon as k,NCheckbox as x,NSelect as E,NColorPicker as S,NInput as D,NInputNumber as T,NPopconfirm as O}from"naive-ui";import{setStyle as w,setColorInfo as N,isShowExplicitRequired as j,isDisable as C}from"../utils/index.js";import{ReorderTwoOutline as M,HelpCircleOutline as U,CreateOutline as F,TrashOutline as P}from"@vicons/ionicons5";import{isFunction as _,isArray as A,range as I}from"lodash-es";import{COLOR_MAP as R}from"../constants/index.js";import{WIDGET_TYPE as H,SELECT_MAP as L,WIDGET_MAP as V,SELECT_TYPE as B,SELECT_DEFAULT_MAP as W,DATE_MAP as q,DATETIME_MAP as K}from"../constants/filter.js";const $={class:"row"},G=["title"],z=c("span",null,"拖拽调整顺序",-1),J={key:0};var Q=e({__name:"table-row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},data:{type:Array,default:()=>[]},isHighlight:{type:Boolean},index:{type:Number,default:0},isHighlightRow:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},isFieldSet:{type:Boolean,default:!1},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},hideExpressionOption:{type:Array,default:()=>[]},primaryKey:{type:String,default:"id"}},emits:["updateChecked","edit"],setup(e,{emit:Q}){const X=e,Y=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],Z=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],ee=[{label:"字体",value:"font"},{label:"背景",value:"background"}],le=Object.entries(R).map((([e])=>e));function te(){X.data.splice(X.index,1)}function ie(){Q("edit",X.element)}function ne(){var e;return X.element.feildDescribe||(null==(e=X.element.settingObj)?void 0:e.fieldDescDev)}function re(e){return"seq"===e?X.idx:"optionType"===e?X.element[e]&&X.element.type===H.SELECT?L[X.element[e]]:"":"type"===e?V[X.element[e]]:X.element[e]}function ae(e){if("defaultValue"===e){const{optionType:e}=X.element;return e===B.SELECT_MULTIPLE}return!1}function oe(e){if("0001"==X.element.id&&"fixedWay"!=e)return!1;const{isConfiguredHeaderFilter:l}=X.element;return"isShowHeaderFilter"===e?!!l:!(["explicitRequired","defaultValue"].includes(e)&&![H.DATE,H.DATETIME,H.SELECT].includes(X.element.type))}function de(e){return!["explicitRequired","defaultValue"].includes(e)||j(X.element)}function ue(e){if("hideExpression"===e)return"PASSWORD"===X.element.attrType?"密码无需设置":X.element.name===X.primaryKey||X.element.columnName===X.primaryKey?"主键不可设置":X.element[`${e}Disable`]||X.element[`${e}Disabled`]?"不支持脱敏设置":void 0}function se(e){const l={valueField:"value",labelField:"label"};return"hideExpression"===e&&(l.valueField="ruleId",l.labelField="name"),l}function ce(e){var l;switch(e.field){case"fixedWay":return Y;case"sortDirection":return Z;case"sortPriority":return function(){const e=I(1,X.data.length+1).map((e=>({label:e.toString(),value:e}))),l=X.data.filter((e=>!!e.sortPriority&&e.uuid!==X.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();case"colorScope":return ee;case"hideExpression":return null==(l=X.hideExpressionOption)?void 0:l.map((e=>({...e,ruleId:`ruleId#${e.code}`})));case"defaultValue":{const{type:e,optionInfo:l}=X.element;return e===H.SELECT?A(null==l?void 0:l.list)&&l.list.length>0?l.list.map((e=>({...e,label:e.name}))):Object.entries(W).map((([e,l])=>({value:e,label:l}))):e===H.DATE?Object.entries(q).map((([e,l])=>({value:e,label:l}))):e===H.DATETIME?Object.entries(K).map((([e,l])=>({value:e,label:l}))):[]}default:return[]}}function fe(e){var l;if(1==X.element.defaultMark||"color"===e.type&&X.isHighlightRow)return!0;if("checkbox"===e.type)return"show"===e.field&&e.fieldShowMaxValue?!X.element[e.field]&&(null==(l=X.data.filter((l=>l[e.field])))?void 0:l.length)===e.fieldShowMaxValue:C(X.element,e.field);if("sortPriority"!==e.field)return!1;const{sortDirection:t}=X.element;return!t||"NONE"===t}function pe(e){return["title","result"].includes(e.field)&&X.element.style||{}}return(j,C)=>(l(),t("div",$,[(l(!0),t(i,null,n(e.columns,((n,j)=>{return l(),t(i,{key:j},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:r(a(w)(n,j,e.columnWidthProps))},["text"===n.type?(l(),t(i,{key:0},[0===j?(l(),t(i,{key:0},[!e.isFieldSet||e.draggable&&e.isFieldSet?(l(),o(a(g),{key:0,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(M)},null,8,["component"])])),default:d((()=>[z])),_:1})):s("v-if",!0),(A=n.field,"title"===A&&("tooltip"===X.fieldDescribeMode&&X.element.feildDescribe||X.developMode&&(null==(I=X.element.settingObj)?void 0:I.fieldDescDev))?(l(),o(a(g),{key:1,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(U)},null,8,["component"])])),default:d((()=>[c("span",null,f(ne()),1)])),_:1})):s("v-if",!0))],64)):s("v-if",!0),c("span",{class:p([e.isHighlight&&"title"===n.field?"highlight":""]),style:r(pe(n))},f(re(n.field)),7)],64)):s("v-if",!0),"checkbox"===n.type&&oe(n.field)?m((l(),o(a(x),{key:1,disabled:fe(n),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){Q("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,de(n.field)]]):s("v-if",!0),"select"===n.type&&oe(n.field)?(l(),t(i,{key:2},[ue(n.field)?(l(),t("span",J,f(ue(n.field)),1)):m((l(),o(a(E),y({key:1},se(n.field),{clearable:"",multiple:ae(n.field),disabled:fe(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(X.element.sortPriority=null),"colorScope"===l.field&&N(X.element)}(e,n)],options:ce(n)}),null,16,["multiple","disabled","value","onUpdate:value","options"])),[[v,de(n.field)]])],64)):s("v-if",!0),"color"===n.type?(l(),o(a(S),{key:3,class:"c-field-set__color-picker",clearable:"",disabled:fe(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,C[0]||(C[0]=l=>a(N)(e.element))],"show-preview":"",modes:["hex"],swatches:a(le)},null,8,["disabled","value","onUpdate:value","swatches"])):s("v-if",!0),"input"===n.type?m((l(),o(a(D),{key:4,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[v,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===n.type?(l(),o(a(T),{key:5,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l},null,8,["value","onUpdate:value"])):s("v-if",!0),"custom"===n.type&&a(_)(n.contentRender)?(l(),o(b((()=>n.contentRender(n,e.element))),{key:6})):s("v-if",!0),"custom"===n.type&&"opt"===n.field&&1!=e.element.defaultMark?(l(),t(i,{key:7},[u(a(g),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(F),onClick:ie},null,8,["component"])])),default:d((()=>[h(" 编辑 ")])),_:1}),u(a(O),{onPositiveClick:te},{trigger:d((()=>[u(a(g),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(P)},null,8,["component"])])),default:d((()=>[h(" 删除 ")])),_:1})])),default:d((()=>[h(" 是否确认删除? ")])),_:1})],64)):s("v-if",!0)],12,G)):s("v-if",!0)],64);var A,I})),128))]))}});export{Q as default};
|
@@ -69,6 +69,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
69
69
|
updateSessionItem: import("../../shared/types").AnyObject;
|
70
70
|
isUpdateSession: boolean;
|
71
71
|
currentReferenceMsg: import("../../shared/types").AnyObject | null;
|
72
|
+
currentReEditMsg: import("../../shared/types").AnyObject | null;
|
72
73
|
showVideo: boolean;
|
73
74
|
currentAVMsg: import("../../shared/types").AnyObject;
|
74
75
|
currentGroupUser: import("../../shared/types").AnyObject[];
|
@@ -776,6 +777,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
776
777
|
handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
|
777
778
|
setMenuPosition: (event: MouseEvent) => Promise<void>;
|
778
779
|
showMessage: (item: import("../../shared/types").AnyObject) => boolean;
|
780
|
+
showReEdit: (item: import("../../shared/types").AnyObject) => boolean;
|
779
781
|
showReferenceMsg: (item: import("../../shared/types").AnyObject) => any;
|
780
782
|
showBlendMsg: (item: import("../../shared/types").AnyObject) => any;
|
781
783
|
showTemplateMsg: (item: import("../../shared/types").AnyObject, type: "template" | "system") => boolean | undefined;
|
@@ -785,6 +787,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
785
787
|
resetInfo: () => void;
|
786
788
|
setReferenceMsg: (msgItem: import("../../shared/types").AnyObject) => void;
|
787
789
|
handleSelect: (key: string, msgItem: import("../../shared/types").AnyObject) => void;
|
790
|
+
reEdit: (item: import("../../shared/types").AnyObject) => void;
|
788
791
|
NAvatar: any;
|
789
792
|
NImageGroup: any;
|
790
793
|
NImage: any;
|
@@ -1005,6 +1008,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1005
1008
|
fileChange: (options: import("./src/types").FileOptions, chatMessageType: import("./src/constants").MESSAGE_TYPE) => Promise<void>;
|
1006
1009
|
handleMsgSend: () => Promise<void>;
|
1007
1010
|
doSendMessage: (contentInfo: import("../../shared/types").AnyObject) => Promise<void>;
|
1011
|
+
clearInput: () => void;
|
1008
1012
|
NButton: any;
|
1009
1013
|
NPopover: any;
|
1010
1014
|
NTooltip: any;
|
@@ -74,6 +74,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
74
74
|
updateSessionItem: AnyObject;
|
75
75
|
isUpdateSession: boolean;
|
76
76
|
currentReferenceMsg: AnyObject | null;
|
77
|
+
currentReEditMsg: AnyObject | null;
|
77
78
|
showVideo: boolean;
|
78
79
|
currentAVMsg: AnyObject;
|
79
80
|
currentGroupUser: AnyObject[];
|
@@ -781,6 +782,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
781
782
|
handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
|
782
783
|
setMenuPosition: (event: MouseEvent) => Promise<void>;
|
783
784
|
showMessage: (item: AnyObject) => boolean;
|
785
|
+
showReEdit: (item: AnyObject) => boolean;
|
784
786
|
showReferenceMsg: (item: AnyObject) => any;
|
785
787
|
showBlendMsg: (item: AnyObject) => any;
|
786
788
|
showTemplateMsg: (item: AnyObject, type: "template" | "system") => boolean | undefined;
|
@@ -790,6 +792,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
790
792
|
resetInfo: () => void;
|
791
793
|
setReferenceMsg: (msgItem: AnyObject) => void;
|
792
794
|
handleSelect: (key: string, msgItem: AnyObject) => void;
|
795
|
+
reEdit: (item: AnyObject) => void;
|
793
796
|
NAvatar: any;
|
794
797
|
NImageGroup: any;
|
795
798
|
NImage: any;
|
@@ -1010,6 +1013,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1010
1013
|
fileChange: (options: import("./types").FileOptions, chatMessageType: import("./constants").MESSAGE_TYPE) => Promise<void>;
|
1011
1014
|
handleMsgSend: () => Promise<void>;
|
1012
1015
|
doSendMessage: (contentInfo: AnyObject) => Promise<void>;
|
1016
|
+
clearInput: () => void;
|
1013
1017
|
NButton: any;
|
1014
1018
|
NPopover: any;
|
1015
1019
|
NTooltip: any;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as s,reactive as o,provide as t,onBeforeUnmount as n,openBlock as r,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as d,withCtx as u,createBlock as l,Fragment as p,createElementVNode as m,renderSlot as h,createCommentVNode as f}from"vue";import{NConfigProvider as g,NSpin as y,NLayout as
|
1
|
+
import{defineComponent as e,ref as s,reactive as o,provide as t,onBeforeUnmount as n,openBlock as r,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as d,withCtx as u,createBlock as l,Fragment as p,createElementVNode as m,renderSlot as h,createCommentVNode as f}from"vue";import{NConfigProvider as g,NSpin as y,NLayout as S,NLayoutContent as v}from"naive-ui";import b from"./components/SiderList.vue.js";import M from"./components/ChatHeader.vue.js";import I from"./components/ChatMain.vue.js";import k from"./components/ChatFooter.vue.js";import T from"./components/ChatSearch.vue.js";import V from"./components/ChatAdd.vue.js";import j from"./components/Video.vue.js";import L from"./components/MultipleVideo.vue.js";import{ChatSock as A}from"./utils/chatSock.js";import{instanceAxios as N,readMessageApi as w}from"./api/index.js";import{useTheme as U}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{remove as _,isNumber as C}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{CHAT_TYPE as E,SUBSCRIBE_MESSAGE_TYPE as O,AV_STATUS as x}from"./constants/index.js";import{InjectionIChatState as R,InjectionIChatStompClient as G,InjectionIChatEmits as K}from"./types/index.js";import{isAudioOrVideoMessage as B}from"./utils/index.js";import{useSession as P}from"./hooks/useSession.js";import"trtc-sdk-v5";const J={key:0,class:"iho-chat__header"},$={class:"toolbar"};var q=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"},chatBox:{type:Boolean,default:!1},defaultSessionKey:{type:String}},emits:["template-click","unread-message-update"],setup(e,{expose:q,emit:F}){const H=e;N.defaults.baseURL=H.baseURL,N.defaults.headers.Authorization="bearer "+H.token;const z=U(),D=s(!1),W=s(),Y=o({orgId:H.orgId,currentSessionItem:{},id:"",userInfo:{id:H.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,currentReEditMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1});t(R,Y),t(G,W),t(K,F);const{openSession:Q,closeSession:X,getCurrentSession:Z,setSessionList:ee,setUpdateSessionItem:se,setCurrentSessionItem:oe}=P(Y),te=[];function ne(){const e={headers:{AccessToken:H.token,UserId:H.userId},heartbeatFn(){try{W.value.send("test")}catch(e){W.value.disconnect(),ne()}},connectCb(){console.log("连接成功"),W.value.subscribe("/user/topic/single",(({body:e})=>ie({body:e,chatType:E.SINGLE}))),W.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{authentication:o,currentUser:t,sessionVos:n}=s;if(Object.assign(Y.userInfo,t,o),!(null==n?void 0:n.length))return;ee(n),te.splice(0,te.length),te.push(...n.filter((e=>e.chatType===E.GROUP))),te.forEach((e=>{W.value.subscribe(`/topic/group/${e.receiver}`,(({body:e})=>ie({body:e,chatType:E.GROUP})))})),function(){const e=Y.sessionList.find((e=>e.sessionKey===H.defaultSessionKey));e&&Q(e)}()}catch(e){console.log(e)}}))},errorCb(e,s){console.log("断线了,正在重连...")}};W.value=new A("/fdp-chat/websocket",e)}async function re(e,s){if(Y.currentMsg=e,e.sessionKey===Y.currentSessionItem.sessionKey)return Y.isAppendMsg=!0,e.sender!==Y.userInfo.id&&await w({chatType:s,messageIdSet:[e.id],receiver:Y.userInfo.id,sender:e.sender}),void oe({lastMessageSendTime:e.sendTime,lastMessage:e.content,sortTime:e.sendTime,unreadNum:0,lastSenderName:e.senderName});const o={lastMessageSendTime:e.sendTime,sortTime:e.sendTime,lastMessage:e.content,sessionKey:e.sessionKey,lastSenderName:e.senderName};se(o)}async function ie({body:e,chatType:s}){try{const o=JSON.parse(e),{messageVo:t,sessionVo:n,chatAvStatusVo:r}=o;switch(o.event){case O.MESSAGE:B(t.content)?!Y.showVideo&&!Y.showMultipleVideo||t.content.avStatus!==x.IN_CALL?(Y.currentMsg=t,Object.assign(Y.currentAVMsg,{strRoomId:t.sessionKey,chatMessageType:t.content.chatMessageType,callMode:t.sender===Y.userInfo.id?"call":"invite",currentMsg:t}),Y.showVideo||Y.showMultipleVideo?re(t,s):Y.showVideo=!0):(W.value.send("/app/chat/send",{},JSON.stringify({chatType:E.SINGLE,receiver:t.sender,content:{chatMessageType:t.content.chatMessageType,avStatus:x.CALL_BUSY}})),console.log("用户忙!")):re(t,s);break;case O.RECALL_MESSAGE:break;case O.AV_STATUS:Object.assign(Y.currentAVMsg,r,{callMode:r.sender===Y.userInfo.id?"call":"invite",checkedIds:[]}),Y.showVideo||Y.showMultipleVideo?console.log("用户忙!"):Y.showMultipleVideo=!0;break;case O.NEW_SESSION:if(s===E.GROUP)return;se(n);break;case O.JOIN:if(s===E.GROUP)return;se(n),W.value.subscribe(`/topic/group/${n.receiver}`,(({body:e})=>ie({body:e,chatType:E.GROUP})));break;case O.LEAVE:X(),_(Y.sessionList,(e=>e.sessionKey===n.sessionKey))}}catch(e){console.log(e)}}return async function(){ne()}(),n((()=>{var e;null==(e=W.value)||e.disconnect()})),q({getUnreadData:function(){return Y.sessionList.filter((e=>C(e.unreadNum)&&e.unreadNum>0))},openSession:Q,closeSession:X,getCurrentSession:Z}),(s,o)=>(r(),i("div",{class:"iho-chat",style:a(c(z))},[d(c(g),{abstract:"",namespace:"iho-chat__popover"},{default:u((()=>[D.value?(r(),l(c(y),{key:0,stroke:"#5585f5"})):(r(),i(p,{key:1},[e.chatBox?f("v-if",!0):(r(),i("div",J,[d(T),d(V,{title:"发起群聊",mode:"create","default-value":[Y.userInfo]},null,8,["default-value"]),m("div",$,[h(s.$slots,"toolbar")])])),d(c(S),{class:"iho-chat__body","has-sider":""},{default:u((()=>[e.chatBox?f("v-if",!0):(r(),l(b,{key:0})),d(c(v),{class:"chat-content"},{default:u((()=>[d(M),d(I),d(k)])),_:1}),h(s.$slots,"external")])),_:3}),Y.showVideo?(r(),l(j,{key:1})):f("v-if",!0),Y.showMultipleVideo?(r(),l(L,{key:2})):f("v-if",!0)],64))])),_:3})],4))}});export{q as default};
|
@@ -1 +1 @@
|
|
1
|
-
import t from"axios";import{createDiscreteApi as e}from"naive-ui";const{message:o}=e(["message"]);function r(t){const e=[];for(const o in t){const r=t[o];Array.isArray(r)?r.forEach((t=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(t)}`)})):e.push(`${encodeURIComponent(o)}=${encodeURIComponent(r)}`)}return e.join("&")}const n=t.create({withCredentials:!0,timeout:5e3});function a(t){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",url:"/session/openSession",data:r(t)})}function u(t){return n({method:"get",url:"/chat/recordList",params:t})}function s(t){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",url:"/session/toppingSession",data:r(t)})}function d(t){return n({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/chat/uploadFile",data:t})}function i(t){return n({method:"get",url:"/user/listUser",params:t})}function p(t){return n({method:"get",url:"/user/getUserDetail",params:t})}function c(t){return n({method:"post",url:"/chat/readMessage",data:t})}function
|
1
|
+
import t from"axios";import{createDiscreteApi as e}from"naive-ui";const{message:o}=e(["message"]);function r(t){const e=[];for(const o in t){const r=t[o];Array.isArray(r)?r.forEach((t=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(t)}`)})):e.push(`${encodeURIComponent(o)}=${encodeURIComponent(r)}`)}return e.join("&")}const n=t.create({withCredentials:!0,timeout:5e3});function a(t){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",url:"/session/openSession",data:r(t)})}function u(t){return n({method:"get",url:"/chat/recordList",params:t})}function s(t){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",url:"/session/toppingSession",data:r(t)})}function d(t){return n({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/chat/uploadFile",data:t})}function i(t){return n({method:"get",url:"/user/listUser",params:t})}function p(t){return n({method:"get",url:"/user/getUserDetail",params:t})}function c(t){return n({method:"post",url:"/chat/readMessage",data:t})}function m(t){return n({method:"post",url:"/chat/recallMessage",data:t})}function l(t){return n({method:"post",url:"/chat/searchChatRecord",data:t})}function h(t){return n({method:"post",url:"/group/create",data:t})}function f(t){return n({method:"get",url:"/group/user",params:t})}function g(t){return n({method:"post",url:"/group/join",data:t})}function C(t){return n({method:"post",url:"/group/leave",data:t})}function v(t){return n({method:"post",url:"/av/finish",data:t})}function w(t){return n({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/group/update",data:t})}n.interceptors.response.use((t=>{var e,r,n;if(null==(e=t.data)?void 0:e.result)return null==(r=t.data)?void 0:r.data;500==(null==(n=t.data)?void 0:n.code)&&t.data.msg&&o.error(t.data.msg)}));export{v as avFinishApi,u as getHistoryRecordApi,p as getUserDetailApi,h as groupCreateApi,g as groupJoinApi,C as groupLeaveApi,w as groupUpdateApi,f as groupUserApi,n as instanceAxios,i as listUserApi,a as openSessionApi,c as readMessageApi,m as recallMessageApi,l as searchChatRecordApi,s as toppingSessionApi,d as uploadFileApi};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as
|
1
|
+
import{defineComponent as e,ref as t,computed as a,watch as o,openBlock as s,createBlock as i,unref as r,withCtx as n,withDirectives as l,createElementVNode as c,createVNode as m,createElementBlock as p,Fragment as d,renderList as u,toDisplayString as f,vShow as h,normalizeStyle as y,createCommentVNode as v,createTextVNode as g}from"vue";import{NModal as w,NImageGroup as b,NImage as k,NInput as M,NIcon as T,NTooltip as _}from"naive-ui";import{SearchOutline as I,DownloadOutline as S}from"@vicons/ionicons5";import{searchChatRecordApi as x}from"../api/index.js";import{useTheme as j}from"../../../../shared/hooks/useTheme.js";import{useDebounceFn as A}from"@vueuse/core";import{format as H,isSameWeek as D,isSameMonth as C}from"date-fns";import{last as O}from"lodash-es";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{useScrollLoading as z}from"../../../../shared/hooks/useScrollLoading.js";import{useState as L}from"../hooks/useState.js";import{getFileSize as U,downloadFile as E}from"../utils/index.js";import"trtc-sdk-v5";const $={class:"label"},F={class:"image-box"},P={class:"file-type"},R={class:"text"},B={class:"name"},G={class:"detail"},N={class:"opt-box"};var q=e({__name:"ChatFile",props:{type:{type:String,default:"image"},visible:{type:Boolean}},setup(e){const q=e,J=j(),{state:K}=L(),Q=t([]),V=t([]),W=t(),X=t(),Y=t(),Z=A(ae,500),ee={page:0,hasMore:!0,lastSendTime:H(new Date,"yyyy-MM-dd HH:mm:ss")};async function te(){var e;try{if(!ee.hasMore)return;ee.page++;const t=await x({orgId:K.orgId,keyword:Y.value,endTime:"",startTime:"",lastSendTime:ee.lastSendTime,memberIdSet:[],page:ee.page,recordType:"image"===q.type?"IMAGE":"FILE",receiver:K.currentSessionItem.receiver,userId:K.userInfo.id});Array.isArray(t)&&0!==t.length&&Array.isArray(t[0].recordList)||(ee.hasMore=!1);let a=t||[];if(Array.isArray(t)&&t.length>0&&(a=t[0].recordList),ee.lastSendTime=null==(e=O(a))?void 0:e.sendTime,"image"===q.type){const e=function(e){const t={};e.forEach((e=>{const a=new Date(e.sendTime);let o=H(a,"yyyy年MM月");D(a,new Date)?o="本周":C(a,new Date)&&(o="本月"),t[o]||(t[o]=[]),t[o].push(e.content.msg)}));return Object.entries(t).map((([e,t])=>({label:e,list:t})))}(a);Q.value=ee.page>1?Q.value.concat(e):e}else{const e=a.map((e=>new Promise((async t=>{const a=await U(e.content.fileUrl);t({...e,size:a})})))),t=await Promise.all(e);V.value=ee.page>1?V.value.concat(t):t}}catch(e){}}function ae(){Object.assign(ee,{page:0,hasMore:!0,lastSendTime:H(new Date,"yyyy-MM-dd HH:mm:ss")}),te()}z(W,(()=>{te()})),z(X,(()=>{te()}));const oe=a((()=>"image"===q.type?"聊天图片":"聊天文件"));function se(e){const{size:t,sendTime:a,senderName:o}=e;return`${t} · ${H(new Date(a),"yyyy/MM/dd HH:mm")} ${o}`}function ie(e){var t;const a=(null==(t=e.content)?void 0:t.msg)||"",o=a.lastIndexOf(".");if(-1!==o){return a.charAt(o+1).toUpperCase()}return"?"}return o((()=>q.visible),(e=>{e?ae():Y.value=""})),(t,a)=>(s(),i(r(w),{preset:"dialog",title:r(oe),"show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{default:n((()=>[l(c("div",{class:"iho-chat-dialog__content iho-chat-image-wrapper",ref_key:"imageRef",ref:W},[m(r(b),{"show-toolbar-tooltip":""},{default:n((()=>[(s(!0),p(d,null,u(Q.value,(e=>(s(),p("div",{class:"image-item",key:e.label},[c("span",$,f(e.label),1),c("div",F,[(s(!0),p(d,null,u(e.list,(e=>(s(),i(r(k),{key:e,width:"80",height:"80",src:e},null,8,["src"])))),128))])])))),128))])),_:1})],512),[[h,"image"===e.type]]),l(c("div",{class:"iho-chat-dialog__content iho-chat-file-wrapper",style:y(r(J))},[m(r(M),{clearable:"",placeholder:"搜索文件",value:Y.value,"onUpdate:value":a[0]||(a[0]=e=>Y.value=e),valueModifiers:{trim:!0},onInput:r(Z)},{prefix:n((()=>[m(r(T),{component:r(I)},null,8,["component"])])),_:1},8,["value","onInput"]),c("div",{class:"file-list-box",ref_key:"fileRef",ref:X},[(s(!0),p(d,null,u(V.value,((e,t)=>(s(),p("div",{class:"file-item",key:t},[c("span",P,f(ie(e)),1),c("div",R,[c("span",B,f(e.content.msg),1),c("span",G,f(se(e)),1)]),c("div",N,[v(' <n-tooltip :show-arrow="false">\r\n\t\t\t\t\t\t\t<template #trigger>\r\n\t\t\t\t\t\t\t\t<n-icon :size="16" :component="OpenOutline" />\r\n\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t转发\r\n\t\t\t\t\t\t</n-tooltip> '),m(r(_),{"show-arrow":!1},{trigger:n((()=>[m(r(T),{size:16,component:r(S),onClick:()=>r(E)(e.content.fileUr,e.content.msg)},null,8,["component","onClick"])])),default:n((()=>[g(" 下载 ")])),_:2},1024)])])))),128))],512)],4),[[h,"image"!==e.type]])])),_:1},8,["title"]))}});export{q as default};
|
@@ -29,6 +29,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
29
29
|
fileChange: (options: FileOptions, chatMessageType: MESSAGE_TYPE) => Promise<void>;
|
30
30
|
handleMsgSend: () => Promise<void>;
|
31
31
|
doSendMessage: (contentInfo: AnyObject) => Promise<void>;
|
32
|
+
clearInput: () => void;
|
32
33
|
NButton: any;
|
33
34
|
NPopover: any;
|
34
35
|
NTooltip: any;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as n,computed as t,watch as o,withDirectives as
|
1
|
+
import{defineComponent as e,ref as n,computed as t,watch as o,withDirectives as s,openBlock as i,createElementBlock as r,normalizeStyle as a,unref as c,createElementVNode as l,toDisplayString as u,createVNode as f,createCommentVNode as d,withCtx as m,Fragment as g,renderList as p,createBlock as h,createTextVNode as y,mergeProps as v,vShow as M}from"vue";import{NIcon as w,NTooltip as _,NPopover as k,NButton as E,NUpload as C,NUploadTrigger as T}from"naive-ui";import I from"./ChatAdd.vue.js";import{useState as x}from"../hooks/useState.js";import{useSession as b}from"../hooks/useSession.js";import{MESSAGE_TYPE as j,AV_STATUS as z}from"../constants/index.js";import"trtc-sdk-v5";import{simplifyMessage as L,base64ToFile as O}from"../utils/index.js";import{emojis as R}from"../utils/emoji.js";import{uploadFileApi as q}from"../api/index.js";import{CloseCircleOutline as D,CallOutline as $,VideocamOutline as A}from"@vicons/ionicons5";import{xor as H,uniq as J,trim as V,cloneDeep as K}from"lodash-es";import{uuidGenerator as F}from"../../../../shared/utils/index.js";import{useStorage as U}from"@vueuse/core";const G={key:0,class:"reference-content-box"},N={class:"reference-content"},X=["innerHTML"],B={class:"tool-box"},S=l("i",{class:"chat--iconfont chat--icon-face"},null,-1),P=l("span",null,"最近使用",-1),Q={class:"list-box",style:{"margin-bottom":"8px"}},W=["src"],Y=l("span",null,"默认表情",-1),Z={class:"list-box"},ee=["src"],ne=l("i",{class:"chat--iconfont chat--icon-good"},null,-1),te=l("i",{class:"chat--iconfont chat--icon-image"},null,-1),oe=l("i",{class:"chat--iconfont chat--icon-folder"},null,-1),se={class:"btn-box"},ie=l("span",{class:"tip"},"Enter 发送, Ctrl + Enter 换行",-1);var re=e({__name:"ChatFooter",setup(e){const re=n(),{state:ae,sendMessage:ce}=x(),{isGroupChat:le}=b(ae),ue=n(!1),fe=n(""),de=U("commonEmoticons",[]),me=t((()=>({options:ae.currentGroupUser,defaultValue:[ae.userInfo]}))),ge=t((()=>!fe.value.replace(/( |\s|<br>)+/g,"")));function pe(e,n=[]){const t=F(),o=[],s=n.length>0;ae.showVideo||ae.showMultipleVideo||(s?(o.push(...H(n,[ae.userInfo.id])),Object.assign(ae.currentAVMsg,{callMode:"call",checkedIds:o,strRoomId:t,chatMessageType:e}),ae.showMultipleVideo=!0):ce({content:{chatMessageType:e,msg:"",avStatus:z.IN_CALL}}))}function he(e){["Enter"].includes(e.key)&&(e.ctrlKey&&(e.preventDefault(),document.execCommand("InsertLineBreak")),function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}(e)||(e.preventDefault(),_e()))}function ye(){var e;fe.value=(null==(e=re.value)?void 0:e.innerHTML)||""}function ve(e){var n;de.value.unshift(e),de.value=J(de.value).slice(0,26),null==(n=re.value)||n.focus(),document.execCommand("insertHTML",!1,`<img data-msg=${e} data-type=${j.EMOJI} class="emoji--min" src=${R.findEmoji(e)} />`)}async function Me(e){const n=new FormData;return n.append("sender",ae.userInfo.id),n.append("file",e),await q(n)}async function we(e,n){const{file:t,name:o}=e.file,s=await Me(t);if(!s)return console.log("上传失败");ke({chatMessageType:n,msg:n===j.FILE?o:s,url:s})}async function _e(){const{innerHTML:e="",innerText:n="",outerText:t=""}=re.value||{};if(ge.value)return console.log("请输入内容");let o=j.TEXT,s="";if(e){const t=e.match(/<img[^>]*>/gi),i=(t||[]).length;if(n&&0===i)s=n;else if(n||1!==i){if(o=j.BLEND,s=e,null==t?void 0:t.length)for(let e=0;e<i;e++)if(t[e].includes(`data-type="${j.EMOJI}"`)){const n=t[e].match(/data-msg="(.*?)"/);n&&n.length>1&&(s=s.replace(t[e],`[${n[1]}]`))}else{const n=t[e].match(/src\s*=\s*"([^"]*)"/);if(n&&n.length>1){const e=O(n[1]);if(e){const t=await Me(e);s=s.replace(n[1],t||"")}}}}else if(e.includes(j.EMOJI)){o=j.EMOJI;const n=e.match(/data-msg\s*=\s*"([^"]*)"/);n&&(s=n[1])}else{o=j.IMAGE;const n=e.match(/src\s*=\s*"([^"]*)"/);if(n){const e=O(n[1]);if(e){const n=await Me(e);n&&(s=n)}}}}else s=V(n);s&&ke({msg:s,chatMessageType:o,origin:"btn"})}async function ke(e){const{chatMessageType:n=j.TEXT,msg:t,url:o,origin:s=""}=e,i={msg:t,chatMessageType:n};n===j.FILE&&(i.fileUrl=o),"btn"===s&&Ee(),ae.currentReferenceMsg&&([j.TEXT,j.EMOJI,j.BLEND].includes(n)&&(i.referenceContent=K(ae.currentReferenceMsg)),ae.currentReferenceMsg=null),ce({content:i})}function Ee(){re.value.innerHTML="",fe.value=""}return o((()=>[ae.currentReferenceMsg,ae.currentReEditMsg]),(([e,n])=>{var t;if((e||n)&&(null==(t=re.value)||t.focus()),n){const{chatMessageType:e,msg:t}=n.content||{},o=e===j.TEXT?t:`<img data-msg=${t} data-type=${j.EMOJI} class="emoji--min" src=${R.findEmoji(t)} />`;document.execCommand("insertHTML",!1,o),ae.currentReEditMsg=null}})),o((()=>ae.id),(e=>{e&&Ee()})),(e,n)=>s((i(),r("section",{class:"chat-footer",style:a({cursor:c(ae).id?"default":"not-allowed"})},[c(ae).currentReferenceMsg?(i(),r("div",G,[l("div",N,[l("span",null,u(c(ae).currentReferenceMsg.senderName)+":",1),l("pre",{innerHTML:c(L)(c(ae).currentReferenceMsg.content)},null,8,X)]),f(c(w),{component:c(D),onClick:n[0]||(n[0]=()=>c(ae).currentReferenceMsg=null)},null,8,["component"])])):d("v-if",!0),l("div",B,[f(c(_),{"show-arrow":!1},{trigger:m((()=>[f(c(k),{"content-class":"emoji-content",class:"emoji-wrapper",show:ue.value,"onUpdate:show":n[1]||(n[1]=e=>ue.value=e),placement:"top",trigger:"click","show-arrow":!1,"display-directive":"show",delay:0},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny"},{icon:m((()=>[S])),_:1})])),default:m((()=>[c(de).length>0?(i(),r(g,{key:0},[P,l("div",Q,[(i(!0),r(g,null,p(c(de),(e=>(i(),h(c(_),{key:e,"show-arrow":!1},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny",onClick:()=>ve(e)},{icon:m((()=>[l("img",{src:c(R).findEmoji(e)},null,8,W)])),_:2},1032,["onClick"])])),default:m((()=>[y(" "+u(e),1)])),_:2},1024)))),128))])],64)):d("v-if",!0),Y,l("div",Z,[(i(!0),r(g,null,p(c(R).default,(([e,n])=>(i(),h(c(_),{key:e,"show-arrow":!1},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny",onClick:()=>ve(e)},{icon:m((()=>[l("img",{src:n},null,8,ee)])),_:2},1032,["onClick"])])),default:m((()=>[y(" "+u(e),1)])),_:2},1024)))),128))])])),_:1},8,["show"])])),default:m((()=>[y(" 表情 ")])),_:1}),f(c(_),{"show-arrow":!1},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny",onClick:n[2]||(n[2]=()=>ke({chatMessageType:c(j).EMOJI,msg:0}))},{icon:m((()=>[ne])),_:1})])),default:m((()=>[y(" 点赞 ")])),_:1}),f(c(C),{abstract:"",multiple:"",accept:"image/*",onChange:n[3]||(n[3]=e=>we(e,c(j).IMAGE))},{default:m((()=>[f(c(T),{abstract:""},{default:m((({handleClick:e})=>[f(c(_),{"show-arrow":!1},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny",onClick:e},{icon:m((()=>[te])),_:2},1032,["onClick"])])),default:m((()=>[y(" 上传图片 ")])),_:2},1024)])),_:1})])),_:1}),f(c(C),{abstract:"",multiple:"",accept:"video/*,.pdf,.doc.docx,,.zip,.xlsx,.txt",onChange:n[4]||(n[4]=e=>we(e,c(j).FILE))},{default:m((()=>[f(c(T),{abstract:""},{default:m((({handleClick:e})=>[f(c(_),{"show-arrow":!1},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny",onClick:e},{icon:m((()=>[oe])),_:2},1032,["onClick"])])),default:m((()=>[y(" 上传文件 ")])),_:2},1024)])),_:1})])),_:1}),c(le)?(i(),r(g,{key:0},[f(I,v(c(me),{onComfirm:n[5]||(n[5]=e=>pe(c(j).AUDIO,e))}),{trigger:m((()=>[f(c(_),{"show-arrow":!1},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny"},{icon:m((()=>[f(c(w),{size:"18",component:c($)},null,8,["component"])])),_:1})])),default:m((()=>[y(" 语音通话 ")])),_:1})])),_:1},16),f(I,v(c(me),{onComfirm:n[6]||(n[6]=e=>pe(c(j).VIDEO,e))}),{trigger:m((()=>[f(c(_),{"show-arrow":!1},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny"},{icon:m((()=>[f(c(w),{size:"20",component:c(A)},null,8,["component"])])),_:1})])),default:m((()=>[y(" 视频会议 ")])),_:1})])),_:1},16)],64)):(i(),r(g,{key:1},[f(c(_),{"show-arrow":!1},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny",onClick:n[7]||(n[7]=()=>pe(c(j).AUDIO))},{icon:m((()=>[f(c(w),{size:"18",component:c($)},null,8,["component"])])),_:1})])),default:m((()=>[y(" 语音通话 ")])),_:1}),f(c(_),{"show-arrow":!1},{trigger:m((()=>[f(c(E),{quaternary:"",size:"tiny",onClick:n[8]||(n[8]=()=>pe(c(j).VIDEO))},{icon:m((()=>[f(c(w),{size:"20",component:c(A)},null,8,["component"])])),_:1})])),default:m((()=>[y(" 视频通话 ")])),_:1})],64))]),s(l("div",{ref_key:"inputRef",ref:re,class:"input-box",contenteditable:"",onKeydown:he,onInput:ye},null,544),[[M,c(ae).id]]),l("div",se,[ie,f(c(E),{type:"primary",round:"",disabled:c(ge),onClick:_e},{default:m((()=>[y("发送")])),_:1},8,["disabled"])])],4)),[[M,c(ae).id]])}});export{re as default};
|
@@ -29,6 +29,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
29
29
|
handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
|
30
30
|
setMenuPosition: (event: MouseEvent) => Promise<void>;
|
31
31
|
showMessage: (item: AnyObject) => boolean;
|
32
|
+
showReEdit: (item: AnyObject) => boolean;
|
32
33
|
showReferenceMsg: (item: AnyObject) => any;
|
33
34
|
showBlendMsg: (item: AnyObject) => any;
|
34
35
|
showTemplateMsg: (item: AnyObject, type: 'system' | 'template') => boolean | undefined;
|
@@ -38,6 +39,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
38
39
|
resetInfo: () => void;
|
39
40
|
setReferenceMsg: (msgItem: AnyObject) => void;
|
40
41
|
handleSelect: (key: string, msgItem: AnyObject) => void;
|
42
|
+
reEdit: (item: AnyObject) => void;
|
41
43
|
NAvatar: any;
|
42
44
|
NImageGroup: any;
|
43
45
|
NImage: any;
|