cnhis-design-vue 3.2.7-beta.24 → 3.2.7-beta.25
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +87 -87
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- 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/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
|
+
```
|
@@ -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};
|
@@ -19,6 +19,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
19
19
|
NAvatar: any;
|
20
20
|
NIcon: any;
|
21
21
|
NButton: any;
|
22
|
+
NTooltip: any;
|
22
23
|
PersonProfile: import("vue").DefineComponent<{
|
23
24
|
userId: {
|
24
25
|
type: StringConstructor;
|
@@ -460,6 +461,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
460
461
|
NInput: any;
|
461
462
|
NCheckbox: any;
|
462
463
|
NCheckboxGroup: any;
|
464
|
+
NTooltip: any;
|
463
465
|
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<{}>>, {}>;
|
464
466
|
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<{}>>, {}>;
|
465
467
|
}, 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 o,computed as
|
1
|
+
import{defineComponent as e,ref as o,computed as t,openBlock as r,createElementBlock as i,Fragment as a,unref as s,createElementVNode as n,createVNode as l,withCtx as c,toDisplayString as u,createTextVNode as m,normalizeProps as h,guardReactiveProps as d,createCommentVNode as v}from"vue";import{NAvatar as p,NTooltip as f,NButton as g,NIcon as w}from"naive-ui";import{useState as _}from"../hooks/useState.js";import{useSession as b}from"../hooks/useSession.js";import"trtc-sdk-v5";import"date-fns";import"lodash-es";import"../utils/emoji.js";import y from"./PersonProfile.vue.js";import j from"./ChatSet.vue.js";import C from"./ChatFile.vue.js";import k from"./ChatRecord.vue.js";import z from"./ChatAdd.vue.js";import{PersonAddOutline as S}from"@vicons/ionicons5";const q={key:0,class:"chat-header box-shadow"},U={class:"chat-header__left"},I={class:"name"},G={class:"chat-header__right"},x=n("i",{class:"chat--iconfont chat--icon-image"},null,-1),P=n("i",{class:"chat--iconfont chat--icon-folder"},null,-1),A=n("i",{class:"chat--iconfont chat--icon-list-search"},null,-1),F=n("i",{class:"chat--iconfont chat--icon-set"},null,-1);var H=e({__name:"ChatHeader",setup(e){const{state:H}=_(),{isGroupChat:R}=b(H),V=o(!1),B=o(!1),D=o("image"),E=o(!1),J=t((()=>{const e=H.currentGroupUser.map((e=>e.id));return R.value?{mode:"join",disabledIds:e}:{mode:"create",defaultValue:H.currentGroupUser}}));function K(e){D.value=e,B.value=!0}return(e,o)=>(r(),i(a,null,[s(H).id?(r(),i("section",q,[n("div",U,[l(y,{"user-id":s(H).currentSessionItem.receiver,disabled:s(R)},{trigger:c((()=>[l(s(p),{round:"",size:30,src:s(H).currentSessionItem.avatar},null,8,["src"])])),_:1},8,["user-id","disabled"]),n("span",I,u(s(H).currentSessionItem.name),1)]),n("div",G,[l(s(f),{"show-arrow":!1,trigger:"hover",placement:"bottom"},{trigger:c((()=>[l(s(g),{quaternary:"",size:"tiny",onClick:o[0]||(o[0]=()=>K("image"))},{icon:c((()=>[x])),_:1})])),default:c((()=>[m(" 图片 ")])),_:1}),l(s(f),{"show-arrow":!1,trigger:"hover",placement:"bottom"},{trigger:c((()=>[l(s(g),{quaternary:"",size:"tiny",onClick:o[1]||(o[1]=()=>K("file"))},{icon:c((()=>[P])),_:1})])),default:c((()=>[m(" 文件 ")])),_:1}),l(z,h(d(s(J))),{trigger:c((()=>[l(s(f),{"show-arrow":!1,trigger:"hover",placement:"bottom"},{trigger:c((()=>[l(s(g),{quaternary:"",size:"tiny"},{icon:c((()=>[l(s(w),{size:"18",component:s(S)},null,8,["component"])])),_:1})])),default:c((()=>[m(" 添加成员 ")])),_:1})])),_:1},16),l(s(f),{"show-arrow":!1,trigger:"hover",placement:"bottom"},{trigger:c((()=>[l(s(g),{quaternary:"",size:"tiny",onClick:o[2]||(o[2]=()=>E.value=!0)},{icon:c((()=>[A])),_:1})])),default:c((()=>[m(" 聊天记录 ")])),_:1}),l(s(f),{"show-arrow":!1,trigger:"hover",placement:"bottom"},{trigger:c((()=>[l(s(g),{quaternary:"",size:"tiny",onClick:o[3]||(o[3]=()=>V.value=!0)},{icon:c((()=>[F])),_:1})])),default:c((()=>[m(" 聊天设置 ")])),_:1})])])):v("v-if",!0),l(j,{show:V.value,"onUpdate:show":o[4]||(o[4]=e=>V.value=e)},null,8,["show"]),l(C,{show:B.value,"onUpdate:show":o[5]||(o[5]=e=>B.value=e),type:D.value,visible:B.value},null,8,["show","type","visible"]),l(k,{show:E.value,"onUpdate:show":o[6]||(o[6]=e=>E.value=e),visible:E.value},null,8,["show","visible"])],64))}});export{H as default};
|