@web-utils/component 2.0.14 → 2.7.0

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.
Files changed (248) hide show
  1. package/dist/chunks/config.46422d7f.js +73 -0
  2. package/dist/chunks/{3a79781b.js → confirmable-mixin.3a79781b.js} +0 -0
  3. package/dist/chunks/dataformat.fb35ee10.js +61 -0
  4. package/dist/chunks/detail.a3249549.js +28 -0
  5. package/dist/chunks/dic.5f7e3523.js +132 -0
  6. package/dist/chunks/event.50c365eb.js +235 -0
  7. package/dist/chunks/{76680a03.js → form-input-mixin.ff5b58f7.js} +2 -2
  8. package/dist/chunks/{b4acd3a6.js → form-item-mixin.79f6eaff.js} +3 -1
  9. package/dist/chunks/{61ad06b2.js → form-pick-mixin.61ad06b2.js} +0 -0
  10. package/dist/chunks/init.352281f5.js +121 -0
  11. package/dist/chunks/{41a066be.js → input-number-mixin.41a066be.js} +0 -0
  12. package/dist/chunks/{5a78e0db.js → mixins.5a78e0db.js} +0 -0
  13. package/dist/chunks/packages.5d7a86c4.js +114 -0
  14. package/dist/chunks/permission.ce5d2121.js +16 -0
  15. package/dist/chunks/slot.1b8d2b1b.js +27 -0
  16. package/dist/chunks/{8c0142e0.js → tab-mixin.8c0142e0.js} +0 -0
  17. package/dist/chunks/util.5053d54e.js +264 -0
  18. package/dist/chunks/{97652d86.js → utils.97652d86.js} +0 -0
  19. package/dist/chunks/{f71045fc.js → utils.fa73de78.js} +1 -0
  20. package/dist/chunks/{5d4282fb.js → vueComponentNormalizer.71e2aa87.js} +3 -1
  21. package/dist/components/address-input/index.js +1 -1
  22. package/dist/components/affix/index.js +102 -0
  23. package/dist/components/affix/style.css +1 -0
  24. package/dist/components/array/index.js +156 -0
  25. package/dist/components/array/style.css +1 -0
  26. package/dist/components/article/index.js +93 -0
  27. package/dist/components/article/style.css +1 -0
  28. package/dist/components/aside-menu/index.js +1 -1
  29. package/dist/components/avatar/index.js +106 -0
  30. package/dist/components/avatar/style.css +1 -0
  31. package/dist/components/awesome-button/index.js +1 -1
  32. package/dist/components/base.css +1 -1
  33. package/dist/components/capsule-tab/index.js +1 -1
  34. package/dist/components/card/index.js +130 -0
  35. package/dist/components/card/style.css +1 -0
  36. package/dist/components/carousel/index.js +70 -0
  37. package/dist/components/carousel/style.css +1 -0
  38. package/dist/components/chat/index.js +567 -0
  39. package/dist/components/chat/style.css +1 -0
  40. package/dist/components/chunk-file-uploader/index.js +2 -2
  41. package/dist/components/chunk-file-uploader-button/index.js +2 -2
  42. package/dist/components/chunk-file-uploader-drop/index.js +2 -2
  43. package/dist/components/chunk-file-uploader-file/index.js +2 -2
  44. package/dist/components/chunk-file-uploader-files/index.js +2 -2
  45. package/dist/components/chunk-file-uploader-list/index.js +2 -2
  46. package/dist/components/chunk-file-uploader-un-support/index.js +2 -2
  47. package/dist/components/code/index.js +66 -0
  48. package/dist/components/code-mirror-editor/index.js +4 -1
  49. package/dist/components/color-picker/index.js +1 -1
  50. package/dist/components/column/index.js +114 -0
  51. package/dist/components/column-default/index.js +105 -0
  52. package/dist/components/column-dynamic/index.js +93 -0
  53. package/dist/components/column-menu/index.js +286 -0
  54. package/dist/components/column-slot/index.js +265 -0
  55. package/dist/components/comment/index.js +94 -0
  56. package/dist/components/comment/style.css +1 -0
  57. package/dist/components/confirm-button/index.js +2 -2
  58. package/dist/components/confirmable/index.js +2 -2
  59. package/dist/components/context-menu/index.js +11 -1
  60. package/dist/components/count-up/index.js +120 -0
  61. package/dist/components/custom-scrollbar/index.js +2 -2
  62. package/dist/components/data-box/index.js +97 -0
  63. package/dist/components/data-box/style.css +1 -0
  64. package/dist/components/data-card/index.js +98 -0
  65. package/dist/components/data-card/style.css +1 -0
  66. package/dist/components/data-cardtext/index.js +82 -0
  67. package/dist/components/data-cardtext/style.css +1 -0
  68. package/dist/components/data-display/index.js +93 -0
  69. package/dist/components/data-display/style.css +1 -0
  70. package/dist/components/data-icons/index.js +104 -0
  71. package/dist/components/data-icons/style.css +1 -0
  72. package/dist/components/data-imgtext/index.js +106 -0
  73. package/dist/components/data-imgtext/style.css +1 -0
  74. package/dist/components/data-operatext/index.js +99 -0
  75. package/dist/components/data-operatext/style.css +1 -0
  76. package/dist/components/data-panel/index.js +93 -0
  77. package/dist/components/data-panel/style.css +1 -0
  78. package/dist/components/data-pay/index.js +149 -0
  79. package/dist/components/data-pay/style.css +1 -0
  80. package/dist/components/data-price/index.js +84 -0
  81. package/dist/components/data-price/style.css +1 -0
  82. package/dist/components/data-progress/index.js +97 -0
  83. package/dist/components/data-progress/style.css +1 -0
  84. package/dist/components/data-rotate/index.js +96 -0
  85. package/dist/components/data-rotate/style.css +1 -0
  86. package/dist/components/data-table-picker/index.js +2 -2
  87. package/dist/components/data-tabs/index.js +94 -0
  88. package/dist/components/data-tabs/style.css +1 -0
  89. package/dist/components/dialog-column/index.js +138 -0
  90. package/dist/components/dialog-excel/index.js +214 -0
  91. package/dist/components/dialog-filter/index.js +245 -0
  92. package/dist/components/dialog-form/index.js +275 -0
  93. package/dist/components/draggable/index.js +384 -0
  94. package/dist/components/draggable/style.css +1 -0
  95. package/dist/components/dynamic-table/index.js +1 -1
  96. package/dist/components/e-charts/index.js +7 -1
  97. package/dist/components/editable-progress/index.js +1 -1
  98. package/dist/components/editable-tree/index.js +2 -2
  99. package/dist/components/egd-collapse/index.js +1 -1
  100. package/dist/components/egd-collapse-item/index.js +1 -1
  101. package/dist/components/element-dialog/index.js +1 -1
  102. package/dist/components/empty/index.js +59 -0
  103. package/dist/components/empty/style.css +1 -0
  104. package/dist/components/empty-view/index.js +1 -1
  105. package/dist/components/error-view/index.js +1 -1
  106. package/dist/components/flex-column/index.js +2 -2
  107. package/dist/components/flex-item/index.js +2 -2
  108. package/dist/components/flex-row/index.js +2 -2
  109. package/dist/components/flex-scroller/index.js +1 -1
  110. package/dist/components/flow/index.js +278 -0
  111. package/dist/components/flow/style.css +1 -0
  112. package/dist/components/flow-node/index.js +102 -0
  113. package/dist/components/form-button/index.js +2 -2
  114. package/dist/components/form-cascader/index.js +4 -4
  115. package/dist/components/form-checkbox-group/index.js +4 -4
  116. package/dist/components/form-date-picker/index.js +4 -4
  117. package/dist/components/form-group/index.js +122 -0
  118. package/dist/components/form-group/style.css +1 -0
  119. package/dist/components/form-holder/index.js +23 -2
  120. package/dist/components/form-input/index.js +3 -3
  121. package/dist/components/form-input-email/index.js +3 -3
  122. package/dist/components/form-input-id-card/index.js +3 -3
  123. package/dist/components/form-input-number/index.js +4 -4
  124. package/dist/components/form-input-phone-number/index.js +3 -3
  125. package/dist/components/form-input-time/index.js +3 -3
  126. package/dist/components/form-item/index.js +2 -2
  127. package/dist/components/form-item-config-provider/index.js +1 -1
  128. package/dist/components/form-item-group/index.js +1 -1
  129. package/dist/components/form-radio-group/index.js +4 -4
  130. package/dist/components/form-select/index.js +4 -4
  131. package/dist/components/form-switch/index.js +3 -3
  132. package/dist/components/form-temp/index.js +149 -0
  133. package/dist/components/form-textarea/index.js +3 -3
  134. package/dist/components/form-view/index.js +1 -1
  135. package/dist/components/fy-cascader/index.js +132 -0
  136. package/dist/components/fy-checkbox/index.js +116 -0
  137. package/dist/components/fy-checkbox/style.css +1 -0
  138. package/dist/components/fy-curd/index.js +846 -0
  139. package/dist/components/fy-curd/style.css +1 -0
  140. package/dist/components/fy-date/index.js +84 -0
  141. package/dist/components/fy-date/style.css +1 -0
  142. package/dist/components/fy-dialog-form/index.js +278 -0
  143. package/dist/components/fy-dialog-form/style.css +1 -0
  144. package/dist/components/fy-dynamic/index.js +335 -0
  145. package/dist/components/fy-dynamic/style.css +1 -0
  146. package/dist/components/fy-form/index.js +754 -0
  147. package/dist/components/fy-form/style.css +1 -0
  148. package/dist/components/fy-form-menu/index.js +95 -0
  149. package/dist/components/fy-input/index.js +162 -0
  150. package/dist/components/fy-input-color/index.js +96 -0
  151. package/dist/components/fy-input-icon/index.js +161 -0
  152. package/dist/components/fy-input-icon/style.css +1 -0
  153. package/dist/components/fy-input-map/index.js +275 -0
  154. package/dist/components/fy-input-map/style.css +1 -0
  155. package/dist/components/fy-input-number/index.js +87 -0
  156. package/dist/components/fy-input-table/index.js +172 -0
  157. package/dist/components/fy-input-table/style.css +1 -0
  158. package/dist/components/fy-input-tree/index.js +265 -0
  159. package/dist/components/fy-input-tree/style.css +1 -0
  160. package/dist/components/fy-radio/index.js +68 -0
  161. package/dist/components/fy-radio/style.css +1 -0
  162. package/dist/components/fy-rate/index.js +105 -0
  163. package/dist/components/fy-rate/style.css +1 -0
  164. package/dist/components/fy-select/index.js +223 -0
  165. package/dist/components/fy-select/style.css +1 -0
  166. package/dist/components/fy-slider/index.js +79 -0
  167. package/dist/components/fy-switch/index.js +73 -0
  168. package/dist/components/fy-time/index.js +95 -0
  169. package/dist/components/fy-title/index.js +40 -0
  170. package/dist/components/fy-title/style.css +1 -0
  171. package/dist/components/fy-upload/index.js +704 -0
  172. package/dist/components/fy-upload/style.css +1 -0
  173. package/dist/components/guide-steps/index.js +1 -1
  174. package/dist/components/header-menu/index.js +238 -0
  175. package/dist/components/header-search/index.js +246 -0
  176. package/dist/components/icon-card/index.js +1 -1
  177. package/dist/components/icon-temp/index.js +50 -0
  178. package/dist/components/icon-temp/style.css +1 -0
  179. package/dist/components/iframe-window/index.js +1 -1
  180. package/dist/components/image-viewer/index.js +1 -1
  181. package/dist/components/input-number/index.js +2 -2
  182. package/dist/components/input-number-range/index.js +1 -1
  183. package/dist/components/keep-view-alive/index.js +6 -2
  184. package/dist/components/keyboard/index.js +389 -0
  185. package/dist/components/keyboard/style.css +1 -0
  186. package/dist/components/license/index.js +134 -0
  187. package/dist/components/loading-view/index.js +1 -1
  188. package/dist/components/login/index.js +244 -0
  189. package/dist/components/login/style.css +1 -0
  190. package/dist/components/name-avatar/index.js +66 -0
  191. package/dist/components/name-avatar/style.css +1 -0
  192. package/dist/components/nav-bar/index.js +1 -1
  193. package/dist/components/not-implement/index.js +1 -1
  194. package/dist/components/notice/index.js +143 -0
  195. package/dist/components/notice/style.css +1 -0
  196. package/dist/components/page/index.js +1 -1
  197. package/dist/components/page-header/index.js +1 -1
  198. package/dist/components/page-index/index.js +1 -1
  199. package/dist/components/page-index-top/index.js +1 -1
  200. package/dist/components/page-skeleton/index.js +1 -1
  201. package/dist/components/page-skeleton-new/index.js +1 -1
  202. package/dist/components/pageable-table/index.js +6 -2
  203. package/dist/components/pageable-view/index.js +7 -2
  204. package/dist/components/photo-swipe/index.js +7 -1
  205. package/dist/components/progress/index.js +60 -0
  206. package/dist/components/queue/index.js +76 -0
  207. package/dist/components/record-video/index.js +173 -0
  208. package/dist/components/record-video/style.css +1 -0
  209. package/dist/components/resize-observer/index.js +2 -2
  210. package/dist/components/search/index.js +142 -0
  211. package/dist/components/search/style.css +1 -0
  212. package/dist/components/search-popover/index.js +1 -1
  213. package/dist/components/sign/index.js +128 -0
  214. package/dist/components/sign/style.css +1 -0
  215. package/dist/components/sign-panel/index.js +14 -1
  216. package/dist/components/skeleton/index.js +82 -0
  217. package/dist/components/skeleton/style.css +1 -0
  218. package/dist/components/split-pane/index.js +7 -1
  219. package/dist/components/stateful/index.js +1 -1
  220. package/dist/components/static-pageable-table/index.js +1 -1
  221. package/dist/components/swiper/index.js +1 -1
  222. package/dist/components/tab/index.js +4 -2
  223. package/dist/components/tab-item/index.js +2 -2
  224. package/dist/components/table-column/index.js +1 -1
  225. package/dist/components/table-page/index.js +129 -0
  226. package/dist/components/table-view/index.js +2 -2
  227. package/dist/components/tabs/index.js +90 -0
  228. package/dist/components/tabs/style.css +0 -0
  229. package/dist/components/tag-render/index.js +1 -1
  230. package/dist/components/text-ellipsis/index.js +107 -0
  231. package/dist/components/text-ellipsis/style.css +1 -0
  232. package/dist/components/tinymce-editor/index.js +1 -1
  233. package/dist/components/tinymce-wrapper/index.js +1 -1
  234. package/dist/components/toolbar/index.js +1 -1
  235. package/dist/components/toolbar-button/index.js +1 -1
  236. package/dist/components/tree/index.js +427 -0
  237. package/dist/components/tree/style.css +1 -0
  238. package/dist/components/trigger/index.js +1 -1
  239. package/dist/components/verify/index.js +80 -0
  240. package/dist/components/verify/style.css +1 -0
  241. package/dist/components/vue-tags-input/index.js +115 -1
  242. package/dist/components/watermark/index.js +20 -2
  243. package/dist/index.css +4128 -745
  244. package/dist/index.es.js +21634 -7064
  245. package/package.json +20 -4
  246. package/web-types.json +12777 -2788
  247. package/dist/components/x-dialog/index.js +0 -173
  248. package/dist/components/x-dialog/style.css +0 -1
