cnhis-design-vue 3.2.7-beta.23 → 3.2.7-beta.25
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/README.md +87 -87
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/formItem.d.ts +9 -0
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/iho-chat/index.d.ts +62 -1
- package/es/components/iho-chat/src/Index.vue.d.ts +62 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatAdd.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/ChatHeader.vue.d.ts +2 -0
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- 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/ChatSearch.vue.d.ts +57 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +1 -0
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +1 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md
CHANGED
@@ -1,87 +1,87 @@
|
|
1
|
-
# 安装
|
2
|
-
|
3
|
-
```shell
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
5
|
-
# or
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
-
```
|
8
|
-
|
9
|
-
## 1.全局引入
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
// main.ts
|
13
|
-
import { createApp } from 'vue';
|
14
|
-
import App from './App.vue';
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
-
import cui from 'cnhis-design-vue';
|
17
|
-
|
18
|
-
const app = createApp(App);
|
19
|
-
app.use(cui).mount('#app');
|
20
|
-
```
|
21
|
-
|
22
|
-
## 2. 按需引入
|
23
|
-
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
-
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
-
|
28
|
-
```shell
|
29
|
-
# 安装自动导入样式的插件
|
30
|
-
npm i -d vite-plugin-style-import
|
31
|
-
```
|
32
|
-
|
33
|
-
```typescript
|
34
|
-
// vite.config.ts
|
35
|
-
import { defineConfig } from 'vite';
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
-
|
38
|
-
export default defineConfig({
|
39
|
-
plugins: [
|
40
|
-
// ...otherPlugins
|
41
|
-
createStyleImportPlugin({
|
42
|
-
libs: [
|
43
|
-
{
|
44
|
-
libraryName: 'cnhis-design-vue',
|
45
|
-
esModule: true,
|
46
|
-
ensureStyleFile: true,
|
47
|
-
resolveStyle: name => {
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
]
|
52
|
-
})
|
53
|
-
]
|
54
|
-
});
|
55
|
-
```
|
56
|
-
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
-
|
59
|
-
```typescript
|
60
|
-
// main.ts
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
62
|
-
```
|
63
|
-
|
64
|
-
## 3.FAQ
|
65
|
-
|
66
|
-
### 3.1 项目打包后样式丢失
|
67
|
-
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
-
|
70
|
-
```typescript
|
71
|
-
// vite.config.ts
|
72
|
-
import { defineConfig } from 'vite';
|
73
|
-
|
74
|
-
export default defineConfig({
|
75
|
-
build: {
|
76
|
-
rollupOptions: {
|
77
|
-
// ..otherOptions
|
78
|
-
output: {
|
79
|
-
dir: './dist',
|
80
|
-
manualChunks: {
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
-
}
|
83
|
-
}
|
84
|
-
}
|
85
|
-
}
|
86
|
-
});
|
87
|
-
```
|
1
|
+
# 安装
|
2
|
+
|
3
|
+
```shell
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
5
|
+
# or
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
+
```
|
8
|
+
|
9
|
+
## 1.全局引入
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
// main.ts
|
13
|
+
import { createApp } from 'vue';
|
14
|
+
import App from './App.vue';
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
+
import cui from 'cnhis-design-vue';
|
17
|
+
|
18
|
+
const app = createApp(App);
|
19
|
+
app.use(cui).mount('#app');
|
20
|
+
```
|
21
|
+
|
22
|
+
## 2. 按需引入
|
23
|
+
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
+
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
+
|
28
|
+
```shell
|
29
|
+
# 安装自动导入样式的插件
|
30
|
+
npm i -d vite-plugin-style-import
|
31
|
+
```
|
32
|
+
|
33
|
+
```typescript
|
34
|
+
// vite.config.ts
|
35
|
+
import { defineConfig } from 'vite';
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
+
|
38
|
+
export default defineConfig({
|
39
|
+
plugins: [
|
40
|
+
// ...otherPlugins
|
41
|
+
createStyleImportPlugin({
|
42
|
+
libs: [
|
43
|
+
{
|
44
|
+
libraryName: 'cnhis-design-vue',
|
45
|
+
esModule: true,
|
46
|
+
ensureStyleFile: true,
|
47
|
+
resolveStyle: name => {
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
]
|
52
|
+
})
|
53
|
+
]
|
54
|
+
});
|
55
|
+
```
|
56
|
+
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
+
|
59
|
+
```typescript
|
60
|
+
// main.ts
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
62
|
+
```
|
63
|
+
|
64
|
+
## 3.FAQ
|
65
|
+
|
66
|
+
### 3.1 项目打包后样式丢失
|
67
|
+
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
+
|
70
|
+
```typescript
|
71
|
+
// vite.config.ts
|
72
|
+
import { defineConfig } from 'vite';
|
73
|
+
|
74
|
+
export default defineConfig({
|
75
|
+
build: {
|
76
|
+
rollupOptions: {
|
77
|
+
// ..otherOptions
|
78
|
+
output: {
|
79
|
+
dir: './dist',
|
80
|
+
manualChunks: {
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
});
|
87
|
+
```
|
@@ -725,8 +725,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
725
725
|
showSeq: boolean;
|
726
726
|
footerFlag: boolean;
|
727
727
|
fieldDescribeMode: "column" | "tooltip";
|
728
|
-
showSearch: boolean;
|
729
728
|
customColumns: FieldSetColumnItem[];
|
729
|
+
showSearch: boolean;
|
730
730
|
showSortPriority: boolean;
|
731
731
|
showHeadFilter: boolean;
|
732
732
|
}>;
|
@@ -22,6 +22,10 @@ export declare const FORM_ITEM: import("vue").DefineComponent<{
|
|
22
22
|
fieldItem: {
|
23
23
|
type: PropType<FieldItem>;
|
24
24
|
};
|
25
|
+
showTooltipFeedback: {
|
26
|
+
type: BooleanConstructor;
|
27
|
+
default: boolean;
|
28
|
+
};
|
25
29
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
26
30
|
label: StringConstructor;
|
27
31
|
propertyKey: StringConstructor;
|
@@ -44,8 +48,13 @@ export declare const FORM_ITEM: import("vue").DefineComponent<{
|
|
44
48
|
fieldItem: {
|
45
49
|
type: PropType<FieldItem>;
|
46
50
|
};
|
51
|
+
showTooltipFeedback: {
|
52
|
+
type: BooleanConstructor;
|
53
|
+
default: boolean;
|
54
|
+
};
|
47
55
|
}>>, {
|
48
56
|
showFeedback: boolean;
|
49
57
|
span: number;
|
50
58
|
isOptionChildField: boolean;
|
59
|
+
showTooltipFeedback: boolean;
|
51
60
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,inject as l,computed as t,ref as r,onUnmounted as o,createVNode as
|
1
|
+
import{defineComponent as e,inject as l,computed as t,ref as r,onUnmounted as o,createVNode as a,mergeProps as n,unref as i,withModifiers as d,createTextVNode as u}from"vue";import{arrayed as s,getStringWidth as m,widthAppend as f}from"../../../../../shared/utils/index.js";import{isVoidField as v}from"@formily/core";import{observe as c,autorun as p}from"@formily/reactive";import{connect as b,mapProps as h}from"@formily/vue";import{useDebounceFn as y}from"@vueuse/core";import{isString as g,isArray as _,isObject as k,isNumber as x,isFunction as I,uniq as F}from"lodash-es";import{NFormItem as w,NTooltip as R,NButton as j}from"naive-ui";import M from"../../../../annotation-edit/index.js";import"../../../index.js";import P from"../tooltipMessage.vue.js";import{InjectionFormGlobalProps as T,InjectionFormGlobalEmit as O,InjectionFormUUID as S,InjectionFormGraph as E,InjectionAnnotation as L,InjectionAnnotationShortcuts as C,InjectionFormColumnWidth as W}from"../../constants/index.js";import{useComplexOptionsSpan as A}from"../../hooks/useComplexOptions.js";import{validateMessageParser as N,editorUnescape as U}from"../../utils/index.js";import{dotEscape as q,createFieldAddressId as B}from"../../utils/schema.js";import{useFormField as K}from"../../hooks/useFormField.js";const D=b(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},isOptionChildField:Boolean,feedback:String,showFeedback:{type:Boolean,default:void 0},fieldItem:{type:Object},showTooltipFeedback:{type:Boolean,default:!0}},setup(e,{slots:s,attrs:b}){const h=l(T),N=l(O),{field:D,fieldKey:G,fieldAddress:H}=K(),V=l(S),$=t((()=>q(`${V}-${H.value}`))),z=r(!1);if(v(D.value)&&_(e.suffixFields)){const t=l(E);o(c(t,y((()=>{v(D.value)&&_(e.suffixFields)&&(z.value=e.suffixFields.some((e=>{const l=D.value.form.query(e).take();return l&&Reflect.get(l,"required")})))}),100)))}else o(p((()=>{z.value=Reflect.get(D.value,"required")})));const Y=l(L),J=t({get(){var l,t;return null!=(t=null==(l=Y.value)?void 0:l[e.propertyKey])?t:""},set(l){Y.value={property:e.propertyKey,value:l}}}),Q=l(C);const X=t((()=>{var l;const t={color:null==(l=e.fieldItem)?void 0:l.labelColor};return k(b.labelStyle)&&Object.assign(t,b.labelStyle),t})),Z=t((()=>Y.value&&!1!==e.annotation)),ee=t((()=>{var l,t;return g(null==(l=e.fieldItem)?void 0:l.editor_title)&&e.fieldItem.editor_title&&"POPUP_ALERT"===(null==(t=e.fieldItem)?void 0:t.editor_title_mode)})),le=r(!1);const te=t((()=>e.label&&" "!==e.label)),re=t((()=>{let l=0;return Z.value&&(l+=18),e.remark&&(l+=18),ee.value&&(l+=32),l})),oe=l(T,{}),ae=t((()=>{var l;const t=null==(l=e.fieldItem)?void 0:l.bordered;return null==t?oe.bordered:t})),ne=l("n-form",{}),ie=t((()=>{var e,l,t,r;if("left"!==(null!=(l=b.labelPlacement)?l:null==(e=ne.props)?void 0:e.labelPlacement))return"";let o=null!=(r=b.labelWidth)?r:null==(t=ne.props)?void 0:t.labelWidth;return o&&"auto"!==o?(o=parseInt(o+""),isNaN(o)||!x(o)?"":o-12-re.value-(z.value?11:0)):""})),de=t((()=>I(e.labelRender)?"":g(e.label)?e.label:""));function ue(){return te.value?a("section",{class:"form-render__formItemLabel"},[a("span",{class:"form-render__formItemLabel--text",style:{marginRight:f(re.value),maxWidth:f(ie.value)},title:de.value},[I(e.labelRender)?e.labelRender(e.label):e.label]),re.value?a("section",{class:"form-render__formItemLabel--operation"},[e.remark?a("div",{class:"form-render__formItemLabel--tooltip"},[a(P,{message:e.remark},null)]):null,Z.value?a(M,{class:"form-render__formItemLabel--annotation",modelValue:J.value,"onUpdate:modelValue":e=>J.value=e,shortcuts:i(Q)},null):null,ee.value?a(R,{zIndex:3e3,raw:!0,showArrow:!1,trigger:"manual",placement:"top-start",show:le.value,contentStyle:"background-color:white;color:rgb(51, 54, 57);padding:8px;position:relative;"},{trigger:()=>a(j,{onClick:d((()=>le.value=!le.value),["stop","prev"]),text:!0,type:"primary"},{default:()=>[a("span",{style:"display:inline-block;margin-left:4px"},[u("提示")])]}),default:()=>{var l,t;return[a("div",{innerHTML:U(null!=(t=null==(l=e.fieldItem)?void 0:l.editor_title)?t:"")},null),a(j,{text:!0,onClick:()=>le.value=!le.value,style:"position:absolute;right:2px;top:2px;line-height:1;height:12px;transform:scaleY(0.9)"},{default:()=>[u("x")]})]}}):null]):null]):null}const se=t((()=>{let l=re.value;return z.value&&(l+=11),g(e.label)&&(l+=ie.value||m(e.label)),l})),me=l(W),{getSpan:fe}=A();function ve(){var l,t,r,o,a,n,d;const u="inner"===(null==(l=e.fieldItem)?void 0:l.childWidthMode)?e.span:fe(V,D.value.address,!1)+e.span;if("left"!==(null!=(r=b.labelPlacement)?r:null==(t=ne.props)?void 0:t.labelPlacement)||!i(me)||!(null==h?void 0:h.autoWidth)||"INPUT_GROUP"===(null==(a=null==(o=D.value.parent)?void 0:o.component)?void 0:a[0]))return u;if("INPUT_GROUP"===(null==(d=null==(n=D.value.parent)?void 0:n.component)?void 0:d[0]))return u;const s=16+me.value;let m=u*s-16-se.value;const f=x(null==h?void 0:h.autoWidth)?h.autoWidth:120;let v=u;for(;m<f&&v<12;)v++,m+=s;return v}function ce(){var l;return"tooltip"!==(null==h?void 0:h.feedbackType)?null==(l=s.default)?void 0:l.call(s):a(R,{to:"body",trigger:"manual",show:!!e.feedback&&e.showTooltipFeedback,raw:!0,animated:!1,showArrow:!1,placement:"top-start",contentStyle:"background-color:#e88080;color:white;padding:8px;border-radius:4px"},{trigger(){var e;return null==(e=s.default)?void 0:e.call(s)},default:()=>e.feedback})}function pe(){var l,t,r;const o=null==(l=e.fieldItem)?void 0:l.editor_title,n=!(null==(t=e.fieldItem)?void 0:t.editor_title_mode)||"EMBEDDED_FORM"===(null==(r=e.fieldItem)?void 0:r.editor_title_mode);return g(o)&&o&&n?a("section",{style:"display:flex;flex-direction:column;gap:4px"},[ce(),a("div",{innerHTML:U(o)},null)]):ce()}function be(){const e=[D.value.path+""];return D.value.form.query("*").forEach((l=>{(l.address+"").includes(D.value.address+"")&&((l.path+"").includes(D.value.path+"")||e.push(l.path+""))})),e}const he=t({get:()=>!(!(null==h?void 0:h.selectMode)||!_(null==h?void 0:h.selectedFields))&&h.selectedFields.includes(D.value.path+""),set(e){if(!_(null==h?void 0:h.selectedFields))return;let l=[...h.selectedFields];e?(l.push(...be()),l=F(l)):be().forEach((e=>{const t=l.indexOf(e);t>-1&&l.splice(t,1)})),null==N||N("update:selectedFields",l)}}),ye=t((()=>(null==h?void 0:h.selectMode)&&!(D.value.parent&&"LINEBAR"!==D.value.parent.componentType)));function ge(){(null==h?void 0:h.selectMode)&&(he.value=!he.value)}const _e=t((()=>e.isOptionChildField?!!e.feedback&&" "!==e.feedback&&e.showFeedback:e.showFeedback));return()=>a(w,n({class:["form-render__formItem",{"form-render--no-border":!ae.value,"form-render--underline":"underline"===ae.value,"form-render__formItemMask":ye.value,"form-render__formItemMask--selected":ye.value&&he.value}],style:{"--form-item-column":ve()},showFeedback:_e.value,feedback:"tooltip"===(null==h?void 0:h.feedbackType)?"":e.feedback,labelStyle:X.value},{id:$.value,uuid:V,onClick:ge,"widget-type":D.value.componentType,"field-key":q(G.value),"field-address":B(H.value),required:z.value}),{...s,default:pe,label:ue})}}),h({title:"label"},((e,l)=>{const t=v(l)?void 0:s(l.selfErrors).length?function(e,l){if(!g(l.defined_error_msg)||!l.defined_error_msg)return e.map((e=>N(e,l))).join(",");return N(l.defined_error_msg,l)}(s(l.selfErrors),e.fieldItem):void 0;return{...e,fieldItem:void 0,feedback:t,"validation-status":t?"error":void 0}})));export{D as FORM_ITEM};
|
@@ -152,6 +152,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
152
152
|
NAvatar: any;
|
153
153
|
NIcon: any;
|
154
154
|
NButton: any;
|
155
|
+
NTooltip: any;
|
155
156
|
PersonProfile: import("vue").DefineComponent<{
|
156
157
|
userId: {
|
157
158
|
type: StringConstructor;
|
@@ -593,6 +594,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
593
594
|
NInput: any;
|
594
595
|
NCheckbox: any;
|
595
596
|
NCheckboxGroup: any;
|
597
|
+
NTooltip: any;
|
596
598
|
SearchOutline: 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<{}>>, {}>;
|
597
599
|
AddOutline: 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<{}>>, {}>;
|
598
600
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -961,6 +963,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
961
963
|
NInput: any;
|
962
964
|
NCheckbox: any;
|
963
965
|
NCheckboxGroup: any;
|
966
|
+
NTooltip: any;
|
964
967
|
SearchOutline: 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<{}>>, {}>;
|
965
968
|
AddOutline: 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<{}>>, {}>;
|
966
969
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1004,11 +1007,12 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1004
1007
|
listRef: import("vue").Ref<any>;
|
1005
1008
|
inputRef: import("vue").Ref<any>;
|
1006
1009
|
showSearch: import("vue").Ref<boolean>;
|
1007
|
-
keyword: import("vue").Ref<
|
1010
|
+
keyword: import("vue").Ref<string>;
|
1008
1011
|
state: import("./src/types").IState;
|
1009
1012
|
openSession: (item: import("../../shared/types").AnyObject) => Promise<void>;
|
1010
1013
|
userList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
1011
1014
|
handleInput: () => void;
|
1015
|
+
showNoData: import("vue").ComputedRef<boolean>;
|
1012
1016
|
addSession: (userId: string) => Promise<void>;
|
1013
1017
|
NPopover: any;
|
1014
1018
|
NButton: any;
|
@@ -1016,6 +1020,61 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1016
1020
|
NInput: any;
|
1017
1021
|
NIcon: any;
|
1018
1022
|
SearchOutline: 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<{}>>, {}>;
|
1023
|
+
DefaultPage: SFCWithInstall<import("vue").DefineComponent<{
|
1024
|
+
type: {
|
1025
|
+
type: StringConstructor;
|
1026
|
+
default: string;
|
1027
|
+
};
|
1028
|
+
config: {
|
1029
|
+
type: import("vue").PropType<import("../../shared/types").AnyObject>;
|
1030
|
+
default: () => {
|
1031
|
+
title: string;
|
1032
|
+
content: string;
|
1033
|
+
};
|
1034
|
+
};
|
1035
|
+
}, {
|
1036
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
1037
|
+
type: {
|
1038
|
+
type: StringConstructor;
|
1039
|
+
default: string;
|
1040
|
+
};
|
1041
|
+
config: {
|
1042
|
+
type: import("vue").PropType<import("../../shared/types").AnyObject>;
|
1043
|
+
default: () => {
|
1044
|
+
title: string;
|
1045
|
+
content: string;
|
1046
|
+
};
|
1047
|
+
};
|
1048
|
+
}>> & {
|
1049
|
+
onReloadPage?: ((...args: any[]) => any) | undefined;
|
1050
|
+
}>>;
|
1051
|
+
emit: (event: "reloadPage", ...args: any[]) => void;
|
1052
|
+
configResult: import("vue").ComputedRef<{
|
1053
|
+
title: string;
|
1054
|
+
content: string;
|
1055
|
+
img: string;
|
1056
|
+
}>;
|
1057
|
+
reloadPage: () => void;
|
1058
|
+
NIcon: any;
|
1059
|
+
Refresh: 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<{}>>, {}>;
|
1060
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "reloadPage"[], "reloadPage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1061
|
+
type: {
|
1062
|
+
type: StringConstructor;
|
1063
|
+
default: string;
|
1064
|
+
};
|
1065
|
+
config: {
|
1066
|
+
type: import("vue").PropType<import("../../shared/types").AnyObject>;
|
1067
|
+
default: () => {
|
1068
|
+
title: string;
|
1069
|
+
content: string;
|
1070
|
+
};
|
1071
|
+
};
|
1072
|
+
}>> & {
|
1073
|
+
onReloadPage?: ((...args: any[]) => any) | undefined;
|
1074
|
+
}, {
|
1075
|
+
type: string;
|
1076
|
+
config: import("../../shared/types").AnyObject;
|
1077
|
+
}>>;
|
1019
1078
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1020
1079
|
ChatAdd: import("vue").DefineComponent<{
|
1021
1080
|
title: {
|
@@ -1096,6 +1155,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1096
1155
|
NInput: any;
|
1097
1156
|
NCheckbox: any;
|
1098
1157
|
NCheckboxGroup: any;
|
1158
|
+
NTooltip: any;
|
1099
1159
|
SearchOutline: 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<{}>>, {}>;
|
1100
1160
|
AddOutline: 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<{}>>, {}>;
|
1101
1161
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1318,6 +1378,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1318
1378
|
NInput: any;
|
1319
1379
|
NCheckbox: any;
|
1320
1380
|
NCheckboxGroup: any;
|
1381
|
+
NTooltip: any;
|
1321
1382
|
SearchOutline: 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<{}>>, {}>;
|
1322
1383
|
AddOutline: 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<{}>>, {}>;
|
1323
1384
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -157,6 +157,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
157
157
|
NAvatar: any;
|
158
158
|
NIcon: any;
|
159
159
|
NButton: any;
|
160
|
+
NTooltip: any;
|
160
161
|
PersonProfile: import("vue").DefineComponent<{
|
161
162
|
userId: {
|
162
163
|
type: StringConstructor;
|
@@ -598,6 +599,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
598
599
|
NInput: any;
|
599
600
|
NCheckbox: any;
|
600
601
|
NCheckboxGroup: any;
|
602
|
+
NTooltip: any;
|
601
603
|
SearchOutline: 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<{}>>, {}>;
|
602
604
|
AddOutline: 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<{}>>, {}>;
|
603
605
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -966,6 +968,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
966
968
|
NInput: any;
|
967
969
|
NCheckbox: any;
|
968
970
|
NCheckboxGroup: any;
|
971
|
+
NTooltip: any;
|
969
972
|
SearchOutline: 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<{}>>, {}>;
|
970
973
|
AddOutline: 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<{}>>, {}>;
|
971
974
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1009,11 +1012,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
1009
1012
|
listRef: import("vue").Ref<any>;
|
1010
1013
|
inputRef: import("vue").Ref<any>;
|
1011
1014
|
showSearch: import("vue").Ref<boolean>;
|
1012
|
-
keyword: import("vue").Ref<
|
1015
|
+
keyword: import("vue").Ref<string>;
|
1013
1016
|
state: IState;
|
1014
1017
|
openSession: (item: AnyObject) => Promise<void>;
|
1015
1018
|
userList: import("vue").Ref<AnyObject[]>;
|
1016
1019
|
handleInput: () => void;
|
1020
|
+
showNoData: import("vue").ComputedRef<boolean>;
|
1017
1021
|
addSession: (userId: string) => Promise<void>;
|
1018
1022
|
NPopover: any;
|
1019
1023
|
NButton: any;
|
@@ -1021,6 +1025,61 @@ declare const _default: import("vue").DefineComponent<{
|
|
1021
1025
|
NInput: any;
|
1022
1026
|
NIcon: any;
|
1023
1027
|
SearchOutline: 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<{}>>, {}>;
|
1028
|
+
DefaultPage: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
1029
|
+
type: {
|
1030
|
+
type: StringConstructor;
|
1031
|
+
default: string;
|
1032
|
+
};
|
1033
|
+
config: {
|
1034
|
+
type: PropType<AnyObject>;
|
1035
|
+
default: () => {
|
1036
|
+
title: string;
|
1037
|
+
content: string;
|
1038
|
+
};
|
1039
|
+
};
|
1040
|
+
}, {
|
1041
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
1042
|
+
type: {
|
1043
|
+
type: StringConstructor;
|
1044
|
+
default: string;
|
1045
|
+
};
|
1046
|
+
config: {
|
1047
|
+
type: PropType<AnyObject>;
|
1048
|
+
default: () => {
|
1049
|
+
title: string;
|
1050
|
+
content: string;
|
1051
|
+
};
|
1052
|
+
};
|
1053
|
+
}>> & {
|
1054
|
+
onReloadPage?: ((...args: any[]) => any) | undefined;
|
1055
|
+
}>>;
|
1056
|
+
emit: (event: "reloadPage", ...args: any[]) => void;
|
1057
|
+
configResult: import("vue").ComputedRef<{
|
1058
|
+
title: string;
|
1059
|
+
content: string;
|
1060
|
+
img: string;
|
1061
|
+
}>;
|
1062
|
+
reloadPage: () => void;
|
1063
|
+
NIcon: any;
|
1064
|
+
Refresh: 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<{}>>, {}>;
|
1065
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "reloadPage"[], "reloadPage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1066
|
+
type: {
|
1067
|
+
type: StringConstructor;
|
1068
|
+
default: string;
|
1069
|
+
};
|
1070
|
+
config: {
|
1071
|
+
type: PropType<AnyObject>;
|
1072
|
+
default: () => {
|
1073
|
+
title: string;
|
1074
|
+
content: string;
|
1075
|
+
};
|
1076
|
+
};
|
1077
|
+
}>> & {
|
1078
|
+
onReloadPage?: ((...args: any[]) => any) | undefined;
|
1079
|
+
}, {
|
1080
|
+
type: string;
|
1081
|
+
config: AnyObject;
|
1082
|
+
}>>;
|
1024
1083
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1025
1084
|
ChatAdd: import("vue").DefineComponent<{
|
1026
1085
|
title: {
|
@@ -1101,6 +1160,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1101
1160
|
NInput: any;
|
1102
1161
|
NCheckbox: any;
|
1103
1162
|
NCheckboxGroup: any;
|
1163
|
+
NTooltip: any;
|
1104
1164
|
SearchOutline: 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<{}>>, {}>;
|
1105
1165
|
AddOutline: 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<{}>>, {}>;
|
1106
1166
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1323,6 +1383,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1323
1383
|
NInput: any;
|
1324
1384
|
NCheckbox: any;
|
1325
1385
|
NCheckboxGroup: any;
|
1386
|
+
NTooltip: any;
|
1326
1387
|
SearchOutline: 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<{}>>, {}>;
|
1327
1388
|
AddOutline: 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<{}>>, {}>;
|
1328
1389
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -79,6 +79,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
79
|
NInput: any;
|
80
80
|
NCheckbox: any;
|
81
81
|
NCheckboxGroup: any;
|
82
|
+
NTooltip: any;
|
82
83
|
SearchOutline: 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<{}>>, {}>;
|
83
84
|
AddOutline: 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<{}>>, {}>;
|
84
85
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as i,createElementBlock as
|
1
|
+
import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as i,createElementBlock as o,Fragment as u,createVNode as r,unref as s,withCtx as d,createElementVNode as n,createCommentVNode as v,isRef as c,renderList as p,createBlock as f,toDisplayString as m,createTextVNode as h,renderSlot as b}from"vue";import{NModal as g,NInput as k,NIcon as y,NCheckbox as _,NCheckboxGroup as w,NSpace as I,NAvatar as x,NTag as S,NTooltip as U,NButton as j}from"naive-ui";import{SearchOutline as C,AddOutline as L}from"@vicons/ionicons5";import{useState as A}from"../hooks/useState.js";import{listSort as V}from"../utils/index.js";import{cloneDeep as R,union as E,unionBy as G,remove as M,isArray as T,uniqBy as z}from"lodash-es";import{CHAT_TYPE as D}from"../constants/index.js";import{groupJoinApi as N,groupCreateApi as P}from"../api/index.js";import"trtc-sdk-v5";import{useSearchUserList as $}from"../hooks/useSearchUserList.js";const q={class:"iho-chat-dialog__content iho-chat-add-wrapper"},B={key:0,class:"input-box"},F=n("span",null,"群名称:",-1),H={class:"transfer-box"},J={class:"transfer-box__left"},K={class:"user-list-box"},O={key:1,class:"no-data"},Q={class:"transfer-box__right"},W={class:"checked-tag-box"};var X=e({__name:"ChatAdd",props:{title:{type:String,default:"添加新成员"},mode:{type:String,default:"select"},options:{type:Array},disabledIds:{type:Array,default:()=>[]},defaultValue:{type:Array}},emits:["comfirm"],setup(e,{emit:X}){const Y=e,{state:Z}=A(),ee=a(),ae=a(),le=a(!1),te=a([]),ie=a([]),oe=a(""),ue=a([]),{userList:re,handleInput:se}=$({wrapperRef:ee,keywordRef:ae,before:()=>{re.value=R(ie.value),me()},after:()=>{re.value.forEach((e=>{var a;e.disabled=null==(a=de.value)?void 0:a.includes(e.id)})),me()}}),de=l((()=>E(Y.disabledIds,[Z.userInfo.id]))),ne=l((()=>{var e,a;return(null==(e=Z.sessionList)?void 0:e.length)?null==(a=V(Z.sessionList).filter((e=>e.chatType===D.SINGLE)))?void 0:a.map((e=>({id:e.receiver,name:e.name,avatar:e.avatar}))):[]})),ve=l((()=>te.value.length?te.value.map((e=>e.id)):[])),ce=l((()=>"create"===Y.mode?ve.value.length<3:ve.value.length<1)),pe=l({get:()=>ue.value.length===re.value.filter((e=>!e.disabled)).length,set(e){const a=re.value.filter((e=>!e.disabled));ue.value=e?a.map((e=>e.id)):[],e?te.value=G(te.value,a,"id"):M(te.value,(e=>a.map((e=>e.id)).includes(e.id)))}});async function fe(){switch(Y.mode){case"create":await P({creator:Z.userInfo.id,memberIdSet:ve.value,name:oe.value,orgId:Z.orgId});break;case"join":await N({groupId:Z.currentSessionItem.receiver,operator:Z.userInfo.id,memberIdSet:ve.value}),Z.currentGroupUser.push(re.value.filter((e=>ve.value.includes(e.value))));break;default:X("comfirm",ve.value)}le.value=!1}function me(){var e,a;ue.value=null!=(a=null==(e=re.value.filter((e=>ve.value.includes(e.id))))?void 0:e.map((e=>e.id)))?a:[]}function he(e,a){if("check"===a.actionType){const e=re.value.find((e=>e.id===a.value));te.value.push(e)}else M(te.value,(e=>e.id===a.value))}return t((()=>le.value),(e=>{if(!e)return;const a=T(Y.options)&&Y.options.length?Y.options:ne.value;ie.value=z(a,"id").map((e=>{var a;return{...e,disabled:null==(a=de.value)?void 0:a.includes(e.id)}})),re.value=R(ie.value),T(Y.defaultValue)&&Y.defaultValue.length?(te.value=R(Y.defaultValue),me()):(te.value=[],ue.value=[])})),(a,l)=>(i(),o(u,null,[r(s(g),{preset:"dialog",title:e.title,"show-icon":!1,"auto-focus":!1,"trap-focus":!1,class:"iho-chat-dialog",show:le.value,"onUpdate:show":l[4]||(l[4]=e=>le.value=e),"negative-text":"取消","positive-text":"确定","positive-button-props":{disabled:s(ce)},onPositiveClick:fe},{default:d((()=>[n("div",q,["create"===e.mode?(i(),o("div",B,[F,r(s(k),{clearable:"",placeholder:"取个群名称方便后续搜索",value:oe.value,"onUpdate:value":l[0]||(l[0]=e=>oe.value=e),valueModifiers:{trim:!0}},null,8,["value"])])):v("v-if",!0),n("div",H,[n("div",J,[r(s(k),{placeholder:"搜索",clearable:"",value:ae.value,"onUpdate:value":[l[1]||(l[1]=e=>ae.value=e),s(se)],valueModifiers:{trim:!0}},{prefix:d((()=>[r(s(y),{component:s(C)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),n("div",K,[s(re).length>0?(i(),o(u,{key:0},[r(s(_),{label:"全选",checked:s(pe),"onUpdate:checked":l[2]||(l[2]=e=>c(pe)?pe.value=e:null)},null,8,["checked"]),r(s(w),{ref_key:"listRef",ref:ee,value:ue.value,"onUpdate:value":[l[3]||(l[3]=e=>ue.value=e),he]},{default:d((()=>[(i(!0),o(u,null,p(s(re),(e=>(i(),f(s(_),{key:e.id,value:e.id,disabled:e.disabled},{default:d((()=>[r(s(I),{align:"center","wrap-item":!1},{default:d((()=>[r(s(x),{src:e.avatar,round:"",size:32},null,8,["src"]),n("span",null,m(e.name),1)])),_:2},1024)])),_:2},1032,["value","disabled"])))),128))])),_:1},8,["value"])],64)):(i(),o("div",O,"找不到相关结果"))])]),n("div",Q,[n("span",null,"已选择 "+m(s(ve).length)+" 人",1),n("div",W,[(i(!0),o(u,null,p(te.value,(e=>(i(),f(s(S),{key:e.id,bordered:!1,closable:e.id!==s(Z).userInfo.id,disabled:s(de).includes(e.id),onClose:()=>{return a=e.id,M(te.value,(e=>e.id===a)),void M(ue.value,(e=>e===a));var a}},{avatar:d((()=>[r(s(x),{round:"",src:e.avatar},null,8,["src"])])),default:d((()=>[h(" "+m(e.name),1)])),_:2},1032,["closable","disabled","onClose"])))),128))])])])])])),_:1},8,["title","show","positive-button-props"]),n("span",{class:"btn-wrapper",onClick:l[5]||(l[5]=e=>le.value=!0)},[b(a.$slots,"trigger",{},(()=>[r(s(U),{"show-arrow":!1,trigger:"hover",placement:"bottom"},{trigger:d((()=>[r(s(j),{color:"#ffffff4D",class:"add-btn"},{icon:d((()=>[r(s(y),{component:s(L),color:"#fff"},null,8,["component"])])),_:1})])),default:d((()=>[h(" "+m(e.title),1)])),_:1})]))])],64))}});export{X as default};
|
@@ -114,6 +114,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
114
114
|
NInput: any;
|
115
115
|
NCheckbox: any;
|
116
116
|
NCheckboxGroup: any;
|
117
|
+
NTooltip: any;
|
117
118
|
SearchOutline: 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<{}>>, {}>;
|
118
119
|
AddOutline: 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<{}>>, {}>;
|
119
120
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as n,watch as
|
1
|
+
import{defineComponent as e,ref as t,computed as n,watch as r,withDirectives as o,openBlock as i,createElementBlock as s,normalizeStyle as a,unref as c,createElementVNode as l,toDisplayString as u,createVNode as g,createCommentVNode as p,withCtx as m,Fragment as d,renderList as f,createBlock as h,createTextVNode as v,mergeProps as y,vShow as M}from"vue";import{NIcon as w,NTooltip as _,NPopover as k,NButton as C,NUpload as I,NUploadTrigger as x}from"naive-ui";import T from"./ChatAdd.vue.js";import{useState as b}from"../hooks/useState.js";import{useSession as E}from"../hooks/useSession.js";import{MESSAGE_TYPE as z,AV_STATUS as L}from"../constants/index.js";import"trtc-sdk-v5";import{simplifyMessage as j}from"../utils/index.js";import{emojis as R}from"../utils/emoji.js";import{uploadFileApi as q}from"../api/index.js";import{CloseCircleOutline as O,CallOutline as D,VideocamOutline as A}from"@vicons/ionicons5";import{xor as V,cloneDeep as K}from"lodash-es";import{uuidGenerator as F}from"../../../../shared/utils/index.js";const H={key:0,class:"reference-content-box"},U={class:"reference-content"},G=["innerHTML"],J={class:"tool-box"},N=l("i",{class:"chat--iconfont chat--icon-face"},null,-1),S={class:"emoji-box"},X=l("span",null,"默认表情",-1),B={class:"list-box"},$=["src"],P=l("i",{class:"chat--iconfont chat--icon-good"},null,-1),Q=l("i",{class:"chat--iconfont chat--icon-image"},null,-1),W=l("i",{class:"chat--iconfont chat--icon-folder"},null,-1),Y={class:"btn-box"},Z=l("span",{class:"tip"},"Enter 发送, Ctrl + Enter 换行",-1);var ee=e({__name:"ChatFooter",setup(e){const ee=t(),{state:te,sendMessage:ne}=b(),{isGroupChat:re}=E(te),oe=t(!1),ie=t(""),se=n((()=>({options:te.currentGroupUser,defaultValue:[te.userInfo]})));function ae(e,t=[]){const n=F(),r=[],o=t.length>0;te.showVideo||te.showMultipleVideo||(o?(r.push(...V(t,[te.userInfo.id])),Object.assign(te.currentAVMsg,{callMode:"call",checkedIds:r,strRoomId:n,chatMessageType:e}),te.showMultipleVideo=!0):ne({content:{chatMessageType:e,msg:"",avStatus:L.IN_CALL}}))}function ce(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(),ge()))}function le(){var e;ie.value=(null==(e=ee.value)?void 0:e.innerHTML)||""}async function ue(e,t){const{file:n,name:r}=e.file,o=new FormData;o.append("sender",te.userInfo.id),o.append("file",n);const i=await q(o);if(!i)return console.log("上传失败");pe({chatMessageType:t,msg:t===z.FILE?r:i,url:i})}function ge(){const{innerHTML:e="",innerText:t=""}=ee.value||{};if(ie.value.trim().length>2e3)return void console.log("请控制在2000字以内");if(!ie.value)return console.log("请输入内容");const n=e.split(t).find((e=>!!e));let r=z.TEXT,o="";if(n){if(t.replace(/\n$/,"")||(e.match(/<img[^>]*>/gi)||[]).length>1)r=z.BLEND,o=e;else if(e.includes(z.EMOJI)){r=z.EMOJI;const t=e.match(/data-msg\s*=\s*"([^"]*)"/);t&&(o=t[1])}else{r=z.IMAGE;const t=e.match(/src\s*=\s*"([^"]*)"/);t&&(o=t[1])}}else o=t.trim();o&&pe({msg:o,chatMessageType:r,origin:"btn"})}async function pe(e){const{chatMessageType:t=z.TEXT,msg:n,url:r,origin:o=""}=e,i={msg:n,chatMessageType:t};t===z.FILE&&(i.fileUrl=r),"btn"===o&&(ee.value.innerHTML="",ie.value=""),te.currentReferenceMsg&&(t===z.TEXT&&(i.referenceContent=K(te.currentReferenceMsg)),te.currentReferenceMsg=null),ne({content:i})}return r((()=>te.currentReferenceMsg),(e=>{var t;e&&(null==(t=ee.value)||t.focus())})),(e,t)=>o((i(),s("section",{class:"chat-footer",style:a({cursor:c(te).id?"default":"not-allowed"})},[c(te).currentReferenceMsg?(i(),s("div",H,[l("div",U,[l("span",null,u(c(te).currentReferenceMsg.senderName)+":",1),l("pre",{innerHTML:c(j)(c(te).currentReferenceMsg.content)},null,8,G)]),g(c(w),{component:c(O),onClick:t[0]||(t[0]=()=>c(te).currentReferenceMsg=null)},null,8,["component"])])):p("v-if",!0),l("div",J,[g(c(_),{"show-arrow":!1,trigger:"hover",placement:"top"},{trigger:m((()=>[g(c(k),{show:oe.value,"onUpdate:show":t[1]||(t[1]=e=>oe.value=e),placement:"top",trigger:"click","show-arrow":!1,"display-directive":"show",delay:0},{trigger:m((()=>[g(c(C),{quaternary:"",size:"tiny"},{icon:m((()=>[N])),_:1})])),default:m((()=>[l("div",S,[p(' <span>最近使用</span>\r\n\t\t\t\t\t<div class="list-box">\r\n\t\t\t\t\t\t<template v-for="(img, index) in images" :key="index">\r\n\t\t\t\t\t\t\t<i>\r\n\t\t\t\t\t\t\t\t<img :src="img" />\r\n\t\t\t\t\t\t\t</i>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</div> '),X,l("div",B,[(i(!0),s(d,null,f(c(R).default,(([e,t])=>(i(),h(c(_),{key:e,"show-arrow":!1,trigger:"hover"},{trigger:m((()=>[g(c(C),{quaternary:"",size:"tiny",onClick:()=>function(e){oe.value=!1,pe({chatMessageType:z.EMOJI,msg:e})}(e)},{icon:m((()=>[l("img",{src:t},null,8,$)])),_:2},1032,["onClick"])])),default:m((()=>[v(" "+u(e),1)])),_:2},1024)))),128))])])])),_:1},8,["show"])])),default:m((()=>[v(" 表情 ")])),_:1}),g(c(_),{"show-arrow":!1,trigger:"hover",placement:"top"},{trigger:m((()=>[g(c(C),{quaternary:"",size:"tiny",onClick:t[2]||(t[2]=()=>pe({chatMessageType:c(z).EMOJI,msg:0}))},{icon:m((()=>[P])),_:1})])),default:m((()=>[v(" 点赞 ")])),_:1}),g(c(I),{abstract:"",multiple:"",accept:"image/*",onChange:t[3]||(t[3]=e=>ue(e,c(z).IMAGE))},{default:m((()=>[g(c(x),{abstract:""},{default:m((({handleClick:e})=>[g(c(_),{"show-arrow":!1,trigger:"hover",placement:"top"},{trigger:m((()=>[g(c(C),{quaternary:"",size:"tiny",onClick:e},{icon:m((()=>[Q])),_:2},1032,["onClick"])])),default:m((()=>[v(" 上传图片 ")])),_:2},1024)])),_:1})])),_:1}),g(c(I),{abstract:"",multiple:"",accept:"video/*,.pdf,.doc.docx,,.zip,.xlsx,.txt",onChange:t[4]||(t[4]=e=>ue(e,c(z).FILE))},{default:m((()=>[g(c(x),{abstract:""},{default:m((({handleClick:e})=>[g(c(_),{"show-arrow":!1,trigger:"hover",placement:"top"},{trigger:m((()=>[g(c(C),{quaternary:"",size:"tiny",onClick:e},{icon:m((()=>[W])),_:2},1032,["onClick"])])),default:m((()=>[v(" 上传文件 ")])),_:2},1024)])),_:1})])),_:1}),c(re)?(i(),s(d,{key:0},[g(T,y(c(se),{onComfirm:t[5]||(t[5]=e=>ae(c(z).AUDIO,e))}),{trigger:m((()=>[g(c(_),{"show-arrow":!1,trigger:"hover",placement:"top"},{trigger:m((()=>[g(c(C),{quaternary:"",size:"tiny"},{icon:m((()=>[g(c(w),{size:"18",component:c(D)},null,8,["component"])])),_:1})])),default:m((()=>[v(" 语音通话 ")])),_:1})])),_:1},16),g(T,y(c(se),{onComfirm:t[6]||(t[6]=e=>ae(c(z).VIDEO,e))}),{trigger:m((()=>[g(c(_),{"show-arrow":!1,trigger:"hover",placement:"top"},{trigger:m((()=>[g(c(C),{quaternary:"",size:"tiny"},{icon:m((()=>[g(c(w),{size:"20",component:c(A)},null,8,["component"])])),_:1})])),default:m((()=>[v(" 视频会议 ")])),_:1})])),_:1},16)],64)):(i(),s(d,{key:1},[g(c(_),{"show-arrow":!1,trigger:"hover",placement:"top"},{trigger:m((()=>[g(c(C),{quaternary:"",size:"tiny",onClick:t[7]||(t[7]=()=>ae(c(z).AUDIO))},{icon:m((()=>[g(c(w),{size:"18",component:c(D)},null,8,["component"])])),_:1})])),default:m((()=>[v(" 语音通话 ")])),_:1}),g(c(_),{"show-arrow":!1,trigger:"hover",placement:"top"},{trigger:m((()=>[g(c(C),{quaternary:"",size:"tiny",onClick:t[8]||(t[8]=()=>ae(c(z).VIDEO))},{icon:m((()=>[g(c(w),{size:"20",component:c(A)},null,8,["component"])])),_:1})])),default:m((()=>[v(" 视频通话 ")])),_:1})],64))]),o(l("div",{ref_key:"inputRef",ref:ee,class:"input-box",contenteditable:"",onKeydown:ce,onInput:le},null,544),[[M,c(te).id]]),l("div",Y,[Z,g(c(C),{type:"primary",round:"",disabled:!ie.value,onClick:ge},{default:m((()=>[v("发送")])),_:1},8,["disabled"])])],4)),[[M,c(te).id]])}});export{ee as default};
|