vue-element-ui-x 1.0.3 → 1.0.4

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