@@ -0,0 +1,567 @@
1
+ import { formatDate as d } from "@web-utils/core";
2
+ import { s as l } from "../../chunks/util.5053d54e.js";
3
+ import { n as u } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
4
+ var m = function() {
5
+ var t = this, o = t.$createElement, e = t._self._c || o;
6
+ return e("div", {
7
+ staticClass: "avue-chat",
8
+ style: t.heightStyleName,
9
+ on: {
10
+ keyup: function(i) {
11
+ return !i.type.indexOf("key") && t._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : t.handleSend.apply(null, arguments);
12
+ }
13
+ }
14
+ }, [e("audio", {
15
+ ref: "chatAudio"
16
+ }, [e("source", {
17
+ attrs: {
18
+ src: t.audio[0],
19
+ type: "audio/ogg"
20
+ }
21
+ }), e("source", {
22
+ attrs: {
23
+ src: t.audio[1],
24
+ type: "audio/mpeg"
25
+ }
26
+ }), e("source", {
27
+ attrs: {
28
+ src: t.audio[2],
29
+ type: "audio/wav"
30
+ }
31
+ })]), e("div", {
32
+ staticClass: "web__logo"
33
+ }, [e("img", {
34
+ staticClass: "web__logo-img",
35
+ attrs: {
36
+ src: t.config.img,
37
+ alt: ""
38
+ }
39
+ }), e("div", {
40
+ staticClass: "web__logo-info"
41
+ }, [e("p", {
42
+ staticClass: "web__logo-name"
43
+ }, [t._v(" " + t._s(t.config.name) + " ")]), e("p", {
44
+ staticClass: "web__logo-dept"
45
+ }, [t._v(" " + t._s(t.config.dept) + " ")])]), t._t("header")], 2), e("div", {
46
+ staticClass: "web__content"
47
+ }, [e("div", {
48
+ style: t.widthStyleName
49
+ }, [e("div", {
50
+ ref: "main",
51
+ staticClass: "web__main"
52
+ }, t._l(t.list, function(i, a) {
53
+ return e("div", {
54
+ key: a,
55
+ staticClass: "web__main-item",
56
+ class: {
57
+ "web__main-item--mine": i.mine
58
+ }
59
+ }, [e("div", {
60
+ staticClass: "web__main-user"
61
+ }, [e("img", {
62
+ attrs: {
63
+ src: i.img
64
+ }
65
+ }), e("cite", [t._v(" " + t._s(i.name) + " "), e("i", [t._v(t._s(i.date))])])]), e("div", {
66
+ staticClass: "web__main-text"
67
+ }, [e("div", {
68
+ staticClass: "web__main-arrow"
69
+ }), e("span", {
70
+ ref: "content",
71
+ refInFor: !0,
72
+ domProps: {
73
+ innerHTML: t._s(t.handleDetail(i.text.text))
74
+ }
75
+ }), i.text.list ? t._e() : e("ul", {
76
+ staticClass: " web__main-list"
77
+ }, t._l(i.text.list, function(s, n) {
78
+ return e("li", {
79
+ key: n,
80
+ on: {
81
+ click: function(c) {
82
+ return t.handleItemMsg(s);
83
+ }
84
+ }
85
+ }, [t._v(" " + t._s(s.text) + " ")]);
86
+ }), 0)])]);
87
+ }), 0), e("div", {
88
+ staticClass: "web__footer",
89
+ style: t.widthStyleName
90
+ }, [e("div", {
91
+ staticClass: "web__tools"
92
+ }, [t.tools.img ? e("i", {
93
+ staticClass: "el-icon-picture-outline",
94
+ on: {
95
+ click: function(i) {
96
+ return t.handleUpload("img");
97
+ }
98
+ }
99
+ }) : t._e(), t.tools.video ? e("i", {
100
+ staticClass: "el-icon-video-camera",
101
+ on: {
102
+ click: function(i) {
103
+ return t.handleUpload("video");
104
+ }
105
+ }
106
+ }) : t._e(), t.tools.file ? e("i", {
107
+ staticClass: "el-icon-folder-opened",
108
+ on: {
109
+ click: function(i) {
110
+ return t.handleUpload("file");
111
+ }
112
+ }
113
+ }) : t._e()]), e("div", {
114
+ staticClass: "web__msg"
115
+ }, [e("textarea", {
116
+ directives: [{
117
+ name: "model",
118
+ rawName: "v-model",
119
+ value: t.msg,
120
+ expression: "msg"
121
+ }],
122
+ staticClass: "web__msg-input",
123
+ attrs: {
124
+ rows: "2",
125
+ placeholder: t.placeholder
126
+ },
127
+ domProps: {
128
+ value: t.msg
129
+ },
130
+ on: {
131
+ input: function(i) {
132
+ i.target.composing || (t.msg = i.target.value);
133
+ }
134
+ }
135
+ }), t._v(" "), e("div", {
136
+ staticClass: "web__msg-menu"
137
+ }, [e("ElDropdown", {
138
+ staticClass: "web__msg-submit",
139
+ attrs: {
140
+ "split-button": "",
141
+ type: "primary",
142
+ size: "mini",
143
+ trigger: "click"
144
+ },
145
+ on: {
146
+ click: t.handleSend
147
+ }
148
+ }, [t._v(" 发送 "), e("ElDropdownMenu", {
149
+ attrs: {
150
+ slot: "dropdown"
151
+ },
152
+ slot: "dropdown"
153
+ }, [e("ElDropdownItem", [e("ElPopover", {
154
+ attrs: {
155
+ placement: "top",
156
+ width: "160"
157
+ },
158
+ model: {
159
+ value: t.visible,
160
+ callback: function(i) {
161
+ t.visible = i;
162
+ },
163
+ expression: "visible"
164
+ }
165
+ }, [e("ElInput", {
166
+ staticStyle: {
167
+ "margin-bottom": "10px"
168
+ },
169
+ attrs: {
170
+ size: "mini",
171
+ rows: 3,
172
+ "show-word-limit": "",
173
+ maxlength: "100",
174
+ placeholder: "请输入快捷回复语",
175
+ type: "textarea"
176
+ },
177
+ model: {
178
+ value: t.keys,
179
+ callback: function(i) {
180
+ t.keys = i;
181
+ },
182
+ expression: "keys"
183
+ }
184
+ }), e("div", {
185
+ staticStyle: {
186
+ "text-align": "right",
187
+ margin: "0"
188
+ }
189
+ }, [e("ElButton", {
190
+ attrs: {
191
+ size: "mini",
192
+ type: "text"
193
+ },
194
+ on: {
195
+ click: function(i) {
196
+ t.visible = !1;
197
+ }
198
+ }
199
+ }, [t._v(" 取消 ")]), e("ElButton", {
200
+ attrs: {
201
+ type: "primary",
202
+ size: "mini"
203
+ },
204
+ on: {
205
+ click: t.addKey
206
+ }
207
+ }, [t._v(" 确定 ")])], 1), e("ElButton", {
208
+ attrs: {
209
+ slot: "reference",
210
+ type: "text",
211
+ icon: "el-icon-plus"
212
+ },
213
+ slot: "reference"
214
+ })], 1)], 1), e("ElScrollbar", {
215
+ staticStyle: {
216
+ height: "100px"
217
+ }
218
+ }, t._l(t.keylist, function(i, a) {
219
+ return e("ElDropdownItem", {
220
+ key: a,
221
+ nativeOn: {
222
+ click: function(s) {
223
+ return t.sendKey(i);
224
+ }
225
+ }
226
+ }, [e("ElTooltip", {
227
+ attrs: {
228
+ effect: "dark",
229
+ content: i,
230
+ placement: "top"
231
+ }
232
+ }, [e("span", [t._v(" " + t._s(i.substr(0, 10)) + t._s(i.length > 10 ? "..." : ""))])])], 1);
233
+ }), 1)], 1)], 1)], 1)])])]), t._t("default")], 2), t.upload.box ? e("div", [e("ElementDialog", {
234
+ attrs: {
235
+ title: t.upload.title,
236
+ "body-padding": !1,
237
+ visible: t.upload.box,
238
+ width: "30%"
239
+ },
240
+ on: {
241
+ "update:visible": function(i) {
242
+ return t.$set(t.upload, "box", i);
243
+ }
244
+ }
245
+ }, [e("ElForm", {
246
+ ref: "form",
247
+ attrs: {
248
+ model: t.upload
249
+ }
250
+ }, [e("ElFormItem", {
251
+ attrs: {
252
+ prop: "src",
253
+ rules: [{
254
+ required: !0,
255
+ message: "地址不能为空"
256
+ }]
257
+ }
258
+ }, [e("ElInput", {
259
+ staticStyle: {
260
+ "margin-bottom": "10px"
261
+ },
262
+ attrs: {
263
+ size: "mini",
264
+ rows: 4,
265
+ "show-word-limit": "",
266
+ maxlength: "100",
267
+ placeholder: "请输入地址",
268
+ type: "textarea"
269
+ },
270
+ model: {
271
+ value: t.upload.src,
272
+ callback: function(i) {
273
+ t.$set(t.upload, "src", i);
274
+ },
275
+ expression: "upload.src"
276
+ }
277
+ })], 1)], 1), e("span", {
278
+ staticClass: "dialog-footer",
279
+ attrs: {
280
+ slot: "footer"
281
+ },
282
+ slot: "footer"
283
+ }, [e("ElButton", {
284
+ attrs: {
285
+ size: "small"
286
+ },
287
+ on: {
288
+ click: function(i) {
289
+ t.upload.box = !1;
290
+ }
291
+ }
292
+ }, [t._v("取 消")]), e("ElButton", {
293
+ attrs: {
294
+ type: "primary",
295
+ size: "small"
296
+ },
297
+ on: {
298
+ click: t.uploadSubmit
299
+ }
300
+ }, [t._v("确 定")])], 1)], 1)], 1) : t._e(), t.show ? e("div", [e("ElementDialog", {
301
+ staticClass: "web__dialog",
302
+ attrs: {
303
+ visible: t.show,
304
+ "body-padding": !1,
305
+ title: "预览",
306
+ width: "40%",
307
+ "before-close": t.handleClose
308
+ },
309
+ on: {
310
+ "update:visible": function(i) {
311
+ t.show = i;
312
+ }
313
+ }
314
+ }, [t.imgSrc ? e("img", {
315
+ staticStyle: {
316
+ width: "100%",
317
+ "object-fit": "cover"
318
+ },
319
+ attrs: {
320
+ src: t.imgSrc
321
+ }
322
+ }) : t._e(), t.videoSrc ? e("video", {
323
+ staticStyle: {
324
+ width: "100%",
325
+ "object-fit": "cover"
326
+ },
327
+ attrs: {
328
+ src: t.videoSrc,
329
+ controls: "controls"
330
+ }
331
+ }) : t._e(), t.audioSrc ? e("audio", {
332
+ staticStyle: {
333
+ width: "100%",
334
+ "object-fit": "cover"
335
+ },
336
+ attrs: {
337
+ src: t.audioSrc,
338
+ controls: "controls"
339
+ }
340
+ }) : t._e()])], 1) : t._e()]);
341
+ }, f = [];
342
+ const h = {
343
+ name: "Chat",
344
+ props: {
345
+ beforeOpen: Function,
346
+ tools: {
347
+ type: Object,
348
+ default: () => ({
349
+ img: !0,
350
+ video: !0,
351
+ file: !0
352
+ })
353
+ },
354
+ placeholder: {
355
+ type: String,
356
+ default: "请输入..."
357
+ },
358
+ width: {
359
+ type: [String, Number],
360
+ default: "100%"
361
+ },
362
+ height: {
363
+ type: [String, Number],
364
+ default: "520px"
365
+ },
366
+ value: {
367
+ type: String
368
+ },
369
+ notice: {
370
+ type: Boolean,
371
+ default: !0
372
+ },
373
+ audio: {
374
+ type: Array,
375
+ default: () => [
376
+ "https://www.helloweba.net/demo/notifysound/notify.ogg",
377
+ "https://www.helloweba.net/demo/notifysound/notify.mp3",
378
+ "https://www.helloweba.net/demo/notifysound/notify.wav"
379
+ ]
380
+ },
381
+ config: {
382
+ type: Object,
383
+ default: () => ({})
384
+ },
385
+ keylist: {
386
+ type: Array,
387
+ default: () => []
388
+ },
389
+ list: {
390
+ type: Array,
391
+ default: () => []
392
+ }
393
+ },
394
+ data() {
395
+ return {
396
+ upload: {
397
+ box: !1,
398
+ src: "",
399
+ type: "",
400
+ title: ""
401
+ },
402
+ visible: !1,
403
+ imgSrc: "",
404
+ videoSrc: "",
405
+ audioSrc: "",
406
+ keys: "",
407
+ show: !1
408
+ };
409
+ },
410
+ computed: {
411
+ msg: {
412
+ get() {
413
+ return this.value;
414
+ },
415
+ set(t) {
416
+ this.$emit("input", t), this.$emit("change", t);
417
+ }
418
+ },
419
+ heightStyleName() {
420
+ return {
421
+ height: l(this.height)
422
+ };
423
+ },
424
+ widthStyleName() {
425
+ return {
426
+ width: l(this.width)
427
+ };
428
+ },
429
+ msgActive() {
430
+ return this.msg.replace(/[\r\n]/g, "");
431
+ }
432
+ },
433
+ methods: {
434
+ uploadSubmit() {
435
+ this.$refs.form.validate((t) => {
436
+ t && (this.upload.box = !1, this.$emit("submit", this.getDetail(this.upload)));
437
+ });
438
+ },
439
+ handleUpload(t) {
440
+ this.upload.type = t, this.upload.src = "", t === "img" ? this.upload.title = "图片上传" : t === "video" ? this.upload.title = "视频上传" : t === "file" && (this.upload.title = "文件上传"), this.upload.box = !0;
441
+ },
442
+ handleClose(t) {
443
+ this.imgSrc = void 0, this.videoSrc = void 0, this.audioSrc = void 0, t();
444
+ },
445
+ addKey() {
446
+ this.keys !== "" && (this.$emit("keyadd", this.keys), this.keys = ""), this.visible = !1;
447
+ },
448
+ sendKey(t) {
449
+ this.$emit("keysend", t);
450
+ },
451
+ getAudio() {
452
+ this.$refs.chatAudio.play();
453
+ },
454
+ getNotification(t) {
455
+ const o = this, e = Notification || window.Notification;
456
+ if (e) {
457
+ let a = function() {
458
+ e.requestPermission(function(n) {
459
+ n === "granted" ? s() : console.log("用户无情残忍的拒绝了你!!!");
460
+ });
461
+ }, s = function() {
462
+ const n = new Notification(o.config.name, {
463
+ body: t,
464
+ icon: o.config.img
465
+ });
466
+ n.onshow = function() {
467
+ o.getAudio(), setTimeout(() => {
468
+ n.close();
469
+ }, 2500);
470
+ }, n.onclick = function(c) {
471
+ n.close();
472
+ };
473
+ };
474
+ const i = e.permission;
475
+ i === "granted" ? s() : i === "denied" ? console.log("用户拒绝了你!!!") : a();
476
+ }
477
+ },
478
+ //mine为'我'的对话
479
+ //text为内容
480
+ pushMsg(t = {}) {
481
+ const o = t.mine === !0, e = t.text || {}, a = {
482
+ date: t.date || d(Date.now(), "YYYY-MM-DD HH:mm:ss"),
483
+ text: (() => typeof e != "object" ? {
484
+ text: e
485
+ } : e)(),
486
+ mine: o,
487
+ img: o ? this.config.myImg : this.config.img,
488
+ name: o ? this.config.myName : this.config.name
489
+ };
490
+ this.list.push(a), setTimeout(() => {
491
+ this.setScroll();
492
+ }, 50);
493
+ },
494
+ setScroll(t) {
495
+ this.$nextTick(() => {
496
+ this.$refs.main.scrollTop = t || this.$refs.main.scrollHeight;
497
+ });
498
+ },
499
+ //用户主动发送
500
+ handleSend() {
501
+ this.msgActive && this.$emit("submit");
502
+ },
503
+ //选择列表
504
+ handleItemMsg(t) {
505
+ this.$emit("submit", t.ask);
506
+ },
507
+ //处理排版
508
+ handleDetail(t = "") {
509
+ let o = t;
510
+ return setTimeout(() => {
511
+ (this.$refs.content || []).forEach((i) => {
512
+ for (let a = 0; a < i.children.length; a++) {
513
+ const s = i.children[a];
514
+ s.getAttribute("data-flag") != 0 && (s.setAttribute("data-flag", 0), s.onclick = () => {
515
+ this.handleEvent(s.dataset);
516
+ }, s.tagName === "IMG" ? (s.className = "web__msg--img", s.src = s.getAttribute("data-src")) : s.tagName === "VIDEO" ? (s.className = "web__msg--video", s.src = s.getAttribute("data-src")) : s.tagName === "AUDIO" ? (s.className = "web__msg--audio", s.controls = "controls", s.src = s.getAttribute("data-src")) : s.tagName === "FILE" ? (s.className = "web__msg--file", s.innerHTML = `<h2>File</h2><span>${s.getAttribute("data-name")}</span>`) : s.tagName === "MAP" && (s.className = "web__msg--file web__msg--map", s.innerHTML = `<h2>Map</h2><span>${s.getAttribute("data-longitude")} , ${s.getAttribute("data-latitude")}<br />${s.getAttribute("data-address")}</span>`), this.setScroll());
517
+ }
518
+ });
519
+ }, 0), o;
520
+ },
521
+ getDetail(t = {}) {
522
+ const { type: o, src: e, name: i, longitude: a, latitude: s, address: n } = t;
523
+ if (o === "img")
524
+ return `<img data-type="IMG" data-src="${e}" />`;
525
+ if (o === "video")
526
+ return `<video data-type="VIDEO" data-src="${e}"></video>`;
527
+ if (o === "audio")
528
+ return `<audio data-type="AUDIO" data-src="${e}"></audio>`;
529
+ if (o === "file")
530
+ return `<file data-type="FILE" data-name="${i}" data-src="${e}"></file>`;
531
+ if (o === "map")
532
+ return `<map data-type="MAP" data-src="${e}" data-address="${n} "data-latitude="${s}" data-longitude="${a}"></map>`;
533
+ },
534
+ //处理事件
535
+ handleEvent(t) {
536
+ const o = () => {
537
+ t.type === "IMG" ? (this.imgSrc = t.src, this.show = !0) : t.type === "VIDEO" ? (this.videoSrc = t.src, this.show = !0) : t.type === "AUDIO" ? (this.audioSrc = t.src, this.show = !0) : t.type === "FILE" && window.open(t.src);
538
+ };
539
+ typeof this.beforeOpen == "function" ? this.beforeOpen(t, o) : o();
540
+ },
541
+ rootSendMsg(t) {
542
+ this.pushMsg({
543
+ text: t
544
+ }), this.notice && this.getNotification(t.text || t);
545
+ }
546
+ }
547
+ }, r = {};
548
+ var p = /* @__PURE__ */ u(
549
+ h,
550
+ m,
551
+ f,
552
+ !1,
553
+ g,
554
+ null,
555
+ null,
556
+ null
557
+ );
558
+ function g(t) {
559
+ for (let o in r)
560
+ this[o] = r[o];
561
+ }
562
+ const b = /* @__PURE__ */ function() {
563
+ return p.exports;
564
+ }();
565
+ export {
566
+ b as default
567
+ };
@@ -0,0 +1 @@
1
+ .avue-chat{box-shadow:1px 2px 10px #eee;position:relative;background-color:#fcfcfc}.avue-chat ul,.avue-chat li{padding:0;margin:0}.avue-chat li{list-style:none;cursor:pointer}.avue-chat .web__content{height:100%;display:flex}.avue-chat .web__main{height:calc(100% - 200px);padding:15px 15px 20px;overflow-x:hidden;overflow-y:auto;box-sizing:border-box}.avue-chat .web__logo{background-color:#409eff;display:flex;padding:15px 12px;margin:0 auto;vertical-align:middle}.avue-chat .web__logo-img{margin-top:3px;width:35px;height:35px;border-radius:100%;box-shadow:0 3px 3px #0000001a}.avue-chat .web__logo-info{margin-left:10px}.avue-chat .web__logo-name{position:relative;margin-top:5px;font-size:13px}.avue-chat .web__logo-dept{margin-top:1px;font-size:12px}.avue-chat .web__logo-name,.avue-chat .web__logo-dept{color:#fff;margin:0;padding:0;width:175px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.avue-chat .web__main-item{position:relative;font-size:0;margin-bottom:10px;padding-left:60px;min-height:68px}.avue-chat .web__main-user,.avue-chat .web__main-text{display:inline-block;vertical-align:top;font-size:14px}.avue-chat .web__main-user{position:absolute;left:3px}.avue-chat .web__main-user img{width:40px;height:40px;border-radius:100%}.avue-chat .web__main-user cite{position:absolute;left:60px;top:-2px;width:500px;line-height:24px;font-size:12px;white-space:nowrap;color:#999;text-align:left;font-style:normal}.avue-chat .web__main-user cite i{padding-left:15px;font-style:normal}.avue-chat .web__main-text{position:relative;line-height:22px;margin-top:25px;padding:8px 15px;background-color:#f3f3f3;border-radius:3px;border:1px solid #f0f0f0;color:#000;word-break:break-all}.avue-chat .web__main-arrow{top:6px;left:-8px;position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;border-width:8px;border-left-width:0;border-right-color:#ebeef5}.avue-chat .web__main-arrow:after{content:" ";top:-7px;left:1px;position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;border-width:7px;border-left-width:0;border-right-color:#fff}.avue-chat .web__main-item--mine .web__main-text .web__main-arrow{left:auto;right:-5px;border-color:transparent;border-style:solid;border-width:8px;border-right-width:0;border-left-color:#409eff}.avue-chat .web__main-item--mine .web__main-text .web__main-arrow:after{left:auto;right:-2px;border-color:transparent;border-style:solid;border-width:7px;border-right-width:0;border-left-color:#409eff}.avue-chat .web__main-list{margin:10px 0}.avue-chat .web__main-list li{height:30px;color:#409eff;line-height:30px}.avue-chat .web__main-item--mine{text-align:right;padding-left:0;padding-right:60px}.avue-chat .web__main-item--mine .web__main-user{left:auto;right:3px}.avue-chat .web__main-item--mine .web__main-user cite{left:auto;right:60px;text-align:right}.avue-chat .web__main-item--mine .web__main-user cite i{padding-left:0;padding-right:15px}.avue-chat .web__main-item--mine .web__main-text{margin-left:0;text-align:left;background-color:#409eff;color:#fff}.avue-chat .web__footer{box-shadow:0 -1px #0000000a,0 -2px #00000003;position:absolute;left:0;bottom:0;width:100%;background-color:#fff}.avue-chat .web__msg{padding:10px;height:auto;overflow:hidden}.avue-chat .web__msg--img,.avue-chat .web__msg--video,.avue-chat .web__msg--file{position:relative;max-width:250px;min-width:200px;width:100%;margin:10px 0;border:1px solid #eee;overflow:hidden;border-radius:5px;cursor:pointer;display:block}.avue-chat .web__msg--file{height:140px;background-color:#fff}.avue-chat .web__msg--file span{box-sizing:border-box;padding:3px 5px;color:#333;display:flex;align-items:center;width:100%;justify-content:center;height:calc(100% - 80px);overflow:hidden;font-size:13px;text-align:center}.avue-chat .web__msg--file h2{margin:0;width:100%;text-align:center;line-height:80px;background-color:#409eff;color:#fff}.avue-chat .web__msg--map{height:160px}.avue-chat .web__msg-input{display:block;width:100%;height:60px;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;outline:0;background-color:#fff;border:0;word-break:break-all;font-size:13px;line-height:17px;-webkit-appearance:none}.avue-chat .web__msg-submit{float:right;display:block;outline:none;cursor:pointer;text-align:center}.avue-chat .web__tools{padding:8px 10px 0;box-sizing:border-box}.avue-chat .web__tools i{margin-right:12px;font-size:20px;color:#888a91}.avue-chat .web__tools i:hover{color:#76b1f9}
@@ -1,6 +1,6 @@
1
1
  import a from "simple-uploader.js";
2
- import { k as r } from "../../chunks/97652d86.js";
3
- import { n } from "../../chunks/5d4282fb.js";
2
+ import { k as r } from "../../chunks/utils.97652d86.js";
3
+ import { n } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
4
4
  var u = function() {
5
5
  var e = this, t = e.$createElement, i = e._self._c || t;
6
6
  return i("div", {
@@ -1,5 +1,5 @@
1
- import { u as r, s as o } from "../../chunks/5a78e0db.js";
2
- import { n as a } from "../../chunks/5d4282fb.js";
1
+ import { u as r, s as o } from "../../chunks/mixins.5a78e0db.js";
2
+ import { n as a } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
3
3
  var l = function() {
4
4
  var e = this, t = e.$createElement, s = e._self._c || t;
5
5
  return s("label", {
@@ -1,5 +1,5 @@
1
- import { u as t, s as n } from "../../chunks/5a78e0db.js";
2
- import { n as a } from "../../chunks/5d4282fb.js";
1
+ import { u as t, s as n } from "../../chunks/mixins.5a78e0db.js";
2
+ import { n as a } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
3
3
  var p = function() {
4
4
  var o = this, r = o.$createElement, s = o._self._c || r;
5
5
  return s("div", {
@@ -1,6 +1,6 @@
1
1
  import n from "simple-uploader.js";
2
- import { s as p } from "../../chunks/97652d86.js";
3
- import { n as f } from "../../chunks/5d4282fb.js";
2
+ import { s as p } from "../../chunks/utils.97652d86.js";
3
+ import { n as f } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
4
4
  const o = ["fileProgress", "fileSuccess", "fileComplete", "fileError"];
5
5
  var u = function() {
6
6
  var e = this, i = e.$createElement, s = e._self._c || i;
@@ -1,5 +1,5 @@
1
- import { u as r } from "../../chunks/5a78e0db.js";
2
- import { n as s } from "../../chunks/5d4282fb.js";
1
+ import { u as r } from "../../chunks/mixins.5a78e0db.js";
2
+ import { n as s } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
3
3
  var o = function() {
4
4
  var e = this, n = e.$createElement, t = e._self._c || n;
5
5
  return t("div", {
@@ -1,5 +1,5 @@
1
- import { u as r } from "../../chunks/5a78e0db.js";
2
- import { n as s } from "../../chunks/5d4282fb.js";
1
+ import { u as r } from "../../chunks/mixins.5a78e0db.js";
2
+ import { n as s } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
3
3
  var o = function() {
4
4
  var e = this, t = e.$createElement, i = e._self._c || t;
5
5
  return i("div", {
@@ -1,5 +1,5 @@
1
- import { u as o, s } from "../../chunks/5a78e0db.js";
2
- import { n as a } from "../../chunks/5d4282fb.js";
1
+ import { u as o, s } from "../../chunks/mixins.5a78e0db.js";
2
+ import { n as a } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
3
3
  var i = function() {
4
4
  var e = this, r = e.$createElement, t = e._self._c || r;
5
5
  return t("div", {