@web-utils/component 3.0.6 → 3.1.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 (172) hide show
  1. package/address-input/index.mjs +20 -57
  2. package/affix/index.mjs +26 -47
  3. package/aside-menu/index.mjs +18 -43
  4. package/avatar/index.mjs +27 -49
  5. package/awesome-button/index.mjs +35 -43
  6. package/capsule-tab/index.mjs +16 -34
  7. package/card/index.mjs +21 -76
  8. package/carousel/index.mjs +14 -49
  9. package/chat/index.mjs +104 -414
  10. package/chunk-file-uploader/index.mjs +21 -38
  11. package/chunks/FormTemp.aa57efb4.mjs +125 -0
  12. package/code-mirror-editor/index.mjs +69 -79
  13. package/color-picker/index.mjs +29 -60
  14. package/comment/index.mjs +17 -48
  15. package/confirm-button/index.mjs +11 -19
  16. package/confirmable/index.mjs +12 -20
  17. package/context-menu/index.mjs +42 -144
  18. package/count-up/index.mjs +18 -25
  19. package/custom-scrollbar/index.mjs +13 -22
  20. package/data-box/index.mjs +15 -66
  21. package/data-card/index.mjs +16 -65
  22. package/data-cardtext/index.mjs +16 -52
  23. package/data-display/index.mjs +18 -62
  24. package/data-icons/index.mjs +16 -68
  25. package/data-imgtext/index.mjs +18 -79
  26. package/data-operatext/index.mjs +18 -75
  27. package/data-panel/index.mjs +16 -63
  28. package/data-pay/index.mjs +20 -122
  29. package/data-price/index.mjs +18 -60
  30. package/data-progress/index.mjs +16 -67
  31. package/data-rotate/index.mjs +16 -66
  32. package/data-table-picker/index.mjs +25 -88
  33. package/data-tabs/index.mjs +16 -64
  34. package/dialog-form/index.mjs +48 -94
  35. package/dynamic-table/index.mjs +43 -127
  36. package/e-charts/index.mjs +21 -34
  37. package/easy-popup/index.mjs +35 -61
  38. package/editable-progress/index.mjs +22 -77
  39. package/editable-tree/index.mjs +235 -546
  40. package/egd-collapse/index.mjs +13 -26
  41. package/egd-collapse-item/index.mjs +27 -87
  42. package/element-dialog/index.mjs +69 -133
  43. package/empty-view/index.mjs +13 -33
  44. package/error-view/index.mjs +14 -34
  45. package/flex-column/index.mjs +15 -23
  46. package/flex-item/index.mjs +18 -26
  47. package/flex-row/index.mjs +23 -31
  48. package/flex-scroller/index.mjs +16 -27
  49. package/flow/index.mjs +70 -110
  50. package/flow-designer/index.mjs +1215 -4804
  51. package/flow-node/index.mjs +15 -51
  52. package/flow-viewer/index.mjs +64 -89
  53. package/form-block/index.mjs +43 -62
  54. package/form-button/index.mjs +10 -18
  55. package/form-cascader/index.mjs +49 -100
  56. package/form-checkbox-group/index.mjs +43 -110
  57. package/form-date-picker/index.mjs +51 -97
  58. package/form-holder/index.mjs +25 -42
  59. package/form-input/index.mjs +40 -90
  60. package/form-input-email/index.mjs +35 -79
  61. package/form-input-id-card/index.mjs +40 -87
  62. package/form-input-number/index.mjs +42 -102
  63. package/form-input-phone-number/index.mjs +34 -75
  64. package/form-input-tag/index.mjs +31 -73
  65. package/form-input-time/index.mjs +42 -87
  66. package/form-item/index.mjs +70 -89
  67. package/form-item-config-provider/index.mjs +12 -20
  68. package/form-item-group/index.mjs +46 -65
  69. package/form-radio-group/index.mjs +50 -108
  70. package/form-select/index.mjs +44 -95
  71. package/form-switch/index.mjs +38 -85
  72. package/form-textarea/index.mjs +31 -75
  73. package/form-view/index.mjs +112 -260
  74. package/fy-array/index.mjs +35 -121
  75. package/fy-article/index.mjs +12 -43
  76. package/fy-cascader/index.mjs +26 -67
  77. package/fy-checkbox/index.mjs +27 -77
  78. package/fy-code/index.mjs +19 -33
  79. package/fy-curd/index.mjs +810 -2017
  80. package/fy-date/index.mjs +18 -59
  81. package/fy-draggable/index.mjs +81 -140
  82. package/fy-dynamic/index.mjs +85 -204
  83. package/fy-empty/index.mjs +14 -35
  84. package/fy-form/index.mjs +254 -571
  85. package/fy-form-design/index.mjs +1489 -6084
  86. package/fy-form-design/style.css +1 -1
  87. package/fy-input/index.mjs +34 -104
  88. package/fy-input-color/index.mjs +22 -67
  89. package/fy-input-icon/index.mjs +37 -122
  90. package/fy-input-map/index.mjs +57 -149
  91. package/fy-input-number/index.mjs +18 -53
  92. package/fy-input-table/index.mjs +36 -102
  93. package/fy-input-tree/index.mjs +51 -138
  94. package/fy-progress/index.mjs +12 -31
  95. package/fy-radio/index.mjs +20 -51
  96. package/fy-rate/index.mjs +18 -51
  97. package/fy-select/index.mjs +49 -134
  98. package/fy-slider/index.mjs +19 -52
  99. package/fy-switch/index.mjs +18 -48
  100. package/fy-tabs/index.mjs +19 -51
  101. package/fy-time/index.mjs +22 -62
  102. package/fy-title/index.mjs +14 -25
  103. package/fy-tree/index.mjs +74 -216
  104. package/fy-u-editor/index.mjs +50 -64
  105. package/fy-upload/index.mjs +167 -338
  106. package/guide-steps/index.mjs +33 -53
  107. package/highlight-j-s/index.mjs +13 -27
  108. package/icon-card/index.mjs +12 -36
  109. package/icon-temp/index.mjs +12 -34
  110. package/iframe-window/index.mjs +13 -40
  111. package/image-cropper/index.mjs +46 -171
  112. package/image-preview/index.mjs +54 -168
  113. package/image-viewer/index.mjs +24 -50
  114. package/index.css +1 -0
  115. package/index.mjs +3973 -501
  116. package/input-number/index.mjs +84 -173
  117. package/input-number-range/index.mjs +20 -70
  118. package/j-s-x-component/index.mjs +3 -3
  119. package/keep-view-alive/index.mjs +47 -55
  120. package/keyboard/index.mjs +100 -113
  121. package/license/index.mjs +34 -51
  122. package/loading-view/index.mjs +14 -34
  123. package/login/index.mjs +33 -161
  124. package/monaco-editor/index.mjs +13 -21
  125. package/name-avatar/index.mjs +13 -32
  126. package/nav-bar/index.mjs +12 -31
  127. package/not-implement/index.mjs +14 -25
  128. package/notice/index.mjs +32 -80
  129. package/package.json +1 -1
  130. package/page/index.mjs +11 -23
  131. package/page-header/index.mjs +16 -37
  132. package/page-index/index.mjs +42 -93
  133. package/page-index-top/index.mjs +42 -84
  134. package/page-skeleton/index.mjs +24 -39
  135. package/page-skeleton-new/index.mjs +21 -68
  136. package/pageable-table/index.mjs +105 -227
  137. package/pageable-view/index.mjs +30 -83
  138. package/photo-swipe/index.mjs +62 -87
  139. package/present-view/index.mjs +114 -267
  140. package/queue/index.mjs +14 -29
  141. package/record-video/index.mjs +29 -66
  142. package/resize-observer/index.mjs +18 -30
  143. package/search/index.mjs +47 -81
  144. package/search-popover/index.mjs +57 -329
  145. package/sign/index.mjs +43 -60
  146. package/sign-panel/index.mjs +40 -151
  147. package/skeleton/index.mjs +18 -44
  148. package/split-pane/index.mjs +45 -129
  149. package/stateful/index.mjs +18 -26
  150. package/static-pageable-table/index.mjs +18 -44
  151. package/swiper/index.mjs +53 -94
  152. package/tab/index.mjs +13 -39
  153. package/tab-item/index.mjs +23 -37
  154. package/table-column/index.mjs +27 -35
  155. package/table-view/index.mjs +89 -209
  156. package/tag-render/index.mjs +34 -69
  157. package/text-ellipsis/index.mjs +22 -47
  158. package/tinymce-editor/index.mjs +174 -285
  159. package/toolbar/index.mjs +21 -42
  160. package/toolbar-button/index.mjs +25 -54
  161. package/verify/index.mjs +16 -29
  162. package/vue-cron/index.mjs +272 -1089
  163. package/vue-qr-code/index.mjs +19 -27
  164. package/vue-quill-editor/index.mjs +15 -27
  165. package/vue-tags-input/index.mjs +104 -224
  166. package/vue-tree-select/index.mjs +595 -742
  167. package/vue-video-player/index.mjs +42 -57
  168. package/watermark/index.mjs +27 -35
  169. package/web-types.json +1 -1
  170. package/x-input-tag/index.mjs +50 -112
  171. package/chunks/FormTemp.7f91629d.mjs +0 -165
  172. /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
