vue-element-ui-x 0.1.8-beta → 0.1.10-beta

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 (97) hide show
  1. package/lib/components/Attachments/index.js +229 -237
  2. package/lib/components/Bubble/index.js +47 -34
  3. package/lib/components/BubbleList/index.js +57 -49
  4. package/lib/components/Conversations/index.js +32 -69
  5. package/lib/components/FilesCard/index.js +207 -211
  6. package/lib/components/Prompts/index.js +21 -21
  7. package/lib/components/Sender/index.js +18 -18
  8. package/lib/components/Think/index.js +1 -1
  9. package/lib/components/Thinking/index.js +1 -1
  10. package/lib/components/ThoughtChain/index.js +60 -47
  11. package/lib/components/Typewriter/index.js +46 -33
  12. package/lib/components/Welcome/index.js +1 -1
  13. package/lib/index.common.js +1 -1
  14. package/lib/index.esm.js +1 -1
  15. package/lib/index.js +479 -427
  16. package/lib/index.umd.js +1 -1
  17. package/lib/mixins/index.js +105 -16
  18. package/package.json +1 -1
  19. package/src/components/Attachments/index.js +8 -8
  20. package/src/components/Attachments/src/main.vue +10 -10
  21. package/src/components/Bubble/index.js +6 -6
  22. package/src/components/Bubble/src/main.vue +299 -299
  23. package/src/components/BubbleList/index.js +8 -8
  24. package/src/components/BubbleList/src/loading.vue +75 -75
  25. package/src/components/BubbleList/src/main.vue +461 -466
  26. package/src/components/Conversations/index.js +8 -8
  27. package/src/components/Conversations/src/components/item.vue +13 -34
  28. package/src/components/Conversations/src/main.vue +622 -635
  29. package/src/components/FilesCard/index.js +8 -8
  30. package/src/components/FilesCard/src/fileSvg/audio.vue +38 -38
  31. package/src/components/FilesCard/src/fileSvg/code.vue +35 -35
  32. package/src/components/FilesCard/src/fileSvg/database.vue +94 -94
  33. package/src/components/FilesCard/src/fileSvg/excel.vue +38 -38
  34. package/src/components/FilesCard/src/fileSvg/file.vue +40 -40
  35. package/src/components/FilesCard/src/fileSvg/image.vue +40 -40
  36. package/src/components/FilesCard/src/fileSvg/index.js +46 -46
  37. package/src/components/FilesCard/src/fileSvg/link.vue +54 -54
  38. package/src/components/FilesCard/src/fileSvg/mark.vue +38 -38
  39. package/src/components/FilesCard/src/fileSvg/pdf.vue +38 -38
  40. package/src/components/FilesCard/src/fileSvg/ppt.vue +38 -38
  41. package/src/components/FilesCard/src/fileSvg/three.vue +38 -38
  42. package/src/components/FilesCard/src/fileSvg/txt.vue +38 -38
  43. package/src/components/FilesCard/src/fileSvg/unknown.vue +54 -54
  44. package/src/components/FilesCard/src/fileSvg/video.vue +38 -38
  45. package/src/components/FilesCard/src/fileSvg/word.vue +38 -38
  46. package/src/components/FilesCard/src/fileSvg/zip.vue +38 -38
  47. package/src/components/FilesCard/src/main.vue +4 -8
  48. package/src/components/FilesCard/src/options.js +18 -18
  49. package/src/components/Prompts/index.js +8 -8
  50. package/src/components/Prompts/src/main.vue +248 -248
  51. package/src/components/Sender/index.js +8 -8
  52. package/src/components/Sender/src/components/ClearButton.vue +28 -28
  53. package/src/components/Sender/src/components/Loading.vue +53 -53
  54. package/src/components/Sender/src/components/LoadingButton.vue +39 -39
  55. package/src/components/Sender/src/components/SendButton.vue +26 -26
  56. package/src/components/Sender/src/components/SpeechButton.vue +24 -24
  57. package/src/components/Sender/src/components/SpeechLoading.vue +87 -87
  58. package/src/components/Sender/src/components/SpeechLoadingButton.vue +43 -43
  59. package/src/components/Sender/src/main.vue +4 -3
  60. package/src/components/Think/index.js +8 -8
  61. package/src/components/Think/src/main.vue +190 -190
  62. package/src/components/Thinking/index.js +8 -8
  63. package/src/components/ThoughtChain/index.js +8 -8
  64. package/src/components/ThoughtChain/src/main.vue +293 -293
  65. package/src/components/Typewriter/index.js +8 -8
  66. package/src/components/Typewriter/src/main.vue +10 -2
  67. package/src/components/Welcome/index.js +8 -8
  68. package/src/components/Welcome/src/main.vue +151 -151
  69. package/src/mixins/recordMixin.js +0 -1
  70. package/src/mixins/sendMixin.js +104 -11
  71. package/src/mixins/streamMixin.js +3 -5
  72. package/src/styles/Attachments.scss +236 -236
  73. package/src/styles/Bubble.scss +157 -157
  74. package/src/styles/BubbleList.scss +148 -148
  75. package/src/styles/Conversations.scss +260 -260
  76. package/src/styles/FilesCard.scss +221 -221
  77. package/src/styles/Prompts.scss +195 -195
  78. package/src/styles/Sender.scss +199 -199
  79. package/src/styles/Think.scss +134 -134
  80. package/src/styles/ThoughtChain.scss +113 -113
  81. package/src/styles/Typewriter.scss +66 -66
  82. package/src/theme/var.scss +72 -72
  83. package/lib/attachments.js +0 -3082
  84. package/lib/bubble-list.js +0 -13840
  85. package/lib/bubble.js +0 -13125
  86. package/lib/conversations.js +0 -18825
  87. package/lib/files-card.js +0 -2471
  88. package/lib/mixins.js +0 -1016
  89. package/lib/prompts.js +0 -832
  90. package/lib/sender.js +0 -1911
  91. package/lib/think.js +0 -799
  92. package/lib/thinking.js +0 -809
  93. package/lib/thought-chain.js +0 -30391
  94. package/lib/typewriter.js +0 -12788
  95. package/lib/welcome.js +0 -755
  96. package/src/styles/button.scss +0 -302
  97. package/src/styles/var.scss +0 -1052
package/lib/sender.js DELETED
@@ -1,1911 +0,0 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 98);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
91
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
-
93
- "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
96
-
97
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
- // This module is a runtime utility for cleaner component module output and will
99
- // be included in the final webpack user bundle.
100
-
101
- function normalizeComponent(
102
- scriptExports,
103
- render,
104
- staticRenderFns,
105
- functionalTemplate,
106
- injectStyles,
107
- scopeId,
108
- moduleIdentifier /* server only */,
109
- shadowMode /* vue-cli only */
110
- ) {
111
- // Vue.extend constructor export interop
112
- var options =
113
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
114
-
115
- // render functions
116
- if (render) {
117
- options.render = render
118
- options.staticRenderFns = staticRenderFns
119
- options._compiled = true
120
- }
121
-
122
- // functional template
123
- if (functionalTemplate) {
124
- options.functional = true
125
- }
126
-
127
- // scopedId
128
- if (scopeId) {
129
- options._scopeId = 'data-v-' + scopeId
130
- }
131
-
132
- var hook
133
- if (moduleIdentifier) {
134
- // server build
135
- hook = function (context) {
136
- // 2.3 injection
137
- context =
138
- context || // cached call
139
- (this.$vnode && this.$vnode.ssrContext) || // stateful
140
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
141
- // 2.2 with runInNewContext: true
142
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
143
- context = __VUE_SSR_CONTEXT__
144
- }
145
- // inject component styles
146
- if (injectStyles) {
147
- injectStyles.call(this, context)
148
- }
149
- // register component module identifier for async chunk inferrence
150
- if (context && context._registeredComponents) {
151
- context._registeredComponents.add(moduleIdentifier)
152
- }
153
- }
154
- // used by ssr in case component is cached and beforeCreate
155
- // never gets called
156
- options._ssrRegister = hook
157
- } else if (injectStyles) {
158
- hook = shadowMode
159
- ? function () {
160
- injectStyles.call(
161
- this,
162
- (options.functional ? this.parent : this).$root.$options.shadowRoot
163
- )
164
- }
165
- : injectStyles
166
- }
167
-
168
- if (hook) {
169
- if (options.functional) {
170
- // for template-only hot-reload because in that case the render fn doesn't
171
- // go through the normalizer
172
- options._injectStyles = hook
173
- // register for functional component in vue file
174
- var originalRender = options.render
175
- options.render = function renderWithStyleInjection(h, context) {
176
- hook.call(context)
177
- return originalRender(h, context)
178
- }
179
- } else {
180
- // inject component registration as beforeCreate hook
181
- var existing = options.beforeCreate
182
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
183
- }
184
- }
185
-
186
- return {
187
- exports: scriptExports,
188
- options: options
189
- }
190
- }
191
-
192
-
193
- /***/ }),
194
-
195
- /***/ 2:
196
- /***/ (function(module, exports, __webpack_require__) {
197
-
198
- "use strict";
199
-
200
-
201
- /*
202
- MIT License http://www.opensource.org/licenses/mit-license.php
203
- Author Tobias Koppers @sokra
204
- */
205
- // css base code, injected by the css-loader
206
- // eslint-disable-next-line func-names
207
- module.exports = function (cssWithMappingToString) {
208
- var list = []; // return the list of modules as css string
209
-
210
- list.toString = function toString() {
211
- return this.map(function (item) {
212
- var content = cssWithMappingToString(item);
213
-
214
- if (item[2]) {
215
- return "@media ".concat(item[2], " {").concat(content, "}");
216
- }
217
-
218
- return content;
219
- }).join("");
220
- }; // import a list of modules into the list
221
- // eslint-disable-next-line func-names
222
-
223
-
224
- list.i = function (modules, mediaQuery, dedupe) {
225
- if (typeof modules === "string") {
226
- // eslint-disable-next-line no-param-reassign
227
- modules = [[null, modules, ""]];
228
- }
229
-
230
- var alreadyImportedModules = {};
231
-
232
- if (dedupe) {
233
- for (var i = 0; i < this.length; i++) {
234
- // eslint-disable-next-line prefer-destructuring
235
- var id = this[i][0];
236
-
237
- if (id != null) {
238
- alreadyImportedModules[id] = true;
239
- }
240
- }
241
- }
242
-
243
- for (var _i = 0; _i < modules.length; _i++) {
244
- var item = [].concat(modules[_i]);
245
-
246
- if (dedupe && alreadyImportedModules[item[0]]) {
247
- // eslint-disable-next-line no-continue
248
- continue;
249
- }
250
-
251
- if (mediaQuery) {
252
- if (!item[2]) {
253
- item[2] = mediaQuery;
254
- } else {
255
- item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
256
- }
257
- }
258
-
259
- list.push(item);
260
- }
261
- };
262
-
263
- return list;
264
- };
265
-
266
- /***/ }),
267
-
268
- /***/ 3:
269
- /***/ (function(module, exports, __webpack_require__) {
270
-
271
- "use strict";
272
-
273
-
274
- var isOldIE = function isOldIE() {
275
- var memo;
276
- return function memorize() {
277
- if (typeof memo === 'undefined') {
278
- // Test for IE <= 9 as proposed by Browserhacks
279
- // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
280
- // Tests for existence of standard globals is to allow style-loader
281
- // to operate correctly into non-standard environments
282
- // @see https://github.com/webpack-contrib/style-loader/issues/177
283
- memo = Boolean(window && document && document.all && !window.atob);
284
- }
285
-
286
- return memo;
287
- };
288
- }();
289
-
290
- var getTarget = function getTarget() {
291
- var memo = {};
292
- return function memorize(target) {
293
- if (typeof memo[target] === 'undefined') {
294
- var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
295
-
296
- if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
297
- try {
298
- // This will throw an exception if access to iframe is blocked
299
- // due to cross-origin restrictions
300
- styleTarget = styleTarget.contentDocument.head;
301
- } catch (e) {
302
- // istanbul ignore next
303
- styleTarget = null;
304
- }
305
- }
306
-
307
- memo[target] = styleTarget;
308
- }
309
-
310
- return memo[target];
311
- };
312
- }();
313
-
314
- var stylesInDom = [];
315
-
316
- function getIndexByIdentifier(identifier) {
317
- var result = -1;
318
-
319
- for (var i = 0; i < stylesInDom.length; i++) {
320
- if (stylesInDom[i].identifier === identifier) {
321
- result = i;
322
- break;
323
- }
324
- }
325
-
326
- return result;
327
- }
328
-
329
- function modulesToDom(list, options) {
330
- var idCountMap = {};
331
- var identifiers = [];
332
-
333
- for (var i = 0; i < list.length; i++) {
334
- var item = list[i];
335
- var id = options.base ? item[0] + options.base : item[0];
336
- var count = idCountMap[id] || 0;
337
- var identifier = "".concat(id, " ").concat(count);
338
- idCountMap[id] = count + 1;
339
- var index = getIndexByIdentifier(identifier);
340
- var obj = {
341
- css: item[1],
342
- media: item[2],
343
- sourceMap: item[3]
344
- };
345
-
346
- if (index !== -1) {
347
- stylesInDom[index].references++;
348
- stylesInDom[index].updater(obj);
349
- } else {
350
- stylesInDom.push({
351
- identifier: identifier,
352
- updater: addStyle(obj, options),
353
- references: 1
354
- });
355
- }
356
-
357
- identifiers.push(identifier);
358
- }
359
-
360
- return identifiers;
361
- }
362
-
363
- function insertStyleElement(options) {
364
- var style = document.createElement('style');
365
- var attributes = options.attributes || {};
366
-
367
- if (typeof attributes.nonce === 'undefined') {
368
- var nonce = true ? __webpack_require__.nc : undefined;
369
-
370
- if (nonce) {
371
- attributes.nonce = nonce;
372
- }
373
- }
374
-
375
- Object.keys(attributes).forEach(function (key) {
376
- style.setAttribute(key, attributes[key]);
377
- });
378
-
379
- if (typeof options.insert === 'function') {
380
- options.insert(style);
381
- } else {
382
- var target = getTarget(options.insert || 'head');
383
-
384
- if (!target) {
385
- throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
386
- }
387
-
388
- target.appendChild(style);
389
- }
390
-
391
- return style;
392
- }
393
-
394
- function removeStyleElement(style) {
395
- // istanbul ignore if
396
- if (style.parentNode === null) {
397
- return false;
398
- }
399
-
400
- style.parentNode.removeChild(style);
401
- }
402
- /* istanbul ignore next */
403
-
404
-
405
- var replaceText = function replaceText() {
406
- var textStore = [];
407
- return function replace(index, replacement) {
408
- textStore[index] = replacement;
409
- return textStore.filter(Boolean).join('\n');
410
- };
411
- }();
412
-
413
- function applyToSingletonTag(style, index, remove, obj) {
414
- var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE
415
-
416
- /* istanbul ignore if */
417
-
418
- if (style.styleSheet) {
419
- style.styleSheet.cssText = replaceText(index, css);
420
- } else {
421
- var cssNode = document.createTextNode(css);
422
- var childNodes = style.childNodes;
423
-
424
- if (childNodes[index]) {
425
- style.removeChild(childNodes[index]);
426
- }
427
-
428
- if (childNodes.length) {
429
- style.insertBefore(cssNode, childNodes[index]);
430
- } else {
431
- style.appendChild(cssNode);
432
- }
433
- }
434
- }
435
-
436
- function applyToTag(style, options, obj) {
437
- var css = obj.css;
438
- var media = obj.media;
439
- var sourceMap = obj.sourceMap;
440
-
441
- if (media) {
442
- style.setAttribute('media', media);
443
- } else {
444
- style.removeAttribute('media');
445
- }
446
-
447
- if (sourceMap && typeof btoa !== 'undefined') {
448
- css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
449
- } // For old IE
450
-
451
- /* istanbul ignore if */
452
-
453
-
454
- if (style.styleSheet) {
455
- style.styleSheet.cssText = css;
456
- } else {
457
- while (style.firstChild) {
458
- style.removeChild(style.firstChild);
459
- }
460
-
461
- style.appendChild(document.createTextNode(css));
462
- }
463
- }
464
-
465
- var singleton = null;
466
- var singletonCounter = 0;
467
-
468
- function addStyle(obj, options) {
469
- var style;
470
- var update;
471
- var remove;
472
-
473
- if (options.singleton) {
474
- var styleIndex = singletonCounter++;
475
- style = singleton || (singleton = insertStyleElement(options));
476
- update = applyToSingletonTag.bind(null, style, styleIndex, false);
477
- remove = applyToSingletonTag.bind(null, style, styleIndex, true);
478
- } else {
479
- style = insertStyleElement(options);
480
- update = applyToTag.bind(null, style, options);
481
-
482
- remove = function remove() {
483
- removeStyleElement(style);
484
- };
485
- }
486
-
487
- update(obj);
488
- return function updateStyle(newObj) {
489
- if (newObj) {
490
- if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
491
- return;
492
- }
493
-
494
- update(obj = newObj);
495
- } else {
496
- remove();
497
- }
498
- };
499
- }
500
-
501
- module.exports = function (list, options) {
502
- options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
503
- // tags it will allow on a page
504
-
505
- if (!options.singleton && typeof options.singleton !== 'boolean') {
506
- options.singleton = isOldIE();
507
- }
508
-
509
- list = list || [];
510
- var lastIdentifiers = modulesToDom(list, options);
511
- return function update(newList) {
512
- newList = newList || [];
513
-
514
- if (Object.prototype.toString.call(newList) !== '[object Array]') {
515
- return;
516
- }
517
-
518
- for (var i = 0; i < lastIdentifiers.length; i++) {
519
- var identifier = lastIdentifiers[i];
520
- var index = getIndexByIdentifier(identifier);
521
- stylesInDom[index].references--;
522
- }
523
-
524
- var newLastIdentifiers = modulesToDom(newList, options);
525
-
526
- for (var _i = 0; _i < lastIdentifiers.length; _i++) {
527
- var _identifier = lastIdentifiers[_i];
528
-
529
- var _index = getIndexByIdentifier(_identifier);
530
-
531
- if (stylesInDom[_index].references === 0) {
532
- stylesInDom[_index].updater();
533
-
534
- stylesInDom.splice(_index, 1);
535
- }
536
- }
537
-
538
- lastIdentifiers = newLastIdentifiers;
539
- };
540
- };
541
-
542
- /***/ }),
543
-
544
- /***/ 89:
545
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
546
-
547
- "use strict";
548
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
549
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
550
- // Imports
551
-
552
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
553
- // Module
554
- ___CSS_LOADER_EXPORT___.push([module.i, ".el-x-send-button .el-button .el-icon-brush[data-v-74c70621]{transform:rotate(180deg)}", ""]);
555
- // Exports
556
- /* harmony default export */ __webpack_exports__["a"] = (___CSS_LOADER_EXPORT___);
557
-
558
-
559
- /***/ }),
560
-
561
- /***/ 90:
562
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
563
-
564
- "use strict";
565
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
566
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
567
- // Imports
568
-
569
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
570
- // Module
571
- ___CSS_LOADER_EXPORT___.push([module.i, ".el-x-send-button[data-v-4d4a8cac]{height:32px}.el-x-send-button .el-button[data-v-4d4a8cac]{padding:0;width:32px;height:32px}.el-x-send-button .loading-svg[data-v-4d4a8cac]{color:#409eff;width:100%}", ""]);
572
- // Exports
573
- /* harmony default export */ __webpack_exports__["a"] = (___CSS_LOADER_EXPORT___);
574
-
575
-
576
- /***/ }),
577
-
578
- /***/ 91:
579
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
580
-
581
- "use strict";
582
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
583
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
584
- // Imports
585
-
586
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
587
- // Module
588
- ___CSS_LOADER_EXPORT___.push([module.i, ".el-x-send-button .el-button[data-v-1d4ab0c1]{padding:0;width:32px;height:32px}.el-x-send-button .loading-svg[data-v-1d4ab0c1]{color:#409eff;width:16px}", ""]);
589
- // Exports
590
- /* harmony default export */ __webpack_exports__["a"] = (___CSS_LOADER_EXPORT___);
591
-
592
-
593
- /***/ }),
594
-
595
- /***/ 92:
596
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
597
-
598
- "use strict";
599
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
600
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
601
- // Imports
602
-
603
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
604
- // Module
605
- ___CSS_LOADER_EXPORT___.push([module.i, "[data-v-0f2f8caa]:root{--color-primary: #409EFF;--color-success: #67C23A;--color-warning: #E6A23C;--color-danger: #F56C6C;--color-info: #909399}[data-v-0f2f8caa]:root{--el-x-sender-trigger-popover-width: fit-content;--el-x-sender-trigger-popover-left: 0px}.el-x-sender[data-v-0f2f8caa]{width:100%;display:flex;flex-direction:column;position:relative;box-sizing:border-box;box-shadow:0 1px 2px 0 rgba(0,0,0,.03),0 1px 6px -1px rgba(0,0,0,.02),0 2px 4px 0 rgba(0,0,0,.02);transition:background .3s;border-radius:calc(4px*2);border-color:#dcdfe6;border-width:0;border-style:solid;transition:width 300ms}.el-x-sender[data-v-0f2f8caa]:after{content:\"\";position:absolute;inset:0;pointer-events:none;transition:border-color .3s;border-radius:inherit;border-style:inherit;border-color:inherit;border-width:1px}.el-x-sender[data-v-0f2f8caa]:focus-within{box-shadow:0 2px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border-color:#409eff}.el-x-sender[data-v-0f2f8caa]:focus-within::after{border-width:2px}.el-x-sender .el-x-sender-header-wrap[data-v-0f2f8caa]{display:flex;flex-direction:column;gap:8px;width:100%;margin:0;padding:0}.el-x-sender .slide-enter-active[data-v-0f2f8caa],.el-x-sender .slide-leave-active[data-v-0f2f8caa]{transition:height 300ms,opacity 300ms,border 300ms;overflow:hidden}.el-x-sender .slide-enter[data-v-0f2f8caa],.el-x-sender .slide-leave-to[data-v-0f2f8caa]{height:0;opacity:0}.el-x-sender .el-x-sender-header[data-v-0f2f8caa]{border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#dcdfe6}.el-x-sender .el-x-sender-content[data-v-0f2f8caa]{display:flex;gap:8px;width:100%;padding-block:12px;padding-inline-start:16px;padding-inline-end:12px;box-sizing:border-box;align-items:flex-end}.el-x-sender .el-x-sender-content .el-x-sender-prefix[data-v-0f2f8caa]{flex:none}.el-x-sender .el-x-sender-content .el-x-sender-input[data-v-0f2f8caa]{height:100%;display:flex;align-items:center;align-self:center}.el-x-sender .el-x-sender-content .el-x-sender-input[data-v-0f2f8caa] .el-textarea__inner{padding:0;margin:0;color:#303133;font-size:14px;line-height:24px;list-style:none;position:relative;display:inline-block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:auto;min-height:auto !important;border-radius:0;border:none;flex:auto;align-self:center;vertical-align:bottom;resize:none;background-color:rgba(0,0,0,0);transition:all .3s,height 0s;box-shadow:none !important}.el-x-sender .el-x-sender-content .el-x-sender-action-list-presets[data-v-0f2f8caa]{display:flex;gap:8px;flex-direction:row-reverse}.el-x-sender .content-variant-updown[data-v-0f2f8caa]{display:flex;flex-direction:column;align-items:initial}.el-x-sender .content-variant-updown .el-x-sender-updown-wrap[data-v-0f2f8caa]{display:flex;justify-content:space-between;gap:8px}.el-x-sender .content-variant-updown .el-x-sender-updown-wrap .el-x-sender-prefix[data-v-0f2f8caa]{flex:initial}.el-x-sender .content-variant-updown .el-x-sender-updown-wrap .el-x-sender-action-list[data-v-0f2f8caa]{margin-left:auto}.el-x-sender .el-x-sender-footer[data-v-0f2f8caa]{border-top-width:1px;border-top-style:solid;border-top-color:#dcdfe6}.el-x-sender-disabled[data-v-0f2f8caa]{background-color:#f5f7fa;pointer-events:none}.el-x-sender-trigger-popover[data-v-0f2f8caa]{width:fit-content !important;margin-left:0px !important;max-width:calc(100% - 54px) !important;width:var(--el-x-sender-trigger-popover-width) !important;margin-left:var(--el-x-sender-trigger-popover-left) !important}", ""]);
606
- // Exports
607
- /* harmony default export */ __webpack_exports__["a"] = (___CSS_LOADER_EXPORT___);
608
-
609
-
610
- /***/ }),
611
-
612
- /***/ 98:
613
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
614
-
615
- "use strict";
616
- // ESM COMPAT FLAG
617
- __webpack_require__.r(__webpack_exports__);
618
-
619
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/main.vue?vue&type=template&id=0f2f8caa&scoped=true
620
- var render = function render() {
621
- var _vm = this,
622
- _c = _vm._self._c;
623
- return _c("div", {
624
- staticClass: "el-x-sender-wrap",
625
- style: {
626
- cursor: _vm.disabled ? "not-allowed" : "default",
627
- "--el-x-sender-trigger-popover-width": _vm.triggerPopoverWidth,
628
- "--el-x-sender-trigger-popover-left": _vm.triggerPopoverLeft
629
- }
630
- }, [_c("div", {
631
- ref: "senderRef",
632
- staticClass: "el-x-sender",
633
- class: {
634
- "el-x-sender-disabled": _vm.disabled
635
- },
636
- style: {
637
- "--el-x-sender-box-shadow-tertiary": "0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02)",
638
- "--el-x-sender-input-font-size": "14px",
639
- "--el-x-sender-header-animation-duration": `${_vm.headerAnimationTimer}ms`
640
- }
641
- }, [_c("transition", {
642
- attrs: {
643
- name: "slide"
644
- }
645
- }, [_vm.visiableHeader ? _c("div", {
646
- staticClass: "el-x-sender-header-wrap"
647
- }, [_vm.$slots.header ? _c("div", {
648
- staticClass: "el-x-sender-header"
649
- }, [_vm._t("header")], 2) : _vm._e()]) : _vm._e()]), _vm._v(" "), _c("div", {
650
- staticClass: "el-x-sender-content",
651
- class: {
652
- "content-variant-updown": _vm.variant === "updown"
653
- },
654
- on: {
655
- mousedown: _vm.onContentMouseDown
656
- }
657
- }, [_vm.$slots.prefix && _vm.variant === "default" ? _c("div", {
658
- staticClass: "el-x-sender-prefix"
659
- }, [_vm._t("prefix")], 2) : _vm._e(), _vm._v(" "), _c("el-input", {
660
- ref: "inputRef",
661
- staticClass: "el-x-sender-input",
662
- attrs: {
663
- rows: 1,
664
- autosize: _vm.computedAutoSize,
665
- type: "textarea",
666
- "validate-event": false,
667
- placeholder: _vm.placeholder,
668
- readonly: _vm.readOnly || _vm.disabled,
669
- disabled: _vm.disabled
670
- },
671
- on: {
672
- compositionstart: _vm.handleCompositionStart,
673
- compositionend: _vm.handleCompositionEnd
674
- },
675
- nativeOn: {
676
- keydown: function ($event) {
677
- return _vm.handleKeyDown.apply(null, arguments);
678
- }
679
- },
680
- model: {
681
- value: _vm.internalValue,
682
- callback: function ($$v) {
683
- _vm.internalValue = $$v;
684
- },
685
- expression: "internalValue"
686
- }
687
- }), _vm._v(" "), _vm.variant === "default" ? _c("div", {
688
- staticClass: "el-x-sender-action-list"
689
- }, [_vm._t("action-list", function () {
690
- return [_c("div", {
691
- staticClass: "el-x-sender-action-list-presets"
692
- }, [!_vm.loading ? _c("send-button", {
693
- attrs: {
694
- disabled: _vm.isSubmitDisabled
695
- },
696
- on: {
697
- submit: _vm.submit
698
- }
699
- }) : _vm._e(), _vm._v(" "), _vm.loading ? _c("loading-button", {
700
- on: {
701
- cancel: _vm.cancel
702
- }
703
- }) : _vm._e(), _vm._v(" "), !_vm.speechLoading && _vm.allowSpeech ? _c("speech-button", {
704
- on: {
705
- click: _vm.startRecognition
706
- }
707
- }) : _vm._e(), _vm._v(" "), _vm.speechLoading && _vm.allowSpeech ? _c("speech-loading-button", {
708
- on: {
709
- click: _vm.stopRecognition
710
- }
711
- }) : _vm._e(), _vm._v(" "), _vm.clearable ? _c("clear-button", {
712
- on: {
713
- clear: _vm.clear
714
- }
715
- }) : _vm._e()], 1)];
716
- })], 2) : _vm._e(), _vm._v(" "), _vm.variant === "updown" && _vm.showUpdown ? _c("div", {
717
- staticClass: "el-x-sender-updown-wrap"
718
- }, [_vm.$slots.prefix ? _c("div", {
719
- staticClass: "el-x-sender-prefix"
720
- }, [_vm._t("prefix")], 2) : _vm._e(), _vm._v(" "), _c("div", {
721
- staticClass: "el-x-sender-action-list"
722
- }, [_vm._t("action-list", function () {
723
- return [_c("div", {
724
- staticClass: "el-x-sender-action-list-presets"
725
- }, [!_vm.loading ? _c("send-button", {
726
- attrs: {
727
- disabled: _vm.isSubmitDisabled
728
- },
729
- on: {
730
- submit: _vm.submit
731
- }
732
- }) : _vm._e(), _vm._v(" "), _vm.loading ? _c("loading-button", {
733
- on: {
734
- cancel: _vm.cancel
735
- }
736
- }) : _vm._e(), _vm._v(" "), !_vm.speechLoading && _vm.allowSpeech ? _c("speech-button", {
737
- on: {
738
- click: _vm.startRecognition
739
- }
740
- }) : _vm._e(), _vm._v(" "), _vm.speechLoading && _vm.allowSpeech ? _c("speech-loading-button", {
741
- on: {
742
- click: _vm.stopRecognition
743
- }
744
- }) : _vm._e(), _vm._v(" "), _vm.clearable ? _c("clear-button", {
745
- on: {
746
- clear: _vm.clear
747
- }
748
- }) : _vm._e()], 1)];
749
- })], 2)]) : _vm._e()], 1), _vm._v(" "), _c("transition", {
750
- attrs: {
751
- name: "slide"
752
- }
753
- }, [_vm.$slots.footer ? _c("div", {
754
- staticClass: "el-x-sender-footer"
755
- }, [_vm._t("footer")], 2) : _vm._e()]), _vm._v(" "), _c("el-popover", {
756
- ref: "popoverRef",
757
- attrs: {
758
- disabled: _vm.disabled,
759
- "visible-arrow": false,
760
- placement: _vm.triggerPopoverPlacement,
761
- offset: _vm.triggerPopoverOffset,
762
- "popper-class": "el-x-sender-trigger-popover",
763
- trigger: "manual"
764
- },
765
- on: {
766
- show: _vm.onPopoverShow
767
- },
768
- model: {
769
- value: _vm.popoverVisible,
770
- callback: function ($$v) {
771
- _vm.popoverVisible = $$v;
772
- },
773
- expression: "popoverVisible"
774
- }
775
- }, [_c("template", {
776
- slot: "default"
777
- }, [_vm._t("trigger-popover", function () {
778
- return [_vm._v("当前触发的字符为:" + _vm._s(`${_vm.triggerString}`) + " 在这里定义的内容,但注意这里的回车事件将会被\n 输入框 覆盖")];
779
- }, {
780
- triggerString: _vm.triggerString,
781
- readonly: _vm.readOnly
782
- })], 2)], 2)], 1)]);
783
- };
784
- var staticRenderFns = [];
785
- render._withStripped = true;
786
-
787
- // CONCATENATED MODULE: ./src/components/Sender/src/main.vue?vue&type=template&id=0f2f8caa&scoped=true
788
-
789
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/ClearButton.vue?vue&type=template&id=74c70621&scoped=true
790
- var ClearButtonvue_type_template_id_74c70621_scoped_true_render = function render() {
791
- var _vm = this,
792
- _c = _vm._self._c;
793
- return _c("div", {
794
- staticClass: "el-x-send-button"
795
- }, [_c("el-button", {
796
- attrs: {
797
- circle: "",
798
- size: "small"
799
- },
800
- on: {
801
- click: function ($event) {
802
- return _vm.$emit("clear");
803
- }
804
- }
805
- }, [_c("i", {
806
- staticClass: "el-icon-brush"
807
- })])], 1);
808
- };
809
- var ClearButtonvue_type_template_id_74c70621_scoped_true_staticRenderFns = [];
810
- ClearButtonvue_type_template_id_74c70621_scoped_true_render._withStripped = true;
811
-
812
- // CONCATENATED MODULE: ./src/components/Sender/src/components/ClearButton.vue?vue&type=template&id=74c70621&scoped=true
813
-
814
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/ClearButton.vue?vue&type=script&lang=js
815
- /* harmony default export */ var ClearButtonvue_type_script_lang_js = ({
816
- name: 'ClearButton'
817
- });
818
- // CONCATENATED MODULE: ./src/components/Sender/src/components/ClearButton.vue?vue&type=script&lang=js
819
- /* harmony default export */ var components_ClearButtonvue_type_script_lang_js = (ClearButtonvue_type_script_lang_js);
820
- // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
821
- var injectStylesIntoStyleTag = __webpack_require__(3);
822
- var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
823
-
824
- // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/ClearButton.vue?vue&type=style&index=0&id=74c70621&prod&scoped=true&lang=scss
825
- var ClearButtonvue_type_style_index_0_id_74c70621_prod_scoped_true_lang_scss = __webpack_require__(89);
826
-
827
- // CONCATENATED MODULE: ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/ClearButton.vue?vue&type=style&index=0&id=74c70621&prod&scoped=true&lang=scss
828
-
829
-
830
-
831
- var options = {};
832
-
833
- options.insert = "head";
834
- options.singleton = false;
835
-
836
- var update = injectStylesIntoStyleTag_default()(ClearButtonvue_type_style_index_0_id_74c70621_prod_scoped_true_lang_scss["a" /* default */], options);
837
-
838
-
839
-
840
- /* harmony default export */ var components_ClearButtonvue_type_style_index_0_id_74c70621_prod_scoped_true_lang_scss = (ClearButtonvue_type_style_index_0_id_74c70621_prod_scoped_true_lang_scss["a" /* default */].locals || {});
841
- // CONCATENATED MODULE: ./src/components/Sender/src/components/ClearButton.vue?vue&type=style&index=0&id=74c70621&prod&scoped=true&lang=scss
842
-
843
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
844
- var componentNormalizer = __webpack_require__(0);
845
-
846
- // CONCATENATED MODULE: ./src/components/Sender/src/components/ClearButton.vue
847
-
848
-
849
-
850
-
851
-
852
-
853
- /* normalize component */
854
-
855
- var component = Object(componentNormalizer["a" /* default */])(
856
- components_ClearButtonvue_type_script_lang_js,
857
- ClearButtonvue_type_template_id_74c70621_scoped_true_render,
858
- ClearButtonvue_type_template_id_74c70621_scoped_true_staticRenderFns,
859
- false,
860
- null,
861
- "74c70621",
862
- null
863
-
864
- )
865
-
866
- /* harmony default export */ var ClearButton = (component.exports);
867
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/LoadingButton.vue?vue&type=template&id=4d4a8cac&scoped=true
868
- var LoadingButtonvue_type_template_id_4d4a8cac_scoped_true_render = function render() {
869
- var _vm = this,
870
- _c = _vm._self._c;
871
- return _c("div", {
872
- staticClass: "el-x-send-button"
873
- }, [_c("el-button", {
874
- attrs: {
875
- circle: "",
876
- size: "small"
877
- },
878
- on: {
879
- click: function ($event) {
880
- return _vm.$emit("cancel");
881
- }
882
- }
883
- }, [_c("loading", {
884
- staticClass: "loading-svg"
885
- })], 1)], 1);
886
- };
887
- var LoadingButtonvue_type_template_id_4d4a8cac_scoped_true_staticRenderFns = [];
888
- LoadingButtonvue_type_template_id_4d4a8cac_scoped_true_render._withStripped = true;
889
-
890
- // CONCATENATED MODULE: ./src/components/Sender/src/components/LoadingButton.vue?vue&type=template&id=4d4a8cac&scoped=true
891
-
892
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/Loading.vue?vue&type=template&id=1f0f8c14&scoped=true
893
- var Loadingvue_type_template_id_1f0f8c14_scoped_true_render = function render() {
894
- var _vm = this,
895
- _c = _vm._self._c;
896
- return _c("svg", {
897
- attrs: {
898
- viewBox: "0 0 1000 1000",
899
- xmlns: "http://www.w3.org/2000/svg",
900
- "xmlns:xlink": "http://www.w3.org/1999/xlink"
901
- }
902
- }, [_c("title", [_vm._v("Loading")]), _vm._v(" "), _c("rect", {
903
- attrs: {
904
- fill: "currentColor",
905
- height: "250",
906
- rx: "24",
907
- ry: "24",
908
- width: "250",
909
- x: "375",
910
- y: "375"
911
- }
912
- }), _vm._v(" "), _c("circle", {
913
- attrs: {
914
- cx: "500",
915
- cy: "500",
916
- fill: "none",
917
- r: "450",
918
- stroke: "currentColor",
919
- "stroke-width": "100",
920
- opacity: "0.45"
921
- }
922
- }), _vm._v(" "), _c("circle", {
923
- attrs: {
924
- cx: "500",
925
- cy: "500",
926
- fill: "none",
927
- r: "450",
928
- stroke: "currentColor",
929
- "stroke-width": "100",
930
- "stroke-dasharray": "600 9999999"
931
- }
932
- }, [_c("animateTransform", {
933
- attrs: {
934
- attributeName: "transform",
935
- dur: "1s",
936
- from: "0 500 500",
937
- repeatCount: "indefinite",
938
- to: "360 500 500",
939
- type: "rotate"
940
- }
941
- })], 1)]);
942
- };
943
- var Loadingvue_type_template_id_1f0f8c14_scoped_true_staticRenderFns = [];
944
- Loadingvue_type_template_id_1f0f8c14_scoped_true_render._withStripped = true;
945
-
946
- // CONCATENATED MODULE: ./src/components/Sender/src/components/Loading.vue?vue&type=template&id=1f0f8c14&scoped=true
947
-
948
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/Loading.vue?vue&type=script&lang=js
949
- /* harmony default export */ var Loadingvue_type_script_lang_js = ({
950
- name: 'Loading'
951
- });
952
- // CONCATENATED MODULE: ./src/components/Sender/src/components/Loading.vue?vue&type=script&lang=js
953
- /* harmony default export */ var components_Loadingvue_type_script_lang_js = (Loadingvue_type_script_lang_js);
954
- // CONCATENATED MODULE: ./src/components/Sender/src/components/Loading.vue
955
-
956
-
957
-
958
-
959
-
960
- /* normalize component */
961
-
962
- var Loading_component = Object(componentNormalizer["a" /* default */])(
963
- components_Loadingvue_type_script_lang_js,
964
- Loadingvue_type_template_id_1f0f8c14_scoped_true_render,
965
- Loadingvue_type_template_id_1f0f8c14_scoped_true_staticRenderFns,
966
- false,
967
- null,
968
- "1f0f8c14",
969
- null
970
-
971
- )
972
-
973
- /* harmony default export */ var Loading = (Loading_component.exports);
974
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/LoadingButton.vue?vue&type=script&lang=js
975
-
976
- /* harmony default export */ var LoadingButtonvue_type_script_lang_js = ({
977
- name: 'LoadingButton',
978
- components: {
979
- Loading: Loading
980
- }
981
- });
982
- // CONCATENATED MODULE: ./src/components/Sender/src/components/LoadingButton.vue?vue&type=script&lang=js
983
- /* harmony default export */ var components_LoadingButtonvue_type_script_lang_js = (LoadingButtonvue_type_script_lang_js);
984
- // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/LoadingButton.vue?vue&type=style&index=0&id=4d4a8cac&prod&scoped=true&lang=scss
985
- var LoadingButtonvue_type_style_index_0_id_4d4a8cac_prod_scoped_true_lang_scss = __webpack_require__(90);
986
-
987
- // CONCATENATED MODULE: ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/LoadingButton.vue?vue&type=style&index=0&id=4d4a8cac&prod&scoped=true&lang=scss
988
-
989
-
990
-
991
- var LoadingButtonvue_type_style_index_0_id_4d4a8cac_prod_scoped_true_lang_scss_options = {};
992
-
993
- LoadingButtonvue_type_style_index_0_id_4d4a8cac_prod_scoped_true_lang_scss_options.insert = "head";
994
- LoadingButtonvue_type_style_index_0_id_4d4a8cac_prod_scoped_true_lang_scss_options.singleton = false;
995
-
996
- var LoadingButtonvue_type_style_index_0_id_4d4a8cac_prod_scoped_true_lang_scss_update = injectStylesIntoStyleTag_default()(LoadingButtonvue_type_style_index_0_id_4d4a8cac_prod_scoped_true_lang_scss["a" /* default */], LoadingButtonvue_type_style_index_0_id_4d4a8cac_prod_scoped_true_lang_scss_options);
997
-
998
-
999
-
1000
- /* harmony default export */ var components_LoadingButtonvue_type_style_index_0_id_4d4a8cac_prod_scoped_true_lang_scss = (LoadingButtonvue_type_style_index_0_id_4d4a8cac_prod_scoped_true_lang_scss["a" /* default */].locals || {});
1001
- // CONCATENATED MODULE: ./src/components/Sender/src/components/LoadingButton.vue?vue&type=style&index=0&id=4d4a8cac&prod&scoped=true&lang=scss
1002
-
1003
- // CONCATENATED MODULE: ./src/components/Sender/src/components/LoadingButton.vue
1004
-
1005
-
1006
-
1007
-
1008
-
1009
-
1010
- /* normalize component */
1011
-
1012
- var LoadingButton_component = Object(componentNormalizer["a" /* default */])(
1013
- components_LoadingButtonvue_type_script_lang_js,
1014
- LoadingButtonvue_type_template_id_4d4a8cac_scoped_true_render,
1015
- LoadingButtonvue_type_template_id_4d4a8cac_scoped_true_staticRenderFns,
1016
- false,
1017
- null,
1018
- "4d4a8cac",
1019
- null
1020
-
1021
- )
1022
-
1023
- /* harmony default export */ var LoadingButton = (LoadingButton_component.exports);
1024
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SendButton.vue?vue&type=template&id=671e6570&scoped=true
1025
- var SendButtonvue_type_template_id_671e6570_scoped_true_render = function render() {
1026
- var _vm = this,
1027
- _c = _vm._self._c;
1028
- return _c("div", {
1029
- staticClass: "el-x-send-button"
1030
- }, [_c("el-button", {
1031
- attrs: {
1032
- circle: "",
1033
- disabled: _vm.disabled,
1034
- size: "small"
1035
- },
1036
- on: {
1037
- click: function ($event) {
1038
- return _vm.$emit("submit");
1039
- }
1040
- }
1041
- }, [_c("i", {
1042
- staticClass: "el-icon-top"
1043
- })])], 1);
1044
- };
1045
- var SendButtonvue_type_template_id_671e6570_scoped_true_staticRenderFns = [];
1046
- SendButtonvue_type_template_id_671e6570_scoped_true_render._withStripped = true;
1047
-
1048
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SendButton.vue?vue&type=template&id=671e6570&scoped=true
1049
-
1050
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SendButton.vue?vue&type=script&lang=js
1051
- /* harmony default export */ var SendButtonvue_type_script_lang_js = ({
1052
- name: 'SendButton',
1053
- props: {
1054
- disabled: {
1055
- type: Boolean,
1056
- default: false
1057
- }
1058
- }
1059
- });
1060
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SendButton.vue?vue&type=script&lang=js
1061
- /* harmony default export */ var components_SendButtonvue_type_script_lang_js = (SendButtonvue_type_script_lang_js);
1062
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SendButton.vue
1063
-
1064
-
1065
-
1066
-
1067
-
1068
- /* normalize component */
1069
-
1070
- var SendButton_component = Object(componentNormalizer["a" /* default */])(
1071
- components_SendButtonvue_type_script_lang_js,
1072
- SendButtonvue_type_template_id_671e6570_scoped_true_render,
1073
- SendButtonvue_type_template_id_671e6570_scoped_true_staticRenderFns,
1074
- false,
1075
- null,
1076
- "671e6570",
1077
- null
1078
-
1079
- )
1080
-
1081
- /* harmony default export */ var SendButton = (SendButton_component.exports);
1082
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SpeechButton.vue?vue&type=template&id=7e5519b2&scoped=true
1083
- var SpeechButtonvue_type_template_id_7e5519b2_scoped_true_render = function render() {
1084
- var _vm = this,
1085
- _c = _vm._self._c;
1086
- return _c("div", {
1087
- staticClass: "el-x-send-button"
1088
- }, [_c("el-button", {
1089
- attrs: {
1090
- circle: "",
1091
- size: "small"
1092
- },
1093
- on: {
1094
- click: _vm.onClick
1095
- }
1096
- }, [_c("i", {
1097
- staticClass: "el-icon-microphone"
1098
- })])], 1);
1099
- };
1100
- var SpeechButtonvue_type_template_id_7e5519b2_scoped_true_staticRenderFns = [];
1101
- SpeechButtonvue_type_template_id_7e5519b2_scoped_true_render._withStripped = true;
1102
-
1103
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechButton.vue?vue&type=template&id=7e5519b2&scoped=true
1104
-
1105
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SpeechButton.vue?vue&type=script&lang=js
1106
- /* harmony default export */ var SpeechButtonvue_type_script_lang_js = ({
1107
- name: 'SpeechButton',
1108
- methods: {
1109
- onClick() {
1110
- this.$emit('click');
1111
- }
1112
- }
1113
- });
1114
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechButton.vue?vue&type=script&lang=js
1115
- /* harmony default export */ var components_SpeechButtonvue_type_script_lang_js = (SpeechButtonvue_type_script_lang_js);
1116
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechButton.vue
1117
-
1118
-
1119
-
1120
-
1121
-
1122
- /* normalize component */
1123
-
1124
- var SpeechButton_component = Object(componentNormalizer["a" /* default */])(
1125
- components_SpeechButtonvue_type_script_lang_js,
1126
- SpeechButtonvue_type_template_id_7e5519b2_scoped_true_render,
1127
- SpeechButtonvue_type_template_id_7e5519b2_scoped_true_staticRenderFns,
1128
- false,
1129
- null,
1130
- "7e5519b2",
1131
- null
1132
-
1133
- )
1134
-
1135
- /* harmony default export */ var SpeechButton = (SpeechButton_component.exports);
1136
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SpeechLoadingButton.vue?vue&type=template&id=1d4ab0c1&scoped=true
1137
- var SpeechLoadingButtonvue_type_template_id_1d4ab0c1_scoped_true_render = function render() {
1138
- var _vm = this,
1139
- _c = _vm._self._c;
1140
- return _c("div", {
1141
- staticClass: "el-x-send-button"
1142
- }, [_c("el-button", {
1143
- attrs: {
1144
- circle: "",
1145
- size: "small"
1146
- },
1147
- on: {
1148
- click: _vm.onClick
1149
- }
1150
- }, [_c("speech-loading", {
1151
- staticClass: "loading-svg"
1152
- })], 1)], 1);
1153
- };
1154
- var SpeechLoadingButtonvue_type_template_id_1d4ab0c1_scoped_true_staticRenderFns = [];
1155
- SpeechLoadingButtonvue_type_template_id_1d4ab0c1_scoped_true_render._withStripped = true;
1156
-
1157
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechLoadingButton.vue?vue&type=template&id=1d4ab0c1&scoped=true
1158
-
1159
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SpeechLoading.vue?vue&type=template&id=5cab3032&scoped=true
1160
- var SpeechLoadingvue_type_template_id_5cab3032_scoped_true_render = function render() {
1161
- var _vm = this,
1162
- _c = _vm._self._c;
1163
- return _c("svg", {
1164
- class: _vm.className,
1165
- attrs: {
1166
- color: "currentColor",
1167
- viewBox: `0 0 ${_vm.SIZE} ${_vm.SIZE}`,
1168
- xmlns: "http://www.w3.org/2000/svg",
1169
- "xmlns:xlink": "http://www.w3.org/1999/xlink"
1170
- }
1171
- }, [_c("title", [_vm._v("Speech Recording")]), _vm._v(" "), _vm._l(_vm.rects, function (item, index) {
1172
- return _c("rect", {
1173
- key: index,
1174
- attrs: {
1175
- fill: "currentColor",
1176
- rx: _vm.RECT_RADIUS,
1177
- ry: _vm.RECT_RADIUS,
1178
- height: _vm.RECT_HEIGHT_MIN,
1179
- width: _vm.RECT_WIDTH,
1180
- x: item.x,
1181
- y: item.yMin
1182
- }
1183
- }, [_c("animate", {
1184
- attrs: {
1185
- attributeName: "height",
1186
- values: `${_vm.RECT_HEIGHT_MIN}; ${_vm.RECT_HEIGHT_MAX}; ${_vm.RECT_HEIGHT_MIN}`,
1187
- keyTimes: "0; 0.5; 1",
1188
- dur: `${_vm.DURATION}s`,
1189
- begin: `${_vm.DURATION / _vm.COUNT * index}s`,
1190
- repeatCount: "indefinite"
1191
- }
1192
- }), _vm._v(" "), _c("animate", {
1193
- attrs: {
1194
- attributeName: "y",
1195
- values: `${item.yMin}; ${item.yMax}; ${item.yMin}`,
1196
- keyTimes: "0; 0.5; 1",
1197
- dur: `${_vm.DURATION}s`,
1198
- begin: `${_vm.DURATION / _vm.COUNT * index}s`,
1199
- repeatCount: "indefinite"
1200
- }
1201
- })]);
1202
- })], 2);
1203
- };
1204
- var SpeechLoadingvue_type_template_id_5cab3032_scoped_true_staticRenderFns = [];
1205
- SpeechLoadingvue_type_template_id_5cab3032_scoped_true_render._withStripped = true;
1206
-
1207
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechLoading.vue?vue&type=template&id=5cab3032&scoped=true
1208
-
1209
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SpeechLoading.vue?vue&type=script&lang=js
1210
- /* harmony default export */ var SpeechLoadingvue_type_script_lang_js = ({
1211
- name: 'SpeechLoading',
1212
- props: {
1213
- className: {
1214
- type: String,
1215
- default: ''
1216
- }
1217
- },
1218
- data() {
1219
- return {
1220
- // 定义常量
1221
- SIZE: 1000,
1222
- COUNT: 4,
1223
- RECT_WIDTH: 140,
1224
- RECT_RADIUS: 70,
1225
- // RECT_WIDTH / 2
1226
- RECT_HEIGHT_MIN: 250,
1227
- RECT_HEIGHT_MAX: 500,
1228
- DURATION: 0.8
1229
- };
1230
- },
1231
- computed: {
1232
- // 计算矩形的位置和高度范围
1233
- rects() {
1234
- const dest = (this.SIZE - this.RECT_WIDTH * this.COUNT) / (this.COUNT - 1);
1235
- return Array.from({
1236
- length: this.COUNT
1237
- }).map((_, index) => {
1238
- const x = index * (dest + this.RECT_WIDTH);
1239
- const yMin = this.SIZE / 2 - this.RECT_HEIGHT_MIN / 2;
1240
- const yMax = this.SIZE / 2 - this.RECT_HEIGHT_MAX / 2;
1241
- return {
1242
- x,
1243
- yMin,
1244
- yMax
1245
- };
1246
- });
1247
- }
1248
- }
1249
- });
1250
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechLoading.vue?vue&type=script&lang=js
1251
- /* harmony default export */ var components_SpeechLoadingvue_type_script_lang_js = (SpeechLoadingvue_type_script_lang_js);
1252
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechLoading.vue
1253
-
1254
-
1255
-
1256
-
1257
-
1258
- /* normalize component */
1259
-
1260
- var SpeechLoading_component = Object(componentNormalizer["a" /* default */])(
1261
- components_SpeechLoadingvue_type_script_lang_js,
1262
- SpeechLoadingvue_type_template_id_5cab3032_scoped_true_render,
1263
- SpeechLoadingvue_type_template_id_5cab3032_scoped_true_staticRenderFns,
1264
- false,
1265
- null,
1266
- "5cab3032",
1267
- null
1268
-
1269
- )
1270
-
1271
- /* harmony default export */ var SpeechLoading = (SpeechLoading_component.exports);
1272
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SpeechLoadingButton.vue?vue&type=script&lang=js
1273
-
1274
- /* harmony default export */ var SpeechLoadingButtonvue_type_script_lang_js = ({
1275
- name: 'SpeechLoadingButton',
1276
- components: {
1277
- SpeechLoading: SpeechLoading
1278
- },
1279
- methods: {
1280
- onClick() {
1281
- this.$emit('click');
1282
- }
1283
- }
1284
- });
1285
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechLoadingButton.vue?vue&type=script&lang=js
1286
- /* harmony default export */ var components_SpeechLoadingButtonvue_type_script_lang_js = (SpeechLoadingButtonvue_type_script_lang_js);
1287
- // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SpeechLoadingButton.vue?vue&type=style&index=0&id=1d4ab0c1&prod&scoped=true&lang=scss
1288
- var SpeechLoadingButtonvue_type_style_index_0_id_1d4ab0c1_prod_scoped_true_lang_scss = __webpack_require__(91);
1289
-
1290
- // CONCATENATED MODULE: ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/components/SpeechLoadingButton.vue?vue&type=style&index=0&id=1d4ab0c1&prod&scoped=true&lang=scss
1291
-
1292
-
1293
-
1294
- var SpeechLoadingButtonvue_type_style_index_0_id_1d4ab0c1_prod_scoped_true_lang_scss_options = {};
1295
-
1296
- SpeechLoadingButtonvue_type_style_index_0_id_1d4ab0c1_prod_scoped_true_lang_scss_options.insert = "head";
1297
- SpeechLoadingButtonvue_type_style_index_0_id_1d4ab0c1_prod_scoped_true_lang_scss_options.singleton = false;
1298
-
1299
- var SpeechLoadingButtonvue_type_style_index_0_id_1d4ab0c1_prod_scoped_true_lang_scss_update = injectStylesIntoStyleTag_default()(SpeechLoadingButtonvue_type_style_index_0_id_1d4ab0c1_prod_scoped_true_lang_scss["a" /* default */], SpeechLoadingButtonvue_type_style_index_0_id_1d4ab0c1_prod_scoped_true_lang_scss_options);
1300
-
1301
-
1302
-
1303
- /* harmony default export */ var components_SpeechLoadingButtonvue_type_style_index_0_id_1d4ab0c1_prod_scoped_true_lang_scss = (SpeechLoadingButtonvue_type_style_index_0_id_1d4ab0c1_prod_scoped_true_lang_scss["a" /* default */].locals || {});
1304
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechLoadingButton.vue?vue&type=style&index=0&id=1d4ab0c1&prod&scoped=true&lang=scss
1305
-
1306
- // CONCATENATED MODULE: ./src/components/Sender/src/components/SpeechLoadingButton.vue
1307
-
1308
-
1309
-
1310
-
1311
-
1312
-
1313
- /* normalize component */
1314
-
1315
- var SpeechLoadingButton_component = Object(componentNormalizer["a" /* default */])(
1316
- components_SpeechLoadingButtonvue_type_script_lang_js,
1317
- SpeechLoadingButtonvue_type_template_id_1d4ab0c1_scoped_true_render,
1318
- SpeechLoadingButtonvue_type_template_id_1d4ab0c1_scoped_true_staticRenderFns,
1319
- false,
1320
- null,
1321
- "1d4ab0c1",
1322
- null
1323
-
1324
- )
1325
-
1326
- /* harmony default export */ var SpeechLoadingButton = (SpeechLoadingButton_component.exports);
1327
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/main.vue?vue&type=script&lang=js
1328
-
1329
-
1330
-
1331
-
1332
-
1333
- /* harmony default export */ var mainvue_type_script_lang_js = ({
1334
- name: 'ElXSender',
1335
- components: {
1336
- ClearButton: ClearButton,
1337
- LoadingButton: LoadingButton,
1338
- SendButton: SendButton,
1339
- SpeechButton: SpeechButton,
1340
- SpeechLoadingButton: SpeechLoadingButton
1341
- },
1342
- props: {
1343
- value: {
1344
- type: String,
1345
- default: ''
1346
- },
1347
- placeholder: {
1348
- type: String,
1349
- default: '请输入内容'
1350
- },
1351
- autoSize: {
1352
- type: Object,
1353
- default: () => ({
1354
- minRows: 1,
1355
- maxRows: 6
1356
- })
1357
- },
1358
- readOnly: Boolean,
1359
- disabled: Boolean,
1360
- loading: Boolean,
1361
- clearable: Boolean,
1362
- allowSpeech: Boolean,
1363
- submitType: {
1364
- type: String,
1365
- default: 'enter',
1366
- validator: value => ['enter', 'shiftEnter'].includes(value)
1367
- },
1368
- headerAnimationTimer: {
1369
- type: Number,
1370
- default: 300
1371
- },
1372
- inputWidth: {
1373
- type: String,
1374
- default: '100%'
1375
- },
1376
- // 变体属性
1377
- variant: {
1378
- type: String,
1379
- default: 'default',
1380
- validator: value => ['default', 'updown'].includes(value)
1381
- },
1382
- showUpdown: {
1383
- type: Boolean,
1384
- default: true
1385
- },
1386
- submitBtnDisabled: Boolean,
1387
- inputStyle: {
1388
- type: Object,
1389
- default: () => ({})
1390
- },
1391
- // 新增 el-popover 样式透传
1392
- triggerStrings: {
1393
- type: Array,
1394
- default: () => []
1395
- },
1396
- triggerPopoverVisible: {
1397
- type: Boolean,
1398
- default: false
1399
- },
1400
- triggerPopoverWidth: {
1401
- type: String,
1402
- default: 'fit-content'
1403
- },
1404
- triggerPopoverLeft: {
1405
- type: String,
1406
- default: '0px'
1407
- },
1408
- triggerPopoverOffset: {
1409
- type: Number,
1410
- default: 0
1411
- },
1412
- triggerPopoverPlacement: {
1413
- type: String,
1414
- default: 'top-start',
1415
- validator: value => ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end'].includes(value)
1416
- }
1417
- },
1418
- data() {
1419
- return {
1420
- senderRef: null,
1421
- inputRef: null,
1422
- popoverVisible: this.triggerPopoverVisible,
1423
- internalValue: this.value,
1424
- isComposing: false,
1425
- popoverRef: null,
1426
- triggerString: '',
1427
- visiableHeader: false,
1428
- recognition: null,
1429
- speechLoading: false,
1430
- triggerDebounce: false
1431
- };
1432
- },
1433
- computed: {
1434
- // 判断是否存在 recordingChange 监听器
1435
- hasOnRecordingChangeListener() {
1436
- return !!(this.$listeners && this.$listeners.recordingChange);
1437
- },
1438
- // 判断是否存在 trigger 监听器
1439
- hasOnTriggerListener() {
1440
- return !!(this.$listeners && this.$listeners.trigger);
1441
- },
1442
- // 计算提交按钮禁用状态
1443
- isSubmitDisabled() {
1444
- // 用户显式设置了 submitBtnDisabled 时优先使用
1445
- if (typeof this.submitBtnDisabled === 'boolean') {
1446
- return this.submitBtnDisabled;
1447
- }
1448
- // 否则保持默认逻辑:无内容时禁用
1449
- return !this.internalValue;
1450
- },
1451
- // 根据字体大小动态计算 autoSize
1452
- computedAutoSize() {
1453
- // 如果用户提供了autoSize,则优先使用
1454
- if (this.autoSize) return this.autoSize;
1455
-
1456
- // 否则返回默认值
1457
- return {
1458
- minRows: 1,
1459
- maxRows: 6
1460
- };
1461
- }
1462
- },
1463
- watch: {
1464
- value(val) {
1465
- this.internalValue = val;
1466
- },
1467
- // 监听样式变化
1468
- inputStyle: {
1469
- handler() {
1470
- this.$nextTick(() => {
1471
- this.applyInputStyles();
1472
- });
1473
- },
1474
- deep: true
1475
- },
1476
- inputWidth() {
1477
- this.$nextTick(() => {
1478
- this.applyInputStyles();
1479
- });
1480
- },
1481
- // 监听外部传入的 triggerPopoverVisible 变化
1482
- triggerPopoverVisible(val) {
1483
- // 仅在值不同时更新,避免循环触发
1484
- if (this.popoverVisible !== val) {
1485
- this.popoverVisible = val;
1486
- }
1487
- },
1488
- // 监听内部 popoverVisible 变化,向外同步
1489
- popoverVisible(val) {
1490
- if (val !== this.triggerPopoverVisible) {
1491
- this.$emit('update:triggerPopoverVisible', val);
1492
- }
1493
-
1494
- // 新增:当弹窗关闭时,设置短时间内的防抖状态
1495
- if (val === false) {
1496
- this.triggerDebounce = true;
1497
- setTimeout(() => {
1498
- this.triggerDebounce = false;
1499
- }, 300); // 300ms 防抖时间,防止频繁触发
1500
- }
1501
- },
1502
- internalValue(newVal, oldVal) {
1503
- this.$emit('input', newVal);
1504
-
1505
- // 当内容变化时,修复高度问题
1506
-
1507
- if (this.isComposing) return;
1508
- // 新增:如果处于防抖状态,则不进行触发检测
1509
- if (this.triggerDebounce) return;
1510
-
1511
- // 触发逻辑:检测输入内容中是否出现了触发字符
1512
- const triggerStrings = this.triggerStrings || []; // 如果为 undefined,就使用空数组
1513
-
1514
- // 新的检测逻辑:检查是否在当前光标位置前有触发字符
1515
- if (this.inputRef && triggerStrings.length > 0) {
1516
- const textArea = this.inputRef.$el.querySelector('textarea');
1517
- if (textArea) {
1518
- const cursorPosition = textArea.selectionStart;
1519
- // 检查光标前是否有新增的触发字符
1520
- if (cursorPosition > 0 && newVal.length > oldVal.length) {
1521
- const lastChar = newVal.charAt(cursorPosition - 1);
1522
- if (triggerStrings.includes(lastChar)) {
1523
- this.triggerString = lastChar;
1524
- if (this.hasOnTriggerListener) {
1525
- this.$emit('trigger', {
1526
- oldValue: oldVal,
1527
- newValue: newVal,
1528
- triggerString: lastChar,
1529
- isOpen: true,
1530
- cursorPosition: cursorPosition
1531
- });
1532
- }
1533
- this.popoverVisible = true;
1534
- return;
1535
- }
1536
- }
1537
- }
1538
- }
1539
-
1540
- // 原有的处理逻辑,用于向后兼容
1541
- const validOldVal = typeof oldVal === 'string' ? oldVal : '';
1542
- const wasOldValTrigger = triggerStrings.includes(validOldVal);
1543
- const isNewValTrigger = triggerStrings.includes(newVal);
1544
-
1545
- // 触发显示:从空变为触发字符
1546
- if (oldVal === '' && isNewValTrigger) {
1547
- this.triggerString = newVal;
1548
- if (this.hasOnTriggerListener) {
1549
- this.$emit('trigger', {
1550
- oldValue: oldVal,
1551
- newValue: newVal,
1552
- triggerString: newVal,
1553
- isOpen: true
1554
- });
1555
- }
1556
- this.popoverVisible = true;
1557
- }
1558
- // 关闭:从触发字符变为非触发字符
1559
- else if (!isNewValTrigger && wasOldValTrigger) {
1560
- if (this.hasOnTriggerListener) {
1561
- this.$emit('trigger', {
1562
- oldValue: oldVal,
1563
- newValue: newVal,
1564
- triggerString: undefined,
1565
- isOpen: false
1566
- });
1567
- }
1568
- this.popoverVisible = false;
1569
- }
1570
- // 触发显示:从非空且非触发字符变为触发字符
1571
- else if (oldVal !== '' && isNewValTrigger && !wasOldValTrigger) {
1572
- this.triggerString = newVal;
1573
- if (this.hasOnTriggerListener) {
1574
- this.$emit('trigger', {
1575
- oldValue: oldVal,
1576
- newValue: newVal,
1577
- triggerString: newVal,
1578
- isOpen: true
1579
- });
1580
- }
1581
- this.popoverVisible = true;
1582
- }
1583
- }
1584
- },
1585
- methods: {
1586
- /* 直接应用输入框样式 */
1587
- applyInputStyles() {
1588
- if (!this.inputRef) return;
1589
- const textareaEl = this.inputRef.$el.querySelector('textarea');
1590
- if (!textareaEl) return;
1591
-
1592
- // 设置默认基础样式
1593
- const defaultStyles = {
1594
- maxHeight: '176px',
1595
- maxWidth: this.inputWidth || '100%',
1596
- boxSizing: 'border-box'
1597
- };
1598
-
1599
- // 应用默认样式
1600
- Object.keys(defaultStyles).forEach(key => {
1601
- textareaEl.style[key] = defaultStyles[key];
1602
- });
1603
-
1604
- // 如果用户传入了样式对象,则应用覆盖默认样式
1605
- if (this.inputStyle && typeof this.inputStyle === 'object') {
1606
- Object.keys(this.inputStyle).forEach(key => {
1607
- textareaEl.style[key] = this.inputStyle[key];
1608
- });
1609
-
1610
- // 如果用户设置了字体大小,需要调整高度
1611
- if (this.inputStyle.fontSize) {
1612
- // 确保高度能完全容纳当前字体大小
1613
- if (typeof window !== 'undefined') {
1614
- const computedFontSize = window.getComputedStyle(textareaEl).fontSize;
1615
- const fontSize = parseInt(computedFontSize);
1616
- const minHeight = Math.max(fontSize * 1.5, 24) + 'px';
1617
- textareaEl.style.minHeight = minHeight;
1618
- }
1619
-
1620
- // 重新触发 autosize
1621
- this.$nextTick(() => {
1622
- // 在某些情况下需要手动触发Element UI的autosize更新
1623
- if (typeof document !== 'undefined') {
1624
- const event = document.createEvent('Event');
1625
- event.initEvent('autosize:update', true, false);
1626
- textareaEl.dispatchEvent(event);
1627
- }
1628
- });
1629
- }
1630
- }
1631
- },
1632
- /* 手动更新 popover 位置 */
1633
- onPopoverShow() {
1634
- if (this.$refs.popoverRef) {
1635
- this.$nextTick(() => {
1636
- this.$refs.popoverRef.referenceElm = this.$refs.senderRef;
1637
- this.$refs.popoverRef.doDestroy();
1638
- this.$refs.popoverRef.updatePopper();
1639
- });
1640
- }
1641
- },
1642
- /* 内容容器聚焦 开始 */
1643
- onContentMouseDown(e) {
1644
- // 点击容器后设置输入框的聚焦,会触发 &:focus-within 样式
1645
- if (e.target !== this.$el.querySelector(`.el-textarea__inner`)) {
1646
- e.preventDefault();
1647
- }
1648
- this.inputRef.focus();
1649
- },
1650
- /* 内容容器聚焦 结束 */
1651
-
1652
- /* 头部显示隐藏 开始 */
1653
- openHeader() {
1654
- if (!this.$slots.header) return false;
1655
- if (this.readOnly) return false;
1656
- this.visiableHeader = true;
1657
- },
1658
- closeHeader() {
1659
- if (!this.$slots.header) return;
1660
- if (this.readOnly) return;
1661
- this.visiableHeader = false;
1662
- },
1663
- /* 头部显示隐藏 结束 */
1664
-
1665
- /* 使用浏览器自带的语音转文字功能 开始 */
1666
- startRecognition() {
1667
- if (this.readOnly || this.disabled) return; // 直接返回,不执行后续逻辑
1668
-
1669
- if (this.hasOnRecordingChangeListener) {
1670
- this.speechLoading = true;
1671
- this.$emit('recordingChange', true);
1672
- return;
1673
- }
1674
-
1675
- // 检查是否在浏览器环境中
1676
- if (typeof window === 'undefined') {
1677
- console.error('语音识别功能仅在浏览器环境中可用');
1678
- return;
1679
- }
1680
-
1681
- // 检查浏览器支持的 SpeechRecognition API
1682
- const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition || window.mozSpeechRecognition || window.msSpeechRecognition;
1683
- if (SpeechRecognition) {
1684
- try {
1685
- this.recognition = new SpeechRecognition();
1686
- this.recognition.continuous = true;
1687
- this.recognition.interimResults = true;
1688
- this.recognition.lang = 'zh-CN';
1689
- this.recognition.onresult = event => {
1690
- let results = '';
1691
- for (let i = 0; i <= event.resultIndex; i++) {
1692
- results += event.results[i][0].transcript;
1693
- }
1694
- if (!this.readOnly) {
1695
- this.internalValue = results;
1696
- }
1697
- };
1698
- this.recognition.onstart = () => {
1699
- this.speechLoading = true;
1700
- console.log('语音识别已启动');
1701
- };
1702
- this.recognition.onend = () => {
1703
- this.speechLoading = false;
1704
- console.log('语音识别已结束');
1705
- };
1706
- this.recognition.onerror = event => {
1707
- console.error('语音识别出错:', event.error);
1708
- this.speechLoading = false;
1709
- // 可以添加用户友好提示
1710
- if (event.error === 'not-allowed') {
1711
- console.error('用户拒绝了麦克风访问权限');
1712
- // 这里可以显示提示
1713
- }
1714
- };
1715
- this.recognition.start();
1716
- } catch (error) {
1717
- console.error('启动语音识别失败:', error);
1718
- this.speechLoading = false;
1719
- }
1720
- } else {
1721
- console.error('浏览器不支持 Web Speech API');
1722
- this.speechLoading = false;
1723
- }
1724
- },
1725
- stopRecognition() {
1726
- // 如果有自定义处理函数
1727
- if (this.hasOnRecordingChangeListener) {
1728
- this.speechLoading = false;
1729
- this.$emit('recordingChange', false);
1730
- return;
1731
- }
1732
- if (this.recognition) {
1733
- this.recognition.stop();
1734
- this.speechLoading = false;
1735
- }
1736
- },
1737
- /* 使用浏览器自带的语音转文字功能 结束 */
1738
-
1739
- /* 输入框事件 开始 */
1740
- submit() {
1741
- if (this.readOnly || this.loading || this.disabled || this.isSubmitDisabled) return;
1742
- this.$emit('submit', this.internalValue);
1743
- },
1744
- // 取消按钮
1745
- cancel() {
1746
- if (this.readOnly) return;
1747
- this.$emit('cancel', this.internalValue);
1748
- },
1749
- clear() {
1750
- if (this.readOnly) return; // 直接返回,不执行后续逻辑
1751
- this.inputRef.clear();
1752
- this.internalValue = '';
1753
- },
1754
- // 在这判断组合键的回车键 (目前支持两种模式)
1755
- handleKeyDown(e) {
1756
- if (this.readOnly) return; // 直接返回,不执行后续逻辑
1757
-
1758
- if (this.submitType === 'enter') {
1759
- // 判断是否按下了 Shift + 回车键
1760
- if (e.shiftKey && e.keyCode === 13) {
1761
- e.preventDefault();
1762
- const cursorPosition = e.target.selectionStart; // 获取光标位置
1763
- const textBeforeCursor = this.internalValue.slice(0, cursorPosition); // 光标前的文本
1764
- const textAfterCursor = this.internalValue.slice(cursorPosition); // 光标后的文本
1765
- this.internalValue = `${textBeforeCursor}\n${textAfterCursor}`; // 插入换行符
1766
- this.$nextTick(() => {
1767
- e.target.setSelectionRange(cursorPosition + 1, cursorPosition + 1); // 更新光标位置
1768
- });
1769
- } else if (e.keyCode === 13 && !e.shiftKey) {
1770
- // 阻止掉 Enter 的默认换行行为
1771
- e.preventDefault();
1772
- // 触发提交功能
1773
- this.submit();
1774
- }
1775
- } else if (this.submitType === 'shiftEnter') {
1776
- // 判断是否按下了 Shift + 回车键
1777
- if (e.shiftKey && e.keyCode === 13) {
1778
- // 阻止掉 Enter 的默认换行行为
1779
- e.preventDefault();
1780
- // 触发提交功能
1781
- this.submit();
1782
- } else if (e.keyCode === 13 && !e.shiftKey) {
1783
- e.preventDefault();
1784
- const cursorPosition = e.target.selectionStart; // 获取光标位置
1785
- const textBeforeCursor = this.internalValue.slice(0, cursorPosition); // 光标前的文本
1786
- const textAfterCursor = this.internalValue.slice(cursorPosition); // 光标后的文本
1787
- this.internalValue = `${textBeforeCursor}\n${textAfterCursor}`; // 插入换行符
1788
- this.$nextTick(() => {
1789
- e.target.setSelectionRange(cursorPosition + 1, cursorPosition + 1); // 更新光标位置
1790
- });
1791
- }
1792
- }
1793
- },
1794
- /* 输入框事件 结束 */
1795
-
1796
- /* 焦点 事件 开始 */
1797
- blur() {
1798
- if (this.readOnly) return false;
1799
- this.inputRef.blur();
1800
- },
1801
- focus(type = 'all') {
1802
- if (this.readOnly) return false;
1803
- if (type === 'all') {
1804
- this.inputRef.select();
1805
- } else if (type === 'start') {
1806
- this.focusToStart();
1807
- } else if (type === 'end') {
1808
- this.focusToEnd();
1809
- }
1810
- },
1811
- // 聚焦到文本最前方
1812
- focusToStart() {
1813
- if (this.inputRef) {
1814
- // 获取底层的 textarea DOM 元素
1815
- const textarea = this.inputRef.$el.querySelector('textarea');
1816
- if (textarea) {
1817
- textarea.focus(); // 聚焦到输入框
1818
- textarea.setSelectionRange(0, 0); // 设置光标到最前方
1819
- }
1820
- }
1821
- },
1822
- // 聚焦到文本最后方
1823
- focusToEnd() {
1824
- if (this.inputRef) {
1825
- // 获取底层的 textarea DOM 元素
1826
- const textarea = this.inputRef.$el.querySelector('textarea');
1827
- if (textarea) {
1828
- textarea.focus(); // 聚焦到输入框
1829
- textarea.setSelectionRange(this.internalValue.length, this.internalValue.length); // 设置光标到最后方
1830
- }
1831
- }
1832
- },
1833
- /* 焦点 事件 结束 */
1834
-
1835
- // 处理输入法开始/结束 (此方法是拼音输入法的时候用)
1836
- handleCompositionStart() {
1837
- this.isComposing = true;
1838
- },
1839
- handleCompositionEnd() {
1840
- this.isComposing = false;
1841
- }
1842
- },
1843
- mounted() {
1844
- // 应用样式
1845
- this.$nextTick(() => {
1846
- // 获取组件引用
1847
- this.senderRef = this.$refs.senderRef;
1848
- this.inputRef = this.$refs.inputRef;
1849
- this.popoverRef = this.$refs.popoverRef;
1850
- this.applyInputStyles();
1851
- });
1852
- },
1853
- updated() {
1854
- // 确保在组件更新后重新应用样式
1855
- this.applyInputStyles();
1856
- }
1857
- });
1858
- // CONCATENATED MODULE: ./src/components/Sender/src/main.vue?vue&type=script&lang=js
1859
- /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
1860
- // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/main.vue?vue&type=style&index=0&id=0f2f8caa&prod&lang=scss&scoped=true
1861
- var mainvue_type_style_index_0_id_0f2f8caa_prod_lang_scss_scoped_true = __webpack_require__(92);
1862
-
1863
- // CONCATENATED MODULE: ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sender/src/main.vue?vue&type=style&index=0&id=0f2f8caa&prod&lang=scss&scoped=true
1864
-
1865
-
1866
-
1867
- var mainvue_type_style_index_0_id_0f2f8caa_prod_lang_scss_scoped_true_options = {};
1868
-
1869
- mainvue_type_style_index_0_id_0f2f8caa_prod_lang_scss_scoped_true_options.insert = "head";
1870
- mainvue_type_style_index_0_id_0f2f8caa_prod_lang_scss_scoped_true_options.singleton = false;
1871
-
1872
- var mainvue_type_style_index_0_id_0f2f8caa_prod_lang_scss_scoped_true_update = injectStylesIntoStyleTag_default()(mainvue_type_style_index_0_id_0f2f8caa_prod_lang_scss_scoped_true["a" /* default */], mainvue_type_style_index_0_id_0f2f8caa_prod_lang_scss_scoped_true_options);
1873
-
1874
-
1875
-
1876
- /* harmony default export */ var src_mainvue_type_style_index_0_id_0f2f8caa_prod_lang_scss_scoped_true = (mainvue_type_style_index_0_id_0f2f8caa_prod_lang_scss_scoped_true["a" /* default */].locals || {});
1877
- // CONCATENATED MODULE: ./src/components/Sender/src/main.vue?vue&type=style&index=0&id=0f2f8caa&prod&lang=scss&scoped=true
1878
-
1879
- // CONCATENATED MODULE: ./src/components/Sender/src/main.vue
1880
-
1881
-
1882
-
1883
-
1884
-
1885
-
1886
- /* normalize component */
1887
-
1888
- var main_component = Object(componentNormalizer["a" /* default */])(
1889
- src_mainvue_type_script_lang_js,
1890
- render,
1891
- staticRenderFns,
1892
- false,
1893
- null,
1894
- "0f2f8caa",
1895
- null
1896
-
1897
- )
1898
-
1899
- /* harmony default export */ var main = (main_component.exports);
1900
- // CONCATENATED MODULE: ./src/components/Sender/index.js
1901
-
1902
-
1903
- /* istanbul ignore next */
1904
- main.install = function (Vue) {
1905
- Vue.component(main.name, main);
1906
- };
1907
- /* harmony default export */ var Sender = __webpack_exports__["default"] = (main);
1908
-
1909
- /***/ })
1910
-
1911
- /******/ });