@web-utils/component 4.0.16 → 5.0.0-beta01

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 (314) hide show
  1. package/address-input/index.mjs +76 -74
  2. package/affix/index.mjs +71 -78
  3. package/aside-menu/index.mjs +20 -31
  4. package/avatar/index.mjs +94 -82
  5. package/awesome-button/index.mjs +54 -71
  6. package/capsule-tab/index.mjs +27 -32
  7. package/card/index.mjs +86 -69
  8. package/carousel/index.mjs +45 -32
  9. package/chat/index.mjs +441 -266
  10. package/chunk-file-uploader/index.mjs +2 -103
  11. package/chunks/ChunkFileUploader.C3EA0e5t.mjs +114 -0
  12. package/chunks/EditableTree.C_IJBL5b.mjs +648 -0
  13. package/chunks/ElementBaseInfo.DyuFR6fE.mjs +209 -0
  14. package/chunks/ElementDialog.C0IjriTW.mjs +681 -0
  15. package/chunks/ElementForm.ButuYDPA.mjs +627 -0
  16. package/chunks/ElementListeners.Dg3e_dmp.mjs +656 -0
  17. package/chunks/ElementMultiInstance.Dmi79FqA.mjs +290 -0
  18. package/chunks/ElementOtherConfig.C2AddGTp.mjs +51 -0
  19. package/chunks/ElementProperties.CfV8UF7L.mjs +196 -0
  20. package/chunks/ElementTaskConfig.Bn7ycGGn.mjs +446 -0
  21. package/chunks/FlowCondition.C6PdqOAW.mjs +194 -0
  22. package/chunks/FlowDesigner.uJYFfKpR.mjs +5101 -0
  23. package/chunks/FormBlock.BEENc22F.mjs +117 -0
  24. package/chunks/FormCascader.CaM-oEhv.mjs +1226 -0
  25. package/chunks/FormInputTime.Bg3UIP8H.mjs +1773 -0
  26. package/chunks/FormItem.H9OOvNzT.mjs +90 -0
  27. package/chunks/FormItemGroup.D9eRy-cZ.mjs +147 -0
  28. package/chunks/FormSelect.CanodoAI.mjs +1472 -0
  29. package/chunks/FormSwitch.DTqdaFjv.mjs +296 -0
  30. package/chunks/FormTemp.DiI5EfgK.mjs +139 -0
  31. package/chunks/FyCurd.DMj1dMK9.mjs +2622 -0
  32. package/chunks/FyForm.vgR8ujEF.mjs +904 -0
  33. package/chunks/FyFormDesign.DEWT6LsX.mjs +5600 -0
  34. package/chunks/FyUEditor.D_rEYfll.mjs +221 -0
  35. package/chunks/FyUpload.B2QKfTxF.mjs +504 -0
  36. package/chunks/Keyboard.ItiRy7Gb.mjs +379 -0
  37. package/chunks/MonacoEditor.Bd5Kui-Y.mjs +301 -0
  38. package/chunks/PageableTable.Bujb0NUx.mjs +658 -0
  39. package/chunks/RecordVideo.B35_dLty.mjs +116 -0
  40. package/chunks/SignalAndMessage.CYVzlFuL.mjs +198 -0
  41. package/chunks/SplitPane.Dw96M0Yf.mjs +219 -0
  42. package/chunks/TableColumn.DJYkznbJ.mjs +180 -0
  43. package/chunks/TableView.DyIdIxAg.mjs +484 -0
  44. package/chunks/Toolbar.DHuXJAoG.mjs +219 -0
  45. package/chunks/UserTaskListeners.Bp-2qkHs.mjs +599 -0
  46. package/chunks/VueCron.GfjodnyM.mjs +1766 -0
  47. package/chunks/VueTreeSelect.9Ywl-I8e.mjs +1872 -0
  48. package/chunks/_plugin-vue_export-helper.7vrlOII_.mjs +8 -0
  49. package/chunks/checkbox.emIuFmnt.mjs +437 -0
  50. package/chunks/confirmable-mixin.BBil7dto.mjs +1646 -0
  51. package/chunks/core.DJv6Qrae.mjs +51 -0
  52. package/chunks/dataformat.Bfr4nOcA.mjs +144 -0
  53. package/chunks/dic.DgDfnovD.mjs +116 -0
  54. package/chunks/dictionary.5eKjWeAp.mjs +19 -0
  55. package/chunks/dictionary.DxZxP0ej.mjs +87 -0
  56. package/chunks/event.B4iwtUNO.mjs +4 -0
  57. package/chunks/event.eJ-c1Z3a.mjs +224 -0
  58. package/chunks/focus-trap.DT4GnqQI.mjs +211 -0
  59. package/chunks/form-input.D25eDRMq.mjs +34 -0
  60. package/chunks/form-item.CgmUuw_n.mjs +714 -0
  61. package/chunks/form-pick.Axem0gOO.mjs +7 -0
  62. package/chunks/form-validate.B1KPCHqN.mjs +11 -0
  63. package/chunks/icon.CbS8-322.mjs +259 -0
  64. package/chunks/init.DwpukyOB.mjs +115 -0
  65. package/chunks/input.PejnqwSH.mjs +547 -0
  66. package/chunks/install.yLcn5MLL.mjs +84 -0
  67. package/chunks/message.BCmee5N0.mjs +400 -0
  68. package/chunks/overlay.DubSnqma.mjs +122 -0
  69. package/chunks/packages.BGjydzjm.mjs +56 -0
  70. package/chunks/permission.DgEVNWlh.mjs +16 -0
  71. package/chunks/photo-swipe.BB0SJZg9.mjs +55 -0
  72. package/chunks/radio.BotKXqJr.mjs +274 -0
  73. package/chunks/scroll.CzORc5Zk.mjs +28 -0
  74. package/chunks/scrollbar.CAmrlKi9.mjs +345 -0
  75. package/chunks/slot.C6Ozd2e7.mjs +25 -0
  76. package/chunks/style.BmlGmjpO.mjs +325 -0
  77. package/chunks/sub-table-plus-props.B_lLth3j.mjs +28 -0
  78. package/chunks/tab-mixin.u0EZpx3j.mjs +70 -0
  79. package/chunks/tag.DPi-PLbb.mjs +141 -0
  80. package/chunks/teleport._VGEzK4d.mjs +22 -0
  81. package/chunks/tooltip.D50x7Rva.mjs +1926 -0
  82. package/chunks/typescript.DiWBU4nj.mjs +4 -0
  83. package/chunks/use-aria.BW7nWOl1.mjs +17 -0
  84. package/chunks/use-composition.mUaomyno.mjs +47 -0
  85. package/chunks/use-deprecated.BfDSbZS9.mjs +12 -0
  86. package/chunks/use-empty-values.Dy_r78F6.mjs +263 -0
  87. package/chunks/use-form-item.wsRjehHp.mjs +47 -0
  88. package/chunks/use-global-config.C9hs-O_x.mjs +56 -0
  89. package/chunks/use-id.CFO5NeoV.mjs +15 -0
  90. package/chunks/use-size.DxrwTUwf.mjs +18 -0
  91. package/chunks/util.B3sjVZoZ.mjs +103 -0
  92. package/chunks/util.g-WQEec9.mjs +223 -0
  93. package/chunks/utilSelf.ZED4DmCU.mjs +46 -0
  94. package/chunks/utils.Cs2fYBrT.mjs +60 -0
  95. package/chunks/utils.DsGhtCIO.mjs +14 -0
  96. package/chunks/validator.C4-z_t9p.mjs +5 -0
  97. package/chunks/vnode.D_SioRnx.mjs +14 -0
  98. package/code-mirror-editor/index.mjs +89 -88
  99. package/comment/index.mjs +62 -57
  100. package/configComponents.mjs +40 -50
  101. package/confirm-button/index.mjs +34 -46
  102. package/confirmable/index.mjs +7 -17
  103. package/context-menu/index.mjs +195 -174
  104. package/count-up/index.mjs +97 -105
  105. package/custom-scrollbar/index.mjs +91 -98
  106. package/data-box/index.mjs +64 -44
  107. package/data-card/index.mjs +60 -47
  108. package/data-card-text/index.mjs +63 -49
  109. package/data-display/index.mjs +71 -51
  110. package/data-icons/index.mjs +70 -50
  111. package/data-imgtext/index.mjs +67 -43
  112. package/data-operatext/index.mjs +51 -40
  113. package/data-panel/index.mjs +57 -44
  114. package/data-pay/index.mjs +105 -48
  115. package/data-price/index.mjs +48 -40
  116. package/data-progress/index.mjs +67 -44
  117. package/data-rotate/index.mjs +61 -44
  118. package/data-table-picker/index.mjs +119 -71
  119. package/data-tabs/index.mjs +67 -44
  120. package/dialog-form/index.mjs +139 -87
  121. package/dynamic-table/index.mjs +166 -109
  122. package/e-charts/index.mjs +174 -200
  123. package/easy-popup/index.mjs +91 -102
  124. package/editable-progress/index.mjs +112 -83
  125. package/editable-tree/index.mjs +2 -481
  126. package/element-dialog/index.mjs +2 -306
  127. package/ellipsis/index.mjs +124 -148
  128. package/empty-view/index.mjs +48 -65
  129. package/error-view/index.mjs +39 -51
  130. package/flex-column/index.mjs +32 -51
  131. package/flex-item/index.mjs +54 -64
  132. package/flex-row/index.mjs +32 -39
  133. package/flex-scroller/index.mjs +29 -30
  134. package/flow/index.mjs +240 -247
  135. package/flow-designer/index.mjs +2 -4709
  136. package/flow-node/index.mjs +56 -64
  137. package/flow-viewer/index.mjs +159 -157
  138. package/form-block/index.mjs +2 -147
  139. package/form-button/index.mjs +35 -47
  140. package/form-card/index.mjs +14 -25
  141. package/form-cascader/index.mjs +2 -115
  142. package/form-checkbox/index.mjs +89 -70
  143. package/form-checkbox-group/index.mjs +161 -113
  144. package/form-date-picker/index.mjs +155 -142
  145. package/form-holder/index.mjs +137 -109
  146. package/form-input/index.mjs +113 -86
  147. package/form-input-cron-expression/index.mjs +97 -76
  148. package/form-input-email/index.mjs +64 -51
  149. package/form-input-id-card/index.mjs +72 -54
  150. package/form-input-phone-number/index.mjs +71 -56
  151. package/form-input-tag/index.mjs +88 -61
  152. package/form-input-time/index.mjs +2 -73
  153. package/form-item/index.mjs +2 -142
  154. package/form-item-config-provider/index.mjs +46 -60
  155. package/form-item-group/index.mjs +2 -157
  156. package/form-radio-group/index.mjs +161 -121
  157. package/form-select/index.mjs +2 -179
  158. package/form-switch/index.mjs +2 -54
  159. package/form-table/index.mjs +131 -84
  160. package/form-table-plus/index.mjs +164 -108
  161. package/form-textarea/index.mjs +90 -56
  162. package/form-tree-select/index.mjs +89 -71
  163. package/form-tree-select-multiple/index.mjs +92 -77
  164. package/form-view/index.mjs +275 -207
  165. package/fy-array/index.mjs +121 -70
  166. package/fy-article/index.mjs +73 -60
  167. package/fy-cascader/index.mjs +113 -90
  168. package/fy-checkbox/index.mjs +96 -64
  169. package/fy-code/index.mjs +48 -50
  170. package/fy-curd/index.mjs +2 -1879
  171. package/fy-date/index.mjs +76 -41
  172. package/fy-draggable/index.mjs +322 -317
  173. package/fy-dynamic/index.mjs +259 -224
  174. package/fy-empty/index.mjs +35 -36
  175. package/fy-form/index.mjs +2 -640
  176. package/fy-form-design/index.mjs +2 -2852
  177. package/fy-form-design/style.css +1 -1
  178. package/fy-from/crud/zh.d.ts +1 -1
  179. package/fy-input/index.mjs +117 -97
  180. package/fy-input-color/index.mjs +77 -54
  181. package/fy-input-icon/index.mjs +129 -82
  182. package/fy-input-map/index.mjs +242 -183
  183. package/fy-input-number/index.mjs +74 -49
  184. package/fy-input-table/index.mjs +160 -105
  185. package/fy-input-tree/index.mjs +259 -178
  186. package/fy-progress/index.mjs +36 -39
  187. package/fy-radio/index.mjs +53 -37
  188. package/fy-rate/index.mjs +86 -70
  189. package/fy-select/index.mjs +224 -137
  190. package/fy-slider/index.mjs +68 -43
  191. package/fy-switch/index.mjs +67 -41
  192. package/fy-tabs/index.mjs +46 -46
  193. package/fy-time/index.mjs +81 -53
  194. package/fy-title/index.mjs +18 -27
  195. package/fy-tree/index.mjs +382 -286
  196. package/fy-u-editor/index.mjs +2 -357
  197. package/fy-upload/index.mjs +2 -421
  198. package/guide-steps/index.mjs +72 -71
  199. package/helper-function.d.ts +2 -30
  200. package/helper-function.mjs +41 -67
  201. package/highlight-j-s/index.mjs +50 -59
  202. package/icon-card/index.mjs +34 -36
  203. package/icon-temp/index.mjs +27 -27
  204. package/iframe-window/index.mjs +39 -32
  205. package/image-cropper/index.mjs +171 -73
  206. package/image-preview/index.mjs +187 -116
  207. package/image-viewer/index.mjs +69 -66
  208. package/index.d.ts +3 -9
  209. package/index.mjs +174 -489
  210. package/input-number-range/index.mjs +78 -58
  211. package/j-s-x-component/index.mjs +13 -15
  212. package/keyboard/index.mjs +2 -369
  213. package/license/index.mjs +106 -115
  214. package/loading-view/index.mjs +39 -51
  215. package/login/index.mjs +252 -120
  216. package/monaco-editor/index.mjs +2 -7
  217. package/name-avatar/index.mjs +61 -53
  218. package/nav-bar/index.mjs +33 -30
  219. package/not-implement/index.mjs +10 -22
  220. package/notice/index.mjs +100 -93
  221. package/package.json +3 -3
  222. package/page/index.mjs +18 -25
  223. package/page-header/index.mjs +27 -33
  224. package/page-index/index.mjs +121 -99
  225. package/page-index-top/index.mjs +79 -74
  226. package/page-skeleton/index.mjs +47 -44
  227. package/page-skeleton-new/index.mjs +79 -49
  228. package/pageable-table/index.mjs +2 -512
  229. package/pageable-view/index.mjs +279 -274
  230. package/photo-swipe/index.d.ts +4 -0
  231. package/photo-swipe/index.mjs +33 -36
  232. package/picker-table-view/index.mjs +224 -117
  233. package/present-view/index.mjs +266 -196
  234. package/queue/index.mjs +45 -53
  235. package/record-video/index.mjs +2 -134
  236. package/resize-observer/index.mjs +43 -46
  237. package/search/index.mjs +116 -107
  238. package/sign/index.mjs +103 -110
  239. package/sign-panel/index.mjs +182 -141
  240. package/skeleton/index.mjs +51 -54
  241. package/skeleton-panel/index.mjs +33 -37
  242. package/split-pane/index.mjs +3 -196
  243. package/stateful/index.mjs +69 -73
  244. package/static-pageable-table/index.mjs +72 -64
  245. package/sub-table/index.mjs +508 -206
  246. package/sub-table-plus/index.mjs +592 -230
  247. package/swiper/index.mjs +128 -120
  248. package/tab/index.mjs +117 -119
  249. package/tab-item/index.mjs +48 -56
  250. package/table-column/index.mjs +2 -225
  251. package/table-view/index.mjs +3 -326
  252. package/tabs-view/index.mjs +109 -104
  253. package/tag-render/index.mjs +79 -67
  254. package/text-ellipsis/index.mjs +94 -77
  255. package/toolbar/index.mjs +2 -254
  256. package/toolbar-button/index.mjs +145 -120
  257. package/verify/index.mjs +58 -64
  258. package/vue-cron/index.mjs +2 -1180
  259. package/vue-qr-code/index.mjs +30 -54
  260. package/vue-quill-editor/index.mjs +123 -99
  261. package/vue-tags-input/index.mjs +348 -431
  262. package/vue-tree-select/index.mjs +2 -2627
  263. package/vue-video-player/index.mjs +135 -136
  264. package/watermark/index.mjs +46 -74
  265. package/web-types.json +197 -975
  266. package/x-input-tag/index.mjs +144 -106
  267. package/chunks/ElementBaseInfo.ZADwixb5.mjs +0 -125
  268. package/chunks/ElementForm.CQ3PN5qj.mjs +0 -223
  269. package/chunks/ElementListeners.De_PRuIm.mjs +0 -215
  270. package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +0 -181
  271. package/chunks/ElementOtherConfig.B1NfMTYh.mjs +0 -60
  272. package/chunks/ElementProperties.CosfDrlW.mjs +0 -112
  273. package/chunks/ElementTaskConfig.Bko0kgTp.mjs +0 -317
  274. package/chunks/FlowCondition.Y6qEYi1T.mjs +0 -102
  275. package/chunks/FormTemp.BQxO5IQq.mjs +0 -123
  276. package/chunks/MonacoEditor.D31t4FTy.mjs +0 -327
  277. package/chunks/SignalAndMessage.Bb5PFX0N.mjs +0 -85
  278. package/chunks/UserTaskListeners.Bv3BDfEI.mjs +0 -169
  279. package/chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs +0 -10
  280. package/chunks/confirmable-mixin.B2TtLAdk.mjs +0 -86
  281. package/chunks/core.0Exl13Mz.mjs +0 -54
  282. package/chunks/dataformat.CpqOeGBl.mjs +0 -154
  283. package/chunks/dic.Dkl-leRW.mjs +0 -128
  284. package/chunks/dictionary.DGt59Ir7.mjs +0 -68
  285. package/chunks/dictionary.DqiP9x2m.mjs +0 -25
  286. package/chunks/event.9aDS6jcw.mjs +0 -236
  287. package/chunks/form-input.CvFdwlEV.mjs +0 -31
  288. package/chunks/form-item.LWjePsPa.mjs +0 -233
  289. package/chunks/form-pick.BFTIVn_i.mjs +0 -11
  290. package/chunks/form-validate.CVarNHKX.mjs +0 -12
  291. package/chunks/helper.BiMLcEEk.mjs +0 -41
  292. package/chunks/index.9OxHjTIE.mjs +0 -16
  293. package/chunks/index.B2TRddqf.mjs +0 -184
  294. package/chunks/index.BmYCjxZQ.mjs +0 -47
  295. package/chunks/init.DAsXSoLW.mjs +0 -122
  296. package/chunks/packages.ByyangTp.mjs +0 -58
  297. package/chunks/permission.CO31YIkD.mjs +0 -16
  298. package/chunks/slot.DXIbhGat.mjs +0 -27
  299. package/chunks/sub-table-plus-props.BVsD71hT.mjs +0 -30
  300. package/chunks/tab-mixin.BNK6dxLN.mjs +0 -81
  301. package/chunks/util.DqFv_pWg.mjs +0 -241
  302. package/chunks/utilSelf.Csq1766E.mjs +0 -48
  303. package/chunks/utils.DRcxC1Fb.mjs +0 -60
  304. package/color-picker/index.mjs +0 -78
  305. package/egd-collapse/index.mjs +0 -62
  306. package/egd-collapse-item/index.mjs +0 -72
  307. package/form-input-number/index.mjs +0 -69
  308. package/form-input-number/style.css +0 -1
  309. package/input-number/index.mjs +0 -232
  310. package/input-number/style.css +0 -1
  311. package/keep-view-alive/index.mjs +0 -117
  312. package/search-popover/index.mjs +0 -118
  313. package/search-popover/style.css +0 -1
  314. /package/{base.css → utils/style.css} +0 -0
package/chat/index.mjs CHANGED
@@ -1,266 +1,441 @@
1
- import { formatDate as r } from "@web-utils/integrations/dayjs";
2
- import { s as l } from "../chunks/util.DqFv_pWg.mjs";
3
- import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
- const d = {
5
- name: "Chat",
6
- props: {
7
- beforeOpen: Function,
8
- tools: {
9
- type: Object,
10
- default: () => ({
11
- img: !0,
12
- video: !0,
13
- file: !0
14
- })
15
- },
16
- placeholder: {
17
- type: String,
18
- default: "请输入..."
19
- },
20
- width: {
21
- type: [String, Number],
22
- default: "100%"
23
- },
24
- height: {
25
- type: [String, Number],
26
- default: "520px"
27
- },
28
- value: {
29
- type: String
30
- },
31
- notice: {
32
- type: Boolean,
33
- default: !0
34
- },
35
- audio: {
36
- type: Array,
37
- default: () => [
38
- "https://www.helloweba.net/demo/notifysound/notify.ogg",
39
- "https://www.helloweba.net/demo/notifysound/notify.mp3",
40
- "https://www.helloweba.net/demo/notifysound/notify.wav"
41
- ]
42
- },
43
- config: {
44
- type: Object,
45
- default: () => ({})
46
- },
47
- keylist: {
48
- type: Array,
49
- default: () => []
50
- },
51
- list: {
52
- type: Array,
53
- default: () => []
54
- }
55
- },
56
- data() {
57
- return {
58
- upload: {
59
- box: !1,
60
- src: "",
61
- type: "",
62
- title: ""
63
- },
64
- visible: !1,
65
- imgSrc: "",
66
- videoSrc: "",
67
- audioSrc: "",
68
- keys: "",
69
- show: !1
70
- };
71
- },
72
- computed: {
73
- msg: {
74
- get() {
75
- return this.value;
76
- },
77
- set(s) {
78
- this.$emit("input", s), this.$emit("change", s);
79
- }
80
- },
81
- heightStyleName() {
82
- return {
83
- height: l(this.height)
84
- };
85
- },
86
- widthStyleName() {
87
- return {
88
- width: l(this.width)
89
- };
90
- },
91
- msgActive() {
92
- return this.msg.replace(/[\r\n]/g, "");
93
- }
94
- },
95
- methods: {
96
- uploadSubmit() {
97
- this.$refs.form.validate((s) => {
98
- s && (this.upload.box = !1, this.$emit("submit", this.getDetail(this.upload)));
99
- });
100
- },
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;
103
- },
104
- handleClose(s) {
105
- this.imgSrc = void 0, this.videoSrc = void 0, this.audioSrc = void 0, s();
106
- },
107
- addKey() {
108
- this.keys !== "" && (this.$emit("keyadd", this.keys), this.keys = ""), this.visible = !1;
109
- },
110
- sendKey(s) {
111
- this.$emit("keysend", s);
112
- },
113
- getAudio() {
114
- this.$refs.chatAudio.play();
115
- },
116
- getNotification(s) {
117
- const t = this, e = Notification || window.Notification;
118
- if (e) {
119
- let a = function() {
120
- e.requestPermission((n) => {
121
- n === "granted" ? o() : console.log("用户无情残忍的拒绝了你!!!");
122
- });
123
- }, o = function() {
124
- const n = new Notification(t.config.name, {
125
- body: s,
126
- icon: t.config.img
127
- });
128
- n.onshow = function() {
129
- t.getAudio(), setTimeout(() => {
130
- n.close();
131
- }, 2500);
132
- }, n.onclick = function() {
133
- n.close();
134
- };
135
- };
136
- const i = e.permission;
137
- i === "granted" ? o() : i === "denied" ? console.log("用户拒绝了你!!!") : a();
138
- }
139
- },
140
- // mine为'我'的对话
141
- // text为内容
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"),
145
- text: typeof e != "object" ? {
146
- text: e
147
- } : e,
148
- mine: t,
149
- img: t ? this.config.myImg : this.config.img,
150
- name: t ? this.config.myName : this.config.name
151
- };
152
- this.list.push(a), setTimeout(() => {
153
- this.setScroll();
154
- }, 50);
155
- },
156
- setScroll(s) {
157
- this.$nextTick(() => {
158
- this.$refs.main.scrollTop = s || this.$refs.main.scrollHeight;
159
- });
160
- },
161
- // 用户主动发送
162
- handleSend() {
163
- this.msgActive && this.$emit("submit");
164
- },
165
- // 选择列表
166
- handleItemMsg(s) {
167
- this.$emit("submit", s.ask);
168
- },
169
- // 处理排版
170
- handleDetail(s = "") {
171
- const t = s;
172
- return setTimeout(() => {
173
- (this.$refs.content || []).forEach((i) => {
174
- for (let a = 0; a < i.children.length; a++) {
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(
179
- "data-latitude"
180
- )}<br />${o.getAttribute("data-address")}</span>`), this.setScroll());
181
- }
182
- });
183
- }, 0), t;
184
- },
185
- getDetail(s = {}) {
186
- const { type: t, src: e, name: i, longitude: a, latitude: o, address: n } = s;
187
- if (t === "img")
188
- return `<img data-type="IMG" data-src="${e}" alt=""/>`;
189
- if (t === "video")
190
- return `<video data-type="VIDEO" data-src="${e}"></video>`;
191
- if (t === "audio")
192
- return `<audio data-type="AUDIO" data-src="${e}"></audio>`;
193
- if (t === "file")
194
- return `<file data-type="FILE" data-name="${i}" data-src="${e}"></file>`;
195
- if (t === "map")
196
- return `<map data-type="MAP" data-src="${e}" data-address="${n} " data-latitude="${o}" data-longitude="${a}"></map>`;
197
- },
198
- // 处理事件
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);
202
- };
203
- typeof this.beforeOpen == "function" ? this.beforeOpen(s, t) : t();
204
- },
205
- rootSendMsg(s) {
206
- this.pushMsg({
207
- text: s
208
- }), this.notice && this.getNotification(s.text || s);
209
- }
210
- }
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,
257
- u,
258
- f,
259
- !1,
260
- null,
261
- null
262
- );
263
- const y = m.exports;
264
- export {
265
- y as default
266
- };
1
+ import { t as e } from "../chunks/_plugin-vue_export-helper.7vrlOII_.mjs";
2
+ import { x as t } from "../chunks/util.g-WQEec9.mjs";
3
+ import { Fragment as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderList as f, renderSlot as p, resolveComponent as m, toDisplayString as h, vModelText as g, withCtx as _, withDirectives as v, withKeys as y } from "vue";
4
+ import { formatDate as b } from "@web-utils/integrations/dayjs";
5
+ //#region src/components/chat/Chat.vue
6
+ var x = {
7
+ name: "Chat",
8
+ props: {
9
+ beforeOpen: Function,
10
+ tools: {
11
+ type: Object,
12
+ default: () => ({
13
+ img: !0,
14
+ video: !0,
15
+ file: !0
16
+ })
17
+ },
18
+ placeholder: {
19
+ type: String,
20
+ default: "请输入..."
21
+ },
22
+ width: {
23
+ type: [String, Number],
24
+ default: "100%"
25
+ },
26
+ height: {
27
+ type: [String, Number],
28
+ default: "520px"
29
+ },
30
+ modelValue: { type: String },
31
+ notice: {
32
+ type: Boolean,
33
+ default: !0
34
+ },
35
+ audio: {
36
+ type: Array,
37
+ default: () => [
38
+ "https://www.helloweba.net/demo/notifysound/notify.ogg",
39
+ "https://www.helloweba.net/demo/notifysound/notify.mp3",
40
+ "https://www.helloweba.net/demo/notifysound/notify.wav"
41
+ ]
42
+ },
43
+ config: {
44
+ type: Object,
45
+ default: () => ({})
46
+ },
47
+ keylist: {
48
+ type: Array,
49
+ default: () => []
50
+ },
51
+ list: {
52
+ type: Array,
53
+ default: () => []
54
+ }
55
+ },
56
+ emits: [
57
+ "update:modelValue",
58
+ "change",
59
+ "submit",
60
+ "keyadd",
61
+ "keysend"
62
+ ],
63
+ data() {
64
+ return {
65
+ upload: {
66
+ box: !1,
67
+ src: "",
68
+ type: "",
69
+ title: ""
70
+ },
71
+ visible: !1,
72
+ imgSrc: "",
73
+ videoSrc: "",
74
+ audioSrc: "",
75
+ keys: "",
76
+ show: !1
77
+ };
78
+ },
79
+ computed: {
80
+ msg: {
81
+ get() {
82
+ return this.modelValue;
83
+ },
84
+ set(e) {
85
+ this.$emit("update:modelValue", e), this.$emit("change", e);
86
+ }
87
+ },
88
+ heightStyleName() {
89
+ return { height: t(this.height) };
90
+ },
91
+ widthStyleName() {
92
+ return { width: t(this.width) };
93
+ },
94
+ msgActive() {
95
+ return this.msg.replace(/[\r\n]/g, "");
96
+ }
97
+ },
98
+ methods: {
99
+ uploadSubmit() {
100
+ this.$refs.form.validate((e) => {
101
+ e && (this.upload.box = !1, this.$emit("submit", this.getDetail(this.upload)));
102
+ });
103
+ },
104
+ handleUpload(e) {
105
+ this.upload.type = e, this.upload.src = "", e === "img" ? this.upload.title = "图片上传" : e === "video" ? this.upload.title = "视频上传" : e === "file" && (this.upload.title = "文件上传"), this.upload.box = !0;
106
+ },
107
+ handleClose(e) {
108
+ this.imgSrc = void 0, this.videoSrc = void 0, this.audioSrc = void 0, e();
109
+ },
110
+ addKey() {
111
+ this.keys !== "" && (this.$emit("keyadd", this.keys), this.keys = ""), this.visible = !1;
112
+ },
113
+ sendKey(e) {
114
+ this.$emit("keysend", e);
115
+ },
116
+ getAudio() {
117
+ this.$refs.chatAudio.play();
118
+ },
119
+ getNotification(e) {
120
+ let t = this, n = Notification || window.Notification;
121
+ if (n) {
122
+ let r = n.permission;
123
+ r === "granted" ? a() : r === "denied" ? console.log("用户拒绝了你!!!") : i();
124
+ function i() {
125
+ n.requestPermission((e) => {
126
+ e === "granted" ? a() : console.log("用户无情残忍的拒绝了你!!!");
127
+ });
128
+ }
129
+ function a() {
130
+ let n = new Notification(t.config.name, {
131
+ body: e,
132
+ icon: t.config.img
133
+ });
134
+ n.onshow = function() {
135
+ t.getAudio(), setTimeout(() => {
136
+ n.close();
137
+ }, 2500);
138
+ }, n.onclick = function() {
139
+ n.close();
140
+ };
141
+ }
142
+ }
143
+ },
144
+ pushMsg(e = {}) {
145
+ let t = e.mine === !0, n = e.text || {}, r = {
146
+ date: e.date || b(Date.now(), "YYYY-MM-DD HH:mm:ss"),
147
+ text: typeof n == "object" ? n : { text: n },
148
+ mine: t,
149
+ img: t ? this.config.myImg : this.config.img,
150
+ name: t ? this.config.myName : this.config.name
151
+ };
152
+ this.list.push(r), setTimeout(() => {
153
+ this.setScroll();
154
+ }, 50);
155
+ },
156
+ setScroll(e) {
157
+ this.$nextTick(() => {
158
+ this.$refs.main.scrollTop = e || this.$refs.main.scrollHeight;
159
+ });
160
+ },
161
+ handleSend() {
162
+ this.msgActive && this.$emit("submit");
163
+ },
164
+ handleItemMsg(e) {
165
+ this.$emit("submit", e.ask);
166
+ },
167
+ handleDetail(e = "") {
168
+ let t = e;
169
+ return setTimeout(() => {
170
+ (this.$refs.content || []).forEach((e) => {
171
+ for (let t = 0; t < e.children.length; t++) {
172
+ let n = e.children[t];
173
+ n.getAttribute("data-flag") !== "0" && (n.setAttribute("data-flag", 0), n.onclick = () => {
174
+ this.handleEvent(n.dataset);
175
+ }, n.tagName === "IMG" ? (n.className = "web__msg--img", n.src = n.getAttribute("data-src")) : n.tagName === "VIDEO" ? (n.className = "web__msg--video", n.src = n.getAttribute("data-src")) : n.tagName === "AUDIO" ? (n.className = "web__msg--audio", n.controls = "controls", n.src = n.getAttribute("data-src")) : n.tagName === "FILE" ? (n.className = "web__msg--file", n.innerHTML = `<h2>File</h2><span>${n.getAttribute("data-name")}</span>`) : n.tagName === "MAP" && (n.className = "web__msg--file web__msg--map", n.innerHTML = `<h2>Map</h2><span>${n.getAttribute("data-longitude")} , ${n.getAttribute("data-latitude")}<br />${n.getAttribute("data-address")}</span>`), this.setScroll());
176
+ }
177
+ });
178
+ }, 0), t;
179
+ },
180
+ getDetail(e = {}) {
181
+ let { type: t, src: n, name: r, longitude: i, latitude: a, address: o } = e;
182
+ if (t === "img") return `<img data-type="IMG" data-src="${n}" alt=""/>`;
183
+ if (t === "video") return `<video data-type="VIDEO" data-src="${n}"></video>`;
184
+ if (t === "audio") return `<audio data-type="AUDIO" data-src="${n}"></audio>`;
185
+ if (t === "file") return `<file data-type="FILE" data-name="${r}" data-src="${n}"></file>`;
186
+ if (t === "map") return `<map data-type="MAP" data-src="${n}" data-address="${o} " data-latitude="${a}" data-longitude="${i}"></map>`;
187
+ },
188
+ handleEvent(e) {
189
+ let t = () => {
190
+ e.type === "IMG" ? (this.imgSrc = e.src, this.show = !0) : e.type === "VIDEO" ? (this.videoSrc = e.src, this.show = !0) : e.type === "AUDIO" ? (this.audioSrc = e.src, this.show = !0) : e.type === "FILE" && window.open(e.src);
191
+ };
192
+ typeof this.beforeOpen == "function" ? this.beforeOpen(e, t) : t();
193
+ },
194
+ rootSendMsg(e) {
195
+ this.pushMsg({ text: e }), this.notice && this.getNotification(e.text || e);
196
+ }
197
+ }
198
+ }, S = { ref: "chatAudio" }, ee = ["src"], te = ["src"], C = ["src"], w = { class: "web__logo" }, T = ["src"], E = { class: "web__logo-info" }, D = { class: "web__logo-name" }, O = { class: "web__logo-dept" }, k = { class: "web__content" }, A = {
199
+ ref: "main",
200
+ class: "web__main"
201
+ }, j = { class: "web__main-user" }, M = ["src"], N = { class: "web__main-text" }, P = ["innerHTML"], F = {
202
+ key: 0,
203
+ class: "web__main-list"
204
+ }, I = ["onClick"], L = { class: "web__tools" }, ne = { class: "web__msg" }, R = ["placeholder"], z = { class: "web__msg-menu" }, B = { style: {
205
+ margin: "0",
206
+ "text-align": "right"
207
+ } }, V = { key: 0 }, H = { key: 1 }, U = ["src"], W = ["src"], G = ["src"];
208
+ function K(e, t, b, x, K, q) {
209
+ let J = m("ElInput"), Y = m("ElButton"), X = m("ElPopover"), Z = m("ElDropdownItem"), Q = m("ElTooltip"), re = m("ElScrollbar"), ie = m("ElDropdownMenu"), ae = m("ElDropdown"), oe = m("ElFormItem"), se = m("ElForm"), $ = m("ElementDialog");
210
+ return d(), a("div", {
211
+ class: "avue-chat",
212
+ style: u(q.heightStyleName),
213
+ onKeyup: t[11] || (t[11] = y((...e) => q.handleSend && q.handleSend(...e), ["enter"]))
214
+ }, [
215
+ o("audio", S, [
216
+ o("source", {
217
+ src: b.audio[0],
218
+ type: "audio/ogg"
219
+ }, null, 8, ee),
220
+ o("source", {
221
+ src: b.audio[1],
222
+ type: "audio/mpeg"
223
+ }, null, 8, te),
224
+ o("source", {
225
+ src: b.audio[2],
226
+ type: "audio/wav"
227
+ }, null, 8, C)
228
+ ], 512),
229
+ o("div", w, [
230
+ o("img", {
231
+ src: b.config.img,
232
+ class: "web__logo-img",
233
+ alt: ""
234
+ }, null, 8, T),
235
+ o("div", E, [o("p", D, h(b.config.name), 1), o("p", O, h(b.config.dept), 1)]),
236
+ p(e.$slots, "header")
237
+ ]),
238
+ o("div", k, [o("div", { style: u(q.widthStyleName) }, [o("div", A, [(d(!0), a(n, null, f(b.list, (e, r) => (d(), a("div", {
239
+ key: r,
240
+ class: l(["web__main-item", { "web__main-item--mine": e.mine }])
241
+ }, [o("div", j, [o("img", {
242
+ src: e.img,
243
+ alt: ""
244
+ }, null, 8, M), o("cite", null, [s(h(e.name) + " ", 1), o("i", null, h(e.date), 1)])]), o("div", N, [
245
+ t[12] || (t[12] = o("div", { class: "web__main-arrow" }, null, -1)),
246
+ o("span", {
247
+ ref_for: !0,
248
+ ref: "content",
249
+ innerHTML: q.handleDetail(e.text.text)
250
+ }, null, 8, P),
251
+ e.text.list ? i("v-if", !0) : (d(), a("ul", F, [(d(!0), a(n, null, f(e.text.list, (e, t) => (d(), a("li", {
252
+ key: t,
253
+ onClick: (t) => q.handleItemMsg(e)
254
+ }, h(e.text), 9, I))), 128))]))
255
+ ])], 2))), 128))], 512), o("div", {
256
+ class: "web__footer",
257
+ style: u(q.widthStyleName)
258
+ }, [o("div", L, [
259
+ b.tools.img ? (d(), a("i", {
260
+ key: 0,
261
+ class: "el-icon-picture-outline",
262
+ onClick: t[0] || (t[0] = (e) => q.handleUpload("img"))
263
+ })) : i("v-if", !0),
264
+ b.tools.video ? (d(), a("i", {
265
+ key: 1,
266
+ class: "el-icon-video-camera",
267
+ onClick: t[1] || (t[1] = (e) => q.handleUpload("video"))
268
+ })) : i("v-if", !0),
269
+ b.tools.file ? (d(), a("i", {
270
+ key: 2,
271
+ class: "el-icon-folder-opened",
272
+ onClick: t[2] || (t[2] = (e) => q.handleUpload("file"))
273
+ })) : i("v-if", !0)
274
+ ]), o("div", ne, [v(o("textarea", {
275
+ "onUpdate:modelValue": t[3] || (t[3] = (e) => q.msg = e),
276
+ rows: "2",
277
+ placeholder: b.placeholder,
278
+ class: "web__msg-input"
279
+ }, null, 8, R), [[g, q.msg]]), o("div", z, [c(ae, {
280
+ "split-button": "",
281
+ class: "web__msg-submit",
282
+ type: "primary",
283
+ size: "mini",
284
+ trigger: "click",
285
+ onClick: q.handleSend
286
+ }, {
287
+ dropdown: _(() => [c(ie, null, {
288
+ default: _(() => [c(Z, null, {
289
+ default: _(() => [c(X, {
290
+ modelValue: K.visible,
291
+ "onUpdate:modelValue": t[6] || (t[6] = (e) => K.visible = e),
292
+ placement: "top",
293
+ width: "160"
294
+ }, {
295
+ reference: _(() => [c(Y, {
296
+ type: "text",
297
+ icon: "el-icon-plus"
298
+ })]),
299
+ default: _(() => [c(J, {
300
+ modelValue: K.keys,
301
+ "onUpdate:modelValue": t[4] || (t[4] = (e) => K.keys = e),
302
+ size: "mini",
303
+ style: { "margin-bottom": "10px" },
304
+ rows: 3,
305
+ "show-word-limit": "",
306
+ maxlength: "100",
307
+ placeholder: "请输入快捷回复语",
308
+ type: "textarea"
309
+ }, null, 8, ["modelValue"]), o("div", B, [c(Y, {
310
+ size: "mini",
311
+ type: "text",
312
+ onClick: t[5] || (t[5] = (e) => K.visible = !1)
313
+ }, {
314
+ default: _(() => [...t[13] || (t[13] = [s(" 取消 ", -1)])]),
315
+ _: 1
316
+ }), c(Y, {
317
+ type: "primary",
318
+ size: "mini",
319
+ onClick: q.addKey
320
+ }, {
321
+ default: _(() => [...t[14] || (t[14] = [s(" 确定 ", -1)])]),
322
+ _: 1
323
+ }, 8, ["onClick"])])]),
324
+ _: 1
325
+ }, 8, ["modelValue"])]),
326
+ _: 1
327
+ }), c(re, { style: { height: "100px" } }, {
328
+ default: _(() => [(d(!0), a(n, null, f(b.keylist, (e, t) => (d(), r(Z, {
329
+ key: t,
330
+ onClick: (t) => q.sendKey(e)
331
+ }, {
332
+ default: _(() => [c(Q, {
333
+ effect: "dark",
334
+ content: e,
335
+ placement: "top"
336
+ }, {
337
+ default: _(() => [o("span", null, h(e.substr(0, 10)) + h(e.length > 10 ? "..." : ""), 1)]),
338
+ _: 2
339
+ }, 1032, ["content"])]),
340
+ _: 2
341
+ }, 1032, ["onClick"]))), 128))]),
342
+ _: 1
343
+ })]),
344
+ _: 1
345
+ })]),
346
+ default: _(() => [t[15] || (t[15] = s(" 发送 ", -1))]),
347
+ _: 1
348
+ }, 8, ["onClick"])])])], 4)], 4), p(e.$slots, "default")]),
349
+ K.upload.box ? (d(), a("div", V, [c($, {
350
+ visible: K.upload.box,
351
+ "onUpdate:visible": t[9] || (t[9] = (e) => K.upload.box = e),
352
+ title: K.upload.title,
353
+ "body-padding": !1,
354
+ width: "30%"
355
+ }, {
356
+ footer: _(() => [c(Y, {
357
+ size: "small",
358
+ onClick: t[8] || (t[8] = (e) => K.upload.box = !1)
359
+ }, {
360
+ default: _(() => [...t[16] || (t[16] = [s("取 消", -1)])]),
361
+ _: 1
362
+ }), c(Y, {
363
+ type: "primary",
364
+ size: "small",
365
+ onClick: q.uploadSubmit
366
+ }, {
367
+ default: _(() => [...t[17] || (t[17] = [s("确 定", -1)])]),
368
+ _: 1
369
+ }, 8, ["onClick"])]),
370
+ default: _(() => [c(se, {
371
+ ref: "form",
372
+ model: K.upload
373
+ }, {
374
+ default: _(() => [c(oe, {
375
+ prop: "src",
376
+ rules: [{
377
+ required: !0,
378
+ message: "地址不能为空"
379
+ }]
380
+ }, {
381
+ default: _(() => [c(J, {
382
+ modelValue: K.upload.src,
383
+ "onUpdate:modelValue": t[7] || (t[7] = (e) => K.upload.src = e),
384
+ size: "mini",
385
+ style: { "margin-bottom": "10px" },
386
+ rows: 4,
387
+ "show-word-limit": "",
388
+ maxlength: "100",
389
+ placeholder: "请输入地址",
390
+ type: "textarea"
391
+ }, null, 8, ["modelValue"])]),
392
+ _: 1
393
+ })]),
394
+ _: 1
395
+ }, 8, ["model"])]),
396
+ _: 1
397
+ }, 8, ["visible", "title"])])) : i("v-if", !0),
398
+ K.show ? (d(), a("div", H, [c($, {
399
+ visible: K.show,
400
+ "onUpdate:visible": t[10] || (t[10] = (e) => K.show = e),
401
+ "body-padding": !1,
402
+ title: "预览",
403
+ width: "40%",
404
+ "before-close": q.handleClose,
405
+ class: "web__dialog"
406
+ }, {
407
+ default: _(() => [
408
+ K.imgSrc ? (d(), a("img", {
409
+ key: 0,
410
+ src: K.imgSrc,
411
+ style: {
412
+ width: "100%",
413
+ "object-fit": "cover"
414
+ }
415
+ }, null, 8, U)) : i("v-if", !0),
416
+ K.videoSrc ? (d(), a("video", {
417
+ key: 1,
418
+ src: K.videoSrc,
419
+ style: {
420
+ width: "100%",
421
+ "object-fit": "cover"
422
+ },
423
+ controls: "controls"
424
+ }, null, 8, W)) : i("v-if", !0),
425
+ K.audioSrc ? (d(), a("audio", {
426
+ key: 2,
427
+ src: K.audioSrc,
428
+ style: {
429
+ width: "100%",
430
+ "object-fit": "cover"
431
+ },
432
+ controls: "controls"
433
+ }, null, 8, G)) : i("v-if", !0)
434
+ ]),
435
+ _: 1
436
+ }, 8, ["visible", "before-close"])])) : i("v-if", !0)
437
+ ], 36);
438
+ }
439
+ var q = /* @__PURE__ */ e(x, [["render", K]]);
440
+ //#endregion
441
+ export { q as default };