package/chat/index.mjs CHANGED
@@ -1,354 +1,7 @@
1
- import { formatDate as c } from "@web-utils/integrations/dayjs";
1
+ import { formatDate as r } from "@web-utils/integrations/dayjs";
2
2
  import { s as l } from "../chunks/util.ae730cde.mjs";
3
- import { n as d } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
4
- var u = 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
- alt: ""
65
- }
66
- }), e("cite", [t._v(" " + t._s(i.name) + " "), e("i", [t._v(t._s(i.date))])])]), e("div", {
67
- staticClass: "web__main-text"
68
- }, [e("div", {
69
- staticClass: "web__main-arrow"
70
- }), e("span", {
71
- ref: "content",
72
- refInFor: !0,
73
- domProps: {
74
- innerHTML: t._s(t.handleDetail(i.text.text))
75
- }
76
- }), i.text.list ? t._e() : e("ul", {
77
- staticClass: "web__main-list"
78
- }, t._l(i.text.list, function(s, n) {
79
- return e("li", {
80
- key: n,
81
- on: {
82
- click: function(g) {
83
- return t.handleItemMsg(s);
84
- }
85
- }
86
- }, [t._v(" " + t._s(s.text) + " ")]);
87
- }), 0)])]);
88
- }), 0), e("div", {
89
- staticClass: "web__footer",
90
- style: t.widthStyleName
91
- }, [e("div", {
92
- staticClass: "web__tools"
93
- }, [t.tools.img ? e("i", {
94
- staticClass: "el-icon-picture-outline",
95
- on: {
96
- click: function(i) {
97
- return t.handleUpload("img");
98
- }
99
- }
100
- }) : t._e(), t.tools.video ? e("i", {
101
- staticClass: "el-icon-video-camera",
102
- on: {
103
- click: function(i) {
104
- return t.handleUpload("video");
105
- }
106
- }
107
- }) : t._e(), t.tools.file ? e("i", {
108
- staticClass: "el-icon-folder-opened",
109
- on: {
110
- click: function(i) {
111
- return t.handleUpload("file");
112
- }
113
- }
114
- }) : t._e()]), e("div", {
115
- staticClass: "web__msg"
116
- }, [e("textarea", {
117
- directives: [{
118
- name: "model",
119
- rawName: "v-model",
120
- value: t.msg,
121
- expression: "msg"
122
- }],
123
- staticClass: "web__msg-input",
124
- attrs: {
125
- rows: "2",
126
- placeholder: t.placeholder
127
- },
128
- domProps: {
129
- value: t.msg
130
- },
131
- on: {
132
- input: function(i) {
133
- i.target.composing || (t.msg = i.target.value);
134
- }
135
- }
136
- }), e("div", {
137
- staticClass: "web__msg-menu"
138
- }, [e("ElDropdown", {
139
- staticClass: "web__msg-submit",
140
- attrs: {
141
- "split-button": "",
142
- type: "primary",
143
- size: "mini",
144
- trigger: "click"
145
- },
146
- on: {
147
- click: t.handleSend
148
- },
149
- scopedSlots: t._u([{
150
- key: "dropdown",
151
- fn: function() {
152
- return [e("ElDropdownMenu", [e("ElDropdownItem", [e("ElPopover", {
153
- attrs: {
154
- placement: "top",
155
- width: "160"
156
- },
157
- scopedSlots: t._u([{
158
- key: "reference",
159
- fn: function() {
160
- return [e("ElButton", {
161
- attrs: {
162
- type: "text",
163
- icon: "el-icon-plus"
164
- }
165
- })];
166
- },
167
- proxy: !0
168
- }]),
169
- model: {
170
- value: t.visible,
171
- callback: function(i) {
172
- t.visible = i;
173
- },
174
- expression: "visible"
175
- }
176
- }, [e("ElInput", {
177
- staticStyle: {
178
- "margin-bottom": "10px"
179
- },
180
- attrs: {
181
- size: "mini",
182
- rows: 3,
183
- "show-word-limit": "",
184
- maxlength: "100",
185
- placeholder: "请输入快捷回复语",
186
- type: "textarea"
187
- },
188
- model: {
189
- value: t.keys,
190
- callback: function(i) {
191
- t.keys = i;
192
- },
193
- expression: "keys"
194
- }
195
- }), e("div", {
196
- staticStyle: {
197
- margin: "0",
198
- "text-align": "right"
199
- }
200
- }, [e("ElButton", {
201
- attrs: {
202
- size: "mini",
203
- type: "text"
204
- },
205
- on: {
206
- click: function(i) {
207
- t.visible = !1;
208
- }
209
- }
210
- }, [t._v(" 取消 ")]), e("ElButton", {
211
- attrs: {
212
- type: "primary",
213
- size: "mini"
214
- },
215
- on: {
216
- click: t.addKey
217
- }
218
- }, [t._v(" 确定 ")])], 1)], 1)], 1), e("ElScrollbar", {
219
- staticStyle: {
220
- height: "100px"
221
- }
222
- }, t._l(t.keylist, function(i, a) {
223
- return e("ElDropdownItem", {
224
- key: a,
225
- nativeOn: {
226
- click: function(s) {
227
- return t.sendKey(i);
228
- }
229
- }
230
- }, [e("ElTooltip", {
231
- attrs: {
232
- effect: "dark",
233
- content: i,
234
- placement: "top"
235
- }
236
- }, [e("span", [t._v(" " + t._s(i.substr(0, 10)) + t._s(i.length > 10 ? "..." : ""))])])], 1);
237
- }), 1)], 1)];
238
- },
239
- proxy: !0
240
- }])
241
- }, [t._v(" 发送 ")])], 1)])])]), t._t("default")], 2), t.upload.box ? e("div", [e("ElementDialog", {
242
- attrs: {
243
- title: t.upload.title,
244
- "body-padding": !1,
245
- visible: t.upload.box,
246
- width: "30%"
247
- },
248
- on: {
249
- "update:visible": function(i) {
250
- return t.$set(t.upload, "box", i);
251
- }
252
- },
253
- scopedSlots: t._u([{
254
- key: "footer",
255
- fn: function() {
256
- return [e("ElButton", {
257
- attrs: {
258
- size: "small"
259
- },
260
- on: {
261
- click: function(i) {
262
- t.upload.box = !1;
263
- }
264
- }
265
- }, [t._v("取 消")]), e("ElButton", {
266
- attrs: {
267
- type: "primary",
268
- size: "small"
269
- },
270
- on: {
271
- click: t.uploadSubmit
272
- }
273
- }, [t._v("确 定")])];
274
- },
275
- proxy: !0
276
- }], null, !1, 99567638)
277
- }, [e("ElForm", {
278
- ref: "form",
279
- attrs: {
280
- model: t.upload
281
- }
282
- }, [e("ElFormItem", {
283
- attrs: {
284
- prop: "src",
285
- rules: [{
286
- required: !0,
287
- message: "地址不能为空"
288
- }]
289
- }
290
- }, [e("ElInput", {
291
- staticStyle: {
292
- "margin-bottom": "10px"
293
- },
294
- attrs: {
295
- size: "mini",
296
- rows: 4,
297
- "show-word-limit": "",
298
- maxlength: "100",
299
- placeholder: "请输入地址",
300
- type: "textarea"
301
- },
302
- model: {
303
- value: t.upload.src,
304
- callback: function(i) {
305
- t.$set(t.upload, "src", i);
306
- },
307
- expression: "upload.src"
308
- }
309
- })], 1)], 1)], 1)], 1) : t._e(), t.show ? e("div", [e("ElementDialog", {
310
- staticClass: "web__dialog",
311
- attrs: {
312
- visible: t.show,
313
- "body-padding": !1,
314
- title: "预览",
315
- width: "40%",
316
- "before-close": t.handleClose
317
- },
318
- on: {
319
- "update:visible": function(i) {
320
- t.show = i;
321
- }
322
- }
323
- }, [t.imgSrc ? e("img", {
324
- staticStyle: {
325
- width: "100%",
326
- "object-fit": "cover"
327
- },
328
- attrs: {
329
- src: t.imgSrc
330
- }
331
- }) : t._e(), t.videoSrc ? e("video", {
332
- staticStyle: {
333
- width: "100%",
334
- "object-fit": "cover"
335
- },
336
- attrs: {
337
- src: t.videoSrc,
338
- controls: "controls"
339
- }
340
- }) : t._e(), t.audioSrc ? e("audio", {
341
- staticStyle: {
342
- width: "100%",
343
- "object-fit": "cover"
344
- },
345
- attrs: {
346
- src: t.audioSrc,
347
- controls: "controls"
348
- }
349
- }) : t._e()])], 1) : t._e()]);
350
- }, f = [];
351
- const m = {
3
+ import { n as c } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
4
+ const d = {
352
5
  name: "Chat",
353
6
  props: {
354
7
  beforeOpen: Function,
@@ -421,8 +74,8 @@ const m = {
421
74
  get() {
422
75
  return this.value;
423
76
  },
424
- set(t) {
425
- this.$emit("input", t), this.$emit("change", t);
77
+ set(s) {
78
+ this.$emit("input", s), this.$emit("change", s);
426
79
  }
427
80
  },
428
81
  heightStyleName() {
@@ -441,39 +94,39 @@ const m = {
441
94
  },
442
95
  methods: {
443
96
  uploadSubmit() {
444
- this.$refs.form.validate((t) => {
445
- t && (this.upload.box = !1, this.$emit("submit", this.getDetail(this.upload)));
97
+ this.$refs.form.validate((s) => {
98
+ s && (this.upload.box = !1, this.$emit("submit", this.getDetail(this.upload)));
446
99
  });
447
100
  },
448
- handleUpload(t) {
449
- 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;
101
+ handleUpload(s) {
102
+ this.upload.type = s, this.upload.src = "", s === "img" ? this.upload.title = "图片上传" : s === "video" ? this.upload.title = "视频上传" : s === "file" && (this.upload.title = "文件上传"), this.upload.box = !0;
450
103
  },
451
- handleClose(t) {
452
- this.imgSrc = void 0, this.videoSrc = void 0, this.audioSrc = void 0, t();
104
+ handleClose(s) {
105
+ this.imgSrc = void 0, this.videoSrc = void 0, this.audioSrc = void 0, s();
453
106
  },
454
107
  addKey() {
455
108
  this.keys !== "" && (this.$emit("keyadd", this.keys), this.keys = ""), this.visible = !1;
456
109
  },
457
- sendKey(t) {
458
- this.$emit("keysend", t);
110
+ sendKey(s) {
111
+ this.$emit("keysend", s);
459
112
  },
460
113
  getAudio() {
461
114
  this.$refs.chatAudio.play();
462
115
  },
463
- getNotification(t) {
464
- const o = this, e = Notification || window.Notification;
116
+ getNotification(s) {
117
+ const t = this, e = Notification || window.Notification;
465
118
  if (e) {
466
119
  let a = function() {
467
120
  e.requestPermission(function(n) {
468
- n === "granted" ? s() : console.log("用户无情残忍的拒绝了你!!!");
121
+ n === "granted" ? o() : console.log("用户无情残忍的拒绝了你!!!");
469
122
  });
470
- }, s = function() {
471
- const n = new Notification(o.config.name, {
472
- body: t,
473
- icon: o.config.img
123
+ }, o = function() {
124
+ const n = new Notification(t.config.name, {
125
+ body: s,
126
+ icon: t.config.img
474
127
  });
475
128
  n.onshow = function() {
476
- o.getAudio(), setTimeout(() => {
129
+ t.getAudio(), setTimeout(() => {
477
130
  n.close();
478
131
  }, 2500);
479
132
  }, n.onclick = function() {
@@ -481,28 +134,28 @@ const m = {
481
134
  };
482
135
  };
483
136
  const i = e.permission;
484
- i === "granted" ? s() : i === "denied" ? console.log("用户拒绝了你!!!") : a();
137
+ i === "granted" ? o() : i === "denied" ? console.log("用户拒绝了你!!!") : a();
485
138
  }
486
139
  },
487
140
  // mine为'我'的对话
488
141
  // text为内容
489
- pushMsg(t = {}) {
490
- const o = t.mine === !0, e = t.text || {}, a = {
491
- date: t.date || c(Date.now(), "YYYY-MM-DD HH:mm:ss"),
142
+ pushMsg(s = {}) {
143
+ const t = s.mine === !0, e = s.text || {}, a = {
144
+ date: s.date || r(Date.now(), "YYYY-MM-DD HH:mm:ss"),
492
145
  text: (() => typeof e != "object" ? {
493
146
  text: e
494
147
  } : e)(),
495
- mine: o,
496
- img: o ? this.config.myImg : this.config.img,
497
- name: o ? this.config.myName : this.config.name
148
+ mine: t,
149
+ img: t ? this.config.myImg : this.config.img,
150
+ name: t ? this.config.myName : this.config.name
498
151
  };
499
152
  this.list.push(a), setTimeout(() => {
500
153
  this.setScroll();
501
154
  }, 50);
502
155
  },
503
- setScroll(t) {
156
+ setScroll(s) {
504
157
  this.$nextTick(() => {
505
- this.$refs.main.scrollTop = t || this.$refs.main.scrollHeight;
158
+ this.$refs.main.scrollTop = s || this.$refs.main.scrollHeight;
506
159
  });
507
160
  },
508
161
  // 用户主动发送
@@ -510,69 +163,106 @@ const m = {
510
163
  this.msgActive && this.$emit("submit");
511
164
  },
512
165
  // 选择列表
513
- handleItemMsg(t) {
514
- this.$emit("submit", t.ask);
166
+ handleItemMsg(s) {
167
+ this.$emit("submit", s.ask);
515
168
  },
516
169
  // 处理排版
517
- handleDetail(t = "") {
518
- const o = t;
170
+ handleDetail(s = "") {
171
+ const t = s;
519
172
  return setTimeout(() => {
520
173
  (this.$refs.content || []).forEach((i) => {
521
174
  for (let a = 0; a < i.children.length; a++) {
522
- const s = i.children[a];
523
- s.getAttribute("data-flag") !== "0" && (s.setAttribute("data-flag", 0), s.onclick = () => {
524
- this.handleEvent(s.dataset);
525
- }, 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(
175
+ const o = i.children[a];
176
+ o.getAttribute("data-flag") !== "0" && (o.setAttribute("data-flag", 0), o.onclick = () => {
177
+ this.handleEvent(o.dataset);
178
+ }, o.tagName === "IMG" ? (o.className = "web__msg--img", o.src = o.getAttribute("data-src")) : o.tagName === "VIDEO" ? (o.className = "web__msg--video", o.src = o.getAttribute("data-src")) : o.tagName === "AUDIO" ? (o.className = "web__msg--audio", o.controls = "controls", o.src = o.getAttribute("data-src")) : o.tagName === "FILE" ? (o.className = "web__msg--file", o.innerHTML = `<h2>File</h2><span>${o.getAttribute("data-name")}</span>`) : o.tagName === "MAP" && (o.className = "web__msg--file web__msg--map", o.innerHTML = `<h2>Map</h2><span>${o.getAttribute("data-longitude")} , ${o.getAttribute(
526
179
  "data-latitude"
527
- )}<br />${s.getAttribute("data-address")}</span>`), this.setScroll());
180
+ )}<br />${o.getAttribute("data-address")}</span>`), this.setScroll());
528
181
  }
529
182
  });
530
- }, 0), o;
183
+ }, 0), t;
531
184
  },
532
- getDetail(t = {}) {
533
- const { type: o, src: e, name: i, longitude: a, latitude: s, address: n } = t;
534
- if (o === "img")
185
+ getDetail(s = {}) {
186
+ const { type: t, src: e, name: i, longitude: a, latitude: o, address: n } = s;
187
+ if (t === "img")
535
188
  return `<img data-type="IMG" data-src="${e}" alt=""/>`;
536
- if (o === "video")
189
+ if (t === "video")
537
190
  return `<video data-type="VIDEO" data-src="${e}"></video>`;
538
- if (o === "audio")
191
+ if (t === "audio")
539
192
  return `<audio data-type="AUDIO" data-src="${e}"></audio>`;
540
- if (o === "file")
193
+ if (t === "file")
541
194
  return `<file data-type="FILE" data-name="${i}" data-src="${e}"></file>`;
542
- if (o === "map")
543
- return `<map data-type="MAP" data-src="${e}" data-address="${n} " data-latitude="${s}" data-longitude="${a}"></map>`;
195
+ if (t === "map")
196
+ return `<map data-type="MAP" data-src="${e}" data-address="${n} " data-latitude="${o}" data-longitude="${a}"></map>`;
544
197
  },
545
198
  // 处理事件
546
- handleEvent(t) {
547
- const o = () => {
548
- 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);
199
+ handleEvent(s) {
200
+ const t = () => {
201
+ s.type === "IMG" ? (this.imgSrc = s.src, this.show = !0) : s.type === "VIDEO" ? (this.videoSrc = s.src, this.show = !0) : s.type === "AUDIO" ? (this.audioSrc = s.src, this.show = !0) : s.type === "FILE" && window.open(s.src);
549
202
  };
550
- typeof this.beforeOpen == "function" ? this.beforeOpen(t, o) : o();
203
+ typeof this.beforeOpen == "function" ? this.beforeOpen(s, t) : t();
551
204
  },
552
- rootSendMsg(t) {
205
+ rootSendMsg(s) {
553
206
  this.pushMsg({
554
- text: t
555
- }), this.notice && this.getNotification(t.text || t);
207
+ text: s
208
+ }), this.notice && this.getNotification(s.text || s);
556
209
  }
557
210
  }
558
- }, r = {};
559
- var p = /* @__PURE__ */ d(
560
- m,
211
+ };
212
+ var u = function() {
213
+ var t = this, e = t._self._c;
214
+ return e("div", { staticClass: "avue-chat", style: t.heightStyleName, on: { keyup: function(i) {
215
+ return !i.type.indexOf("key") && t._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : t.handleSend.apply(null, arguments);
216
+ } } }, [e("audio", { ref: "chatAudio" }, [e("source", { attrs: { src: t.audio[0], type: "audio/ogg" } }), e("source", { attrs: { src: t.audio[1], type: "audio/mpeg" } }), e("source", { attrs: { src: t.audio[2], type: "audio/wav" } })]), e("div", { staticClass: "web__logo" }, [e("img", { staticClass: "web__logo-img", attrs: { src: t.config.img, alt: "" } }), e("div", { staticClass: "web__logo-info" }, [e("p", { staticClass: "web__logo-name" }, [t._v(" " + t._s(t.config.name) + " ")]), e("p", { staticClass: "web__logo-dept" }, [t._v(" " + t._s(t.config.dept) + " ")])]), t._t("header")], 2), e("div", { staticClass: "web__content" }, [e("div", { style: t.widthStyleName }, [e("div", { ref: "main", staticClass: "web__main" }, t._l(t.list, function(i, a) {
217
+ return e("div", { key: a, staticClass: "web__main-item", class: { "web__main-item--mine": i.mine } }, [e("div", { staticClass: "web__main-user" }, [e("img", { attrs: { src: i.img, alt: "" } }), e("cite", [t._v(" " + t._s(i.name) + " "), e("i", [t._v(t._s(i.date))])])]), e("div", { staticClass: "web__main-text" }, [e("div", { staticClass: "web__main-arrow" }), e("span", { ref: "content", refInFor: !0, domProps: { innerHTML: t._s(t.handleDetail(i.text.text)) } }), i.text.list ? t._e() : e("ul", { staticClass: "web__main-list" }, t._l(i.text.list, function(o, n) {
218
+ return e("li", { key: n, on: { click: function(p) {
219
+ return t.handleItemMsg(o);
220
+ } } }, [t._v(" " + t._s(o.text) + " ")]);
221
+ }), 0)])]);
222
+ }), 0), e("div", { staticClass: "web__footer", style: t.widthStyleName }, [e("div", { staticClass: "web__tools" }, [t.tools.img ? e("i", { staticClass: "el-icon-picture-outline", on: { click: function(i) {
223
+ return t.handleUpload("img");
224
+ } } }) : t._e(), t.tools.video ? e("i", { staticClass: "el-icon-video-camera", on: { click: function(i) {
225
+ return t.handleUpload("video");
226
+ } } }) : t._e(), t.tools.file ? e("i", { staticClass: "el-icon-folder-opened", on: { click: function(i) {
227
+ return t.handleUpload("file");
228
+ } } }) : t._e()]), e("div", { staticClass: "web__msg" }, [e("textarea", { directives: [{ name: "model", rawName: "v-model", value: t.msg, expression: "msg" }], staticClass: "web__msg-input", attrs: { rows: "2", placeholder: t.placeholder }, domProps: { value: t.msg }, on: { input: function(i) {
229
+ i.target.composing || (t.msg = i.target.value);
230
+ } } }), e("div", { staticClass: "web__msg-menu" }, [e("ElDropdown", { staticClass: "web__msg-submit", attrs: { "split-button": "", type: "primary", size: "mini", trigger: "click" }, on: { click: t.handleSend }, scopedSlots: t._u([{ key: "dropdown", fn: function() {
231
+ return [e("ElDropdownMenu", [e("ElDropdownItem", [e("ElPopover", { attrs: { placement: "top", width: "160" }, scopedSlots: t._u([{ key: "reference", fn: function() {
232
+ return [e("ElButton", { attrs: { type: "text", icon: "el-icon-plus" } })];
233
+ }, proxy: !0 }]), model: { value: t.visible, callback: function(i) {
234
+ t.visible = i;
235
+ }, expression: "visible" } }, [e("ElInput", { staticStyle: { "margin-bottom": "10px" }, attrs: { size: "mini", rows: 3, "show-word-limit": "", maxlength: "100", placeholder: "请输入快捷回复语", type: "textarea" }, model: { value: t.keys, callback: function(i) {
236
+ t.keys = i;
237
+ }, expression: "keys" } }), e("div", { staticStyle: { margin: "0", "text-align": "right" } }, [e("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(i) {
238
+ t.visible = !1;
239
+ } } }, [t._v(" 取消 ")]), e("ElButton", { attrs: { type: "primary", size: "mini" }, on: { click: t.addKey } }, [t._v(" 确定 ")])], 1)], 1)], 1), e("ElScrollbar", { staticStyle: { height: "100px" } }, t._l(t.keylist, function(i, a) {
240
+ return e("ElDropdownItem", { key: a, nativeOn: { click: function(o) {
241
+ return t.sendKey(i);
242
+ } } }, [e("ElTooltip", { attrs: { effect: "dark", content: i, placement: "top" } }, [e("span", [t._v(" " + t._s(i.substr(0, 10)) + t._s(i.length > 10 ? "..." : ""))])])], 1);
243
+ }), 1)], 1)];
244
+ }, proxy: !0 }]) }, [t._v(" 发送 ")])], 1)])])]), t._t("default")], 2), t.upload.box ? e("div", [e("ElementDialog", { attrs: { title: t.upload.title, "body-padding": !1, visible: t.upload.box, width: "30%" }, on: { "update:visible": function(i) {
245
+ return t.$set(t.upload, "box", i);
246
+ } }, scopedSlots: t._u([{ key: "footer", fn: function() {
247
+ return [e("ElButton", { attrs: { size: "small" }, on: { click: function(i) {
248
+ t.upload.box = !1;
249
+ } } }, [t._v("取 消")]), e("ElButton", { attrs: { type: "primary", size: "small" }, on: { click: t.uploadSubmit } }, [t._v("确 定")])];
250
+ }, proxy: !0 }], null, !1, 99567638) }, [e("ElForm", { ref: "form", attrs: { model: t.upload } }, [e("ElFormItem", { attrs: { prop: "src", rules: [{ required: !0, message: "地址不能为空" }] } }, [e("ElInput", { staticStyle: { "margin-bottom": "10px" }, attrs: { size: "mini", rows: 4, "show-word-limit": "", maxlength: "100", placeholder: "请输入地址", type: "textarea" }, model: { value: t.upload.src, callback: function(i) {
251
+ t.$set(t.upload, "src", i);
252
+ }, expression: "upload.src" } })], 1)], 1)], 1)], 1) : t._e(), t.show ? e("div", [e("ElementDialog", { staticClass: "web__dialog", attrs: { visible: t.show, "body-padding": !1, title: "预览", width: "40%", "before-close": t.handleClose }, on: { "update:visible": function(i) {
253
+ t.show = i;
254
+ } } }, [t.imgSrc ? e("img", { staticStyle: { width: "100%", "object-fit": "cover" }, attrs: { src: t.imgSrc } }) : t._e(), t.videoSrc ? e("video", { staticStyle: { width: "100%", "object-fit": "cover" }, attrs: { src: t.videoSrc, controls: "controls" } }) : t._e(), t.audioSrc ? e("audio", { staticStyle: { width: "100%", "object-fit": "cover" }, attrs: { src: t.audioSrc, controls: "controls" } }) : t._e()])], 1) : t._e()]);
255
+ }, f = [], m = /* @__PURE__ */ c(
256
+ d,
561
257
  u,
562
258
  f,
563
259
  !1,
564
- h,
260
+ null,
565
261
  null,
566
262
  null,
567
263
  null
568
264
  );
569
- function h(t) {
570
- for (let o in r)
571
- this[o] = r[o];
572
- }
573
- const b = /* @__PURE__ */ function() {
574
- return p.exports;
575
- }();
265
+ const y = m.exports;
576
266
  export {
577
- b as default
267
+ y as default
578
268
  };