@mdsfe/mds-ui 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/CHANGELOG.md +778 -0
  2. package/LICENSE +21 -0
  3. package/README.md +106 -0
  4. package/dist/_locale/index.js +18 -0
  5. package/dist/_locale/zh-CN.js +123 -0
  6. package/dist/_mixin/emitter.js +35 -0
  7. package/dist/_mixin/focus.js +13 -0
  8. package/dist/_mixin/locale.js +17 -0
  9. package/dist/_mixin/popper.js +192 -0
  10. package/dist/_mixin/tooltip.js +218 -0
  11. package/dist/_util/__test__/switchcase.test.js +43 -0
  12. package/dist/_util/autoprefixer.js +249 -0
  13. package/dist/_util/clickoutside.js +79 -0
  14. package/dist/_util/date.js +368 -0
  15. package/dist/_util/dateUtil.js +311 -0
  16. package/dist/_util/dom.js +240 -0
  17. package/dist/_util/getRequestAnimationFrame.js +50 -0
  18. package/dist/_util/getScroll.js +21 -0
  19. package/dist/_util/loaders/loaders.css.js +52 -0
  20. package/dist/_util/loaders/loading.js +53 -0
  21. package/dist/_util/merge.js +18 -0
  22. package/dist/_util/popper.js +1261 -0
  23. package/dist/_util/popup/index.js +232 -0
  24. package/dist/_util/popup/popup-manager.js +205 -0
  25. package/dist/_util/proptype.js +12 -0
  26. package/dist/_util/repeatClick.js +30 -0
  27. package/dist/_util/resize.js +61 -0
  28. package/dist/_util/resizeEvent.js +59 -0
  29. package/dist/_util/scrollIntoView.js +38 -0
  30. package/dist/_util/scrollbar-width.js +37 -0
  31. package/dist/_util/soda.js +54 -0
  32. package/dist/_util/switchcase.js +22 -0
  33. package/dist/_util/throttleByAnimationFrame.js +70 -0
  34. package/dist/_util/tree/node.js +412 -0
  35. package/dist/_util/tree/tree.js +410 -0
  36. package/dist/_util/util.js +166 -0
  37. package/dist/_util/vue-popper.js +213 -0
  38. package/dist/affix.js +509 -0
  39. package/dist/anchor.js +522 -0
  40. package/dist/avatar.js +437 -0
  41. package/dist/backtop.js +469 -0
  42. package/dist/badge.js +439 -0
  43. package/dist/bordershadow.js +310 -0
  44. package/dist/breadcrumb.js +434 -0
  45. package/dist/button.js +579 -0
  46. package/dist/card.js +514 -0
  47. package/dist/carousel.js +1326 -0
  48. package/dist/cascaderpanel.js +2320 -0
  49. package/dist/checkbox.js +681 -0
  50. package/dist/col.js +546 -0
  51. package/dist/collapse.js +671 -0
  52. package/dist/color.js +306 -0
  53. package/dist/datepicker.js +8089 -0
  54. package/dist/divider.js +346 -0
  55. package/dist/drawer.js +652 -0
  56. package/dist/dropdown.js +687 -0
  57. package/dist/empty.js +416 -0
  58. package/dist/font.js +306 -0
  59. package/dist/form.js +878 -0
  60. package/dist/icon.js +401 -0
  61. package/dist/index.js +1 -0
  62. package/dist/input.js +1251 -0
  63. package/dist/inputnumber.js +689 -0
  64. package/dist/layout.js +786 -0
  65. package/dist/list.js +789 -0
  66. package/dist/loading.js +430 -0
  67. package/dist/mds-ui.min.css +7 -0
  68. package/dist/mds-ui.min.js +64911 -0
  69. package/dist/menu.js +1131 -0
  70. package/dist/message.js +1016 -0
  71. package/dist/modal.js +895 -0
  72. package/dist/notification.js +818 -0
  73. package/dist/pagination.js +1213 -0
  74. package/dist/popconfirm.js +336 -0
  75. package/dist/popover.js +206 -0
  76. package/dist/progress.js +1023 -0
  77. package/dist/radio.js +760 -0
  78. package/dist/rate.js +765 -0
  79. package/dist/row.js +546 -0
  80. package/dist/select.js +4950 -0
  81. package/dist/slider.js +1411 -0
  82. package/dist/slottable.js +1414 -0
  83. package/dist/steps.js +546 -0
  84. package/dist/style/affix.css +5524 -0
  85. package/dist/style/anchor.css +5572 -0
  86. package/dist/style/avatar.css +5587 -0
  87. package/dist/style/backtop.css +34 -0
  88. package/dist/style/badge.css +5655 -0
  89. package/dist/style/bordershadow.css +5601 -0
  90. package/dist/style/breadcrumb.css +5551 -0
  91. package/dist/style/button.css +7679 -0
  92. package/dist/style/card.css +5670 -0
  93. package/dist/style/carousel.css +5731 -0
  94. package/dist/style/cascaderpanel.css +125 -0
  95. package/dist/style/checkbox.css +5700 -0
  96. package/dist/style/col.css +8121 -0
  97. package/dist/style/collapse.css +5593 -0
  98. package/dist/style/color.css +6136 -0
  99. package/dist/style/datepicker.css +5977 -0
  100. package/dist/style/divider.css +5558 -0
  101. package/dist/style/drawer.css +7979 -0
  102. package/dist/style/dropdown.css +7950 -0
  103. package/dist/style/empty.css +5563 -0
  104. package/dist/style/font.css +5559 -0
  105. package/dist/style/form.css +5662 -0
  106. package/dist/style/icon.css +5538 -0
  107. package/dist/style/input.css +6256 -0
  108. package/dist/style/inputnumber.css +5828 -0
  109. package/dist/style/layout.css +5572 -0
  110. package/dist/style/list.css +5655 -0
  111. package/dist/style/loading.css +5540 -0
  112. package/dist/style/menu.css +6183 -0
  113. package/dist/style/message.css +194 -0
  114. package/dist/style/modal.css +5637 -0
  115. package/dist/style/notification.css +5706 -0
  116. package/dist/style/pagination.css +6683 -0
  117. package/dist/style/popconfirm.css +7951 -0
  118. package/dist/style/popover.css +5727 -0
  119. package/dist/style/progress.css +5714 -0
  120. package/dist/style/radio.css +5769 -0
  121. package/dist/style/rate.css +5616 -0
  122. package/dist/style/row.css +8121 -0
  123. package/dist/style/select.css +5729 -0
  124. package/dist/style/slider.css +5594 -0
  125. package/dist/style/slottable.css +5831 -0
  126. package/dist/style/steps.css +6100 -0
  127. package/dist/style/switch.css +5624 -0
  128. package/dist/style/table.css +8392 -0
  129. package/dist/style/tabs.css +6047 -0
  130. package/dist/style/tag.css +5935 -0
  131. package/dist/style/text.css +5636 -0
  132. package/dist/style/timeline.css +5602 -0
  133. package/dist/style/timepicker.css +5904 -0
  134. package/dist/style/tooltip.css +5686 -0
  135. package/dist/style/transfer.css +101 -0
  136. package/dist/style/transition.css +1417 -0
  137. package/dist/style/tree.css +5598 -0
  138. package/dist/style/typography.css +5640 -0
  139. package/dist/style/upload.css +5834 -0
  140. package/dist/switch.js +448 -0
  141. package/dist/table.js +3809 -0
  142. package/dist/tabs.js +1273 -0
  143. package/dist/tag.js +478 -0
  144. package/dist/text.js +1100 -0
  145. package/dist/timeline.js +495 -0
  146. package/dist/timepicker.js +1567 -0
  147. package/dist/tooltip.js +179 -0
  148. package/dist/transfer.js +981 -0
  149. package/dist/transition.js +246 -0
  150. package/dist/tree.js +1866 -0
  151. package/dist/typography.js +469 -0
  152. package/dist/upload.js +1990 -0
  153. package/package.json +144 -0
package/dist/input.js ADDED
@@ -0,0 +1,1251 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("./_util/proptype"), require("./icon"), require("./_mixin/emitter"), require("./button"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["./_util/proptype", "./icon", "./_mixin/emitter", "./button"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("./_util/proptype"), require("./icon"), require("./_mixin/emitter"), require("./button")) : factory(root["./_util/proptype"], root["./icon"], root["./_mixin/emitter"], root["./button"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(window, function(__WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__) {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+ /******/
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId]) {
20
+ /******/ return installedModules[moduleId].exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ i: moduleId,
25
+ /******/ l: false,
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+ /******/
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.l = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+ /******/
39
+ /******/
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+ /******/
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+ /******/
46
+ /******/ // define getter function for harmony exports
47
+ /******/ __webpack_require__.d = function(exports, name, getter) {
48
+ /******/ if(!__webpack_require__.o(exports, name)) {
49
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
+ /******/ }
51
+ /******/ };
52
+ /******/
53
+ /******/ // define __esModule on exports
54
+ /******/ __webpack_require__.r = function(exports) {
55
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
+ /******/ }
58
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
+ /******/ };
60
+ /******/
61
+ /******/ // create a fake namespace object
62
+ /******/ // mode & 1: value is a module id, require it
63
+ /******/ // mode & 2: merge all properties of value into the ns
64
+ /******/ // mode & 4: return value when already ns object
65
+ /******/ // mode & 8|1: behave like require
66
+ /******/ __webpack_require__.t = function(value, mode) {
67
+ /******/ if(mode & 1) value = __webpack_require__(value);
68
+ /******/ if(mode & 8) return value;
69
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
+ /******/ var ns = Object.create(null);
71
+ /******/ __webpack_require__.r(ns);
72
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
+ /******/ return ns;
75
+ /******/ };
76
+ /******/
77
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
78
+ /******/ __webpack_require__.n = function(module) {
79
+ /******/ var getter = module && module.__esModule ?
80
+ /******/ function getDefault() { return module['default']; } :
81
+ /******/ function getModuleExports() { return module; };
82
+ /******/ __webpack_require__.d(getter, 'a', getter);
83
+ /******/ return getter;
84
+ /******/ };
85
+ /******/
86
+ /******/ // Object.prototype.hasOwnProperty.call
87
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
+ /******/
89
+ /******/ // __webpack_public_path__
90
+ /******/ __webpack_require__.p = "/dist/";
91
+ /******/
92
+ /******/
93
+ /******/ // Load entry module and return exports
94
+ /******/ return __webpack_require__(__webpack_require__.s = 100);
95
+ /******/ })
96
+ /************************************************************************/
97
+ /******/ ({
98
+
99
+ /***/ 0:
100
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
101
+
102
+ "use strict";
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
104
+ /* globals __VUE_SSR_CONTEXT__ */
105
+
106
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
107
+ // This module is a runtime utility for cleaner component module output and will
108
+ // be included in the final webpack user bundle.
109
+
110
+ function normalizeComponent (
111
+ scriptExports,
112
+ render,
113
+ staticRenderFns,
114
+ functionalTemplate,
115
+ injectStyles,
116
+ scopeId,
117
+ moduleIdentifier, /* server only */
118
+ shadowMode /* vue-cli only */
119
+ ) {
120
+ // Vue.extend constructor export interop
121
+ var options = typeof scriptExports === 'function'
122
+ ? scriptExports.options
123
+ : scriptExports
124
+
125
+ // render functions
126
+ if (render) {
127
+ options.render = render
128
+ options.staticRenderFns = staticRenderFns
129
+ options._compiled = true
130
+ }
131
+
132
+ // functional template
133
+ if (functionalTemplate) {
134
+ options.functional = true
135
+ }
136
+
137
+ // scopedId
138
+ if (scopeId) {
139
+ options._scopeId = 'data-v-' + scopeId
140
+ }
141
+
142
+ var hook
143
+ if (moduleIdentifier) { // server build
144
+ hook = function (context) {
145
+ // 2.3 injection
146
+ context =
147
+ context || // cached call
148
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
149
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
150
+ // 2.2 with runInNewContext: true
151
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
152
+ context = __VUE_SSR_CONTEXT__
153
+ }
154
+ // inject component styles
155
+ if (injectStyles) {
156
+ injectStyles.call(this, context)
157
+ }
158
+ // register component module identifier for async chunk inferrence
159
+ if (context && context._registeredComponents) {
160
+ context._registeredComponents.add(moduleIdentifier)
161
+ }
162
+ }
163
+ // used by ssr in case component is cached and beforeCreate
164
+ // never gets called
165
+ options._ssrRegister = hook
166
+ } else if (injectStyles) {
167
+ hook = shadowMode
168
+ ? function () {
169
+ injectStyles.call(
170
+ this,
171
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
172
+ )
173
+ }
174
+ : injectStyles
175
+ }
176
+
177
+ if (hook) {
178
+ if (options.functional) {
179
+ // for template-only hot-reload because in that case the render fn doesn't
180
+ // go through the normalizer
181
+ options._injectStyles = hook
182
+ // register for functional component in vue file
183
+ var originalRender = options.render
184
+ options.render = function renderWithStyleInjection (h, context) {
185
+ hook.call(context)
186
+ return originalRender(h, context)
187
+ }
188
+ } else {
189
+ // inject component registration as beforeCreate hook
190
+ var existing = options.beforeCreate
191
+ options.beforeCreate = existing
192
+ ? [].concat(existing, hook)
193
+ : [hook]
194
+ }
195
+ }
196
+
197
+ return {
198
+ exports: scriptExports,
199
+ options: options
200
+ }
201
+ }
202
+
203
+
204
+ /***/ }),
205
+
206
+ /***/ 1:
207
+ /***/ (function(module, exports) {
208
+
209
+ module.exports = require("babel-runtime/helpers/defineProperty");
210
+
211
+ /***/ }),
212
+
213
+ /***/ 100:
214
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
215
+
216
+ "use strict";
217
+ // ESM COMPAT FLAG
218
+ __webpack_require__.r(__webpack_exports__);
219
+
220
+ // EXTERNAL MODULE: ./components/input/style/index.js
221
+ var style = __webpack_require__(54);
222
+
223
+ // EXTERNAL MODULE: external "babel-runtime/helpers/defineProperty"
224
+ var defineProperty_ = __webpack_require__(1);
225
+ var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_);
226
+
227
+ // EXTERNAL MODULE: external "./_util/proptype"
228
+ var proptype_ = __webpack_require__(3);
229
+
230
+ // EXTERNAL MODULE: external "./icon"
231
+ var external_icon_ = __webpack_require__(4);
232
+ var external_icon_default = /*#__PURE__*/__webpack_require__.n(external_icon_);
233
+
234
+ // EXTERNAL MODULE: external "./_mixin/emitter"
235
+ var emitter_ = __webpack_require__(6);
236
+ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
237
+
238
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/input/input.vue?vue&type=script&lang=js&
239
+
240
+
241
+
242
+
243
+
244
+
245
+ var SIZEMAP = {
246
+ 'small': 'sm',
247
+ 'large': 'lg',
248
+ 'default': '',
249
+ 'medium': 'md',
250
+ 'mini': 'mni'
251
+ };
252
+
253
+ /* harmony default export */ var inputvue_type_script_lang_js_ = ({
254
+ name: 'MdsInput',
255
+ mixins: [emitter_default.a],
256
+ props: {
257
+ addonAfter: String,
258
+ addonBefore: String,
259
+ autocomplete: {
260
+ type: String,
261
+ default: 'off'
262
+ },
263
+ autofocus: {
264
+ type: Boolean,
265
+ default: false
266
+ },
267
+ clearable: {
268
+ type: Boolean,
269
+ default: false
270
+ },
271
+ disabled: {
272
+ type: Boolean,
273
+ default: false
274
+ },
275
+ id: {
276
+ type: String
277
+ },
278
+ name: {
279
+ type: String
280
+ },
281
+ number: {
282
+ type: Boolean,
283
+ default: false
284
+ },
285
+ placeholder: {
286
+ type: String,
287
+ default: ''
288
+ },
289
+ prefix: String,
290
+ prefixCls: {
291
+ type: String,
292
+ default: 'mds-input'
293
+ },
294
+ bulefixCls: {
295
+ type: String,
296
+ default: ''
297
+ },
298
+ readonly: {
299
+ type: Boolean,
300
+ default: false
301
+ },
302
+ size: {
303
+ type: String,
304
+ validator: function validator(value) {
305
+ return Object(proptype_["oneOf"])(value, ['small', 'large', 'default', 'mini', 'medium']);
306
+ },
307
+
308
+ default: 'default'
309
+ },
310
+ suffix: String,
311
+ type: {
312
+ type: String
313
+ },
314
+ // 用于判定是否进行表单校验
315
+ role: String,
316
+ width: String,
317
+ value: null,
318
+ showLimit: Boolean
319
+ },
320
+ computed: {
321
+ maxlength: function maxlength() {
322
+ return this.$attrs.maxlength;
323
+ },
324
+ minlength: function minlength() {
325
+ return this.$attrs.minlength;
326
+ },
327
+ inputClass: function inputClass() {
328
+ var _ref;
329
+
330
+ var size = this.size && SIZEMAP[this.size];
331
+ return [this.prefixCls, (_ref = {}, defineProperty_default()(_ref, this.prefixCls + '-' + size, !!size), defineProperty_default()(_ref, this.prefixCls + '-disabled', !!this.disabled), _ref)];
332
+ },
333
+ getInputVal: function getInputVal() {
334
+ return this.value === null || this.value === undefined ? '' : String(this.value);
335
+ },
336
+ showClear: function showClear() {
337
+ return this.clearable && !this.disabled && !this.readonly && this.getInputVal && (this.focused || this.hovering);
338
+ },
339
+ showAddonAfter: function showAddonAfter() {
340
+ return this.addonAfter || this.$slots.addonAfter !== undefined;
341
+ },
342
+ showAddonBefore: function showAddonBefore() {
343
+ return this.addonBefore || this.$slots.addonBefore !== undefined;
344
+ },
345
+ showPrefix: function showPrefix() {
346
+ return this.prefix || this.$slots.prefix !== undefined;
347
+ },
348
+ showSuffix: function showSuffix() {
349
+ return this.suffix || this.$slots.suffix !== undefined || this.clearable || this.showLimitText;
350
+ },
351
+ showLimitText: function showLimitText() {
352
+ return this.maxlength && this.showLimit;
353
+ }
354
+ },
355
+ render: function render(h) {
356
+ var _this = this;
357
+
358
+ console.log(this.showLimitText);
359
+ // bug hack from https://github.com/vuejs/vue/blob/dev/src/platforms/web/util/attrs.js#L10-L18
360
+ var basicInput = h('input', {
361
+ attrs: {
362
+ type: this.type,
363
+ value: this.value,
364
+ placeholder: this.placeholder,
365
+ readonly: this.readonly,
366
+ name: this.name,
367
+ number: this.number,
368
+ autofocus: this.autofocus,
369
+ disabled: this.disabled,
370
+ id: this.id,
371
+ autocomplete: this.autocomplete,
372
+ maxlength: this.maxlength,
373
+ minlength: this.minlength
374
+ },
375
+ style: {
376
+ width: this.width ? this.width : ''
377
+ },
378
+ domProps: {
379
+ value: this.value
380
+ },
381
+ 'class': this.inputClass,
382
+ 'ref': 'input',
383
+ on: {
384
+ blur: this.handleBlur,
385
+ change: this.handleChange,
386
+ click: this.handleClick,
387
+ focus: this.handleFocus,
388
+ input: this.updateValue,
389
+ keypress: this.handleKeyDown,
390
+ compositionstart: this.handleComposition,
391
+ compositionupdate: this.handleComposition,
392
+ compositionend: this.handleComposition
393
+ }
394
+ });
395
+ var clearBtn = h(external_icon_default.a, {
396
+ props: {
397
+ type: 'line-close-circle'
398
+ },
399
+ 'class': this.prefixCls + '-clearable',
400
+ nativeOn: {
401
+ click: this.clear
402
+ }
403
+ });
404
+ var renderLabeledInput = function renderLabeledInput(children) {
405
+ if (!_this.showAddonBefore && !_this.showAddonAfter) {
406
+ return children;
407
+ }
408
+
409
+ var wrapperClassName = _this.prefixCls + '-group';
410
+ var addonClassName = _this.bulefixCls === 'blue' ? wrapperClassName + '-blue-addon' : wrapperClassName + '-addon';
411
+ var addonBefore = h('span', { 'class': addonClassName }, [_this.$slots.addonBefore || _this.addonBefore]);
412
+ var addonAfter = h('span', { 'class': addonClassName }, [_this.$slots.addonAfter || _this.addonAfter]);
413
+
414
+ var className = [_this.prefixCls + '-wrapper', defineProperty_default()({}, wrapperClassName, addonBefore || addonAfter)];
415
+
416
+ if (_this.showAddonBefore || _this.showAddonAfter) {
417
+ return h('span', { 'class': _this.prefixCls + '-group-wrapper' }, [h('span', { 'class': className }, [_this.showAddonBefore ? addonBefore : null, children, _this.showAddonAfter ? addonAfter : null])]);
418
+ }
419
+ return h('span', { 'class': className }, [children]);
420
+ };
421
+
422
+ var renderLabeledIcon = function renderLabeledIcon(children) {
423
+ if (!(_this.showSuffix || _this.showPrefix || _this.showClear)) {
424
+ return children;
425
+ }
426
+
427
+ var limit = h('span', { 'class': _this.prefixCls + '-showLimit' }, [_this.value.length + '/' + _this.maxlength]);
428
+
429
+ var prefix = h('span', { 'class': _this.prefixCls + '-prefix' }, [_this.$slots.prefix || _this.prefix]);
430
+ var suffix = h('span', { 'class': _this.prefixCls + '-suffix' }, [_this.showClear ? clearBtn : null, _this.showLimitText ? limit : null, _this.$slots.suffix || _this.suffix]);
431
+
432
+ return h('span', {
433
+ 'class': [_this.prefixCls + '-affix-wrapper'],
434
+ on: {
435
+ mouseenter: function mouseenter() {
436
+ _this.hovering = true;
437
+ },
438
+ mouseleave: function mouseleave() {
439
+ _this.hovering = false;
440
+ }
441
+ }
442
+ }, [_this.showPrefix ? prefix : null, children, _this.showSuffix ? suffix : null]);
443
+ };
444
+
445
+ var renderInput = function renderInput() {
446
+ return renderLabeledIcon(basicInput);
447
+ };
448
+
449
+ return renderLabeledInput(renderInput());
450
+ },
451
+ data: function data() {
452
+ return {
453
+ focused: false,
454
+ hovering: false,
455
+ isOnComposition: false
456
+ };
457
+ },
458
+
459
+ watch: {
460
+ value: function value() {
461
+ if (this.isOnComposition) return;
462
+ this.dispatch('MdsFormItem', 'formItemChange');
463
+ }
464
+ },
465
+ methods: {
466
+ clear: function clear(e) {
467
+ this.$emit('input', '');
468
+ this.$emit('change', '');
469
+ this.$emit('clear');
470
+ this.dispatch('MdsFormItem', 'formItemChange', e);
471
+ },
472
+ getInput: function getInput() {
473
+ return this.$refs.input;
474
+ },
475
+ focus: function focus() {
476
+ this.getInput().focus();
477
+ },
478
+ handleKeyDown: function handleKeyDown(e) {
479
+ if (e.keyCode === 13) {
480
+ this.$emit('press-enter', e);
481
+ }
482
+ this.$emit('keydown', e);
483
+ },
484
+ handleComposition: function handleComposition(e) {
485
+ var _this2 = this;
486
+
487
+ if (e.type === 'compositionend') {
488
+ this.isOnComposition = false;
489
+ this.$nextTick(function (_) {
490
+ return _this2.updateValue(e);
491
+ });
492
+ } else {
493
+ this.isOnComposition = true;
494
+ }
495
+ },
496
+ updateValue: function updateValue(e) {
497
+ if (this.isOnComposition) return;
498
+ this.$emit('input', e.target.value);
499
+ this.dispatch('MdsFormItem', 'formItemChange', e);
500
+ },
501
+ handleBlur: function handleBlur(e) {
502
+ this.focused = false;
503
+ this.$emit('blur', e);
504
+ if (this.role !== 'picker') {
505
+ this.dispatch('MdsFormItem', 'formItemBlur', e);
506
+ }
507
+ },
508
+ blur: function blur(e) {
509
+ this.$refs.input.blur();
510
+ this.$emit('blur', e);
511
+ },
512
+ handleFocus: function handleFocus(e) {
513
+ this.focused = true;
514
+ this.$emit('focus', e);
515
+ },
516
+ handleClick: function handleClick(e) {
517
+ this.$emit('click', e);
518
+ },
519
+ handleChange: function handleChange(e) {
520
+ this.$emit('change', e.target.value);
521
+ }
522
+ }
523
+ });
524
+ // CONCATENATED MODULE: ./components/input/input.vue?vue&type=script&lang=js&
525
+ /* harmony default export */ var input_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_);
526
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
527
+ var componentNormalizer = __webpack_require__(0);
528
+
529
+ // CONCATENATED MODULE: ./components/input/input.vue
530
+ var input_render, staticRenderFns
531
+
532
+
533
+
534
+
535
+ /* normalize component */
536
+
537
+ var component = Object(componentNormalizer["a" /* default */])(
538
+ input_inputvue_type_script_lang_js_,
539
+ input_render,
540
+ staticRenderFns,
541
+ false,
542
+ null,
543
+ null,
544
+ null
545
+
546
+ )
547
+
548
+ /* hot reload */
549
+ if (false) { var api; }
550
+ component.options.__file = "components/input/input.vue"
551
+ /* harmony default export */ var input = (component.exports);
552
+ // EXTERNAL MODULE: external "./button"
553
+ var external_button_ = __webpack_require__(7);
554
+ var external_button_default = /*#__PURE__*/__webpack_require__.n(external_button_);
555
+
556
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/input/search.vue?vue&type=script&lang=js&
557
+
558
+
559
+
560
+
561
+ // 兼容buttonsize
562
+ var BUTTONSIZE = {
563
+ 'small': 'small',
564
+ 'large': 'large',
565
+ 'mini': 'large-small'
566
+ };
567
+ /* harmony default export */ var searchvue_type_script_lang_js_ = ({
568
+ name: 'MdsInputSearch',
569
+ props: {
570
+ addonAfter: String,
571
+ addonBefore: String,
572
+ autocomplete: {
573
+ type: String,
574
+ default: 'off'
575
+ },
576
+ autofocus: {
577
+ type: Boolean,
578
+ default: false
579
+ },
580
+ className: {
581
+ type: String
582
+ },
583
+ disabled: {
584
+ type: Boolean,
585
+ default: false
586
+ },
587
+ clearable: {
588
+ type: Boolean,
589
+ default: false
590
+ },
591
+ id: {
592
+ type: String
593
+ },
594
+ name: {
595
+ type: String
596
+ },
597
+ number: {
598
+ type: Boolean,
599
+ default: false
600
+ },
601
+ enterButton: {
602
+ type: Boolean,
603
+ default: false
604
+ },
605
+ enterButtonText: {
606
+ type: String,
607
+ default: ''
608
+ },
609
+ placeholder: {
610
+ type: String,
611
+ default: ''
612
+ },
613
+ prefix: String,
614
+ prefixCls: {
615
+ type: String,
616
+ default: 'mds-input'
617
+ },
618
+ readonly: {
619
+ type: Boolean,
620
+ default: false
621
+ },
622
+ size: String,
623
+ suffix: String,
624
+ type: {
625
+ type: String
626
+ },
627
+ maxlength: {
628
+ type: Number
629
+ },
630
+ minlength: {
631
+ type: Number
632
+ },
633
+ value: null
634
+ },
635
+ render: function render(h) {
636
+ var _this = this;
637
+
638
+ var searchIcon = h(external_icon_default.a, {
639
+ props: {
640
+ type: 'line-search'
641
+ },
642
+ 'class': 'mds-input-search-icon',
643
+ slot: 'suffix',
644
+ nativeOn: {
645
+ click: function click() {
646
+ _this.$emit('search', _this.value);
647
+ }
648
+ }
649
+ });
650
+ var searchBtn = h(external_button_default.a, {
651
+ props: {
652
+ type: 'primary',
653
+ icon: this.enterButtonText ? '' : 'line-search',
654
+ size: BUTTONSIZE[this.size]
655
+ },
656
+ slot: 'addonAfter',
657
+ nativeOn: {
658
+ click: function click() {
659
+ _this.$emit('search', _this.value);
660
+ }
661
+ }
662
+ }, this.enterButtonText);
663
+ var renderArr = [];
664
+ if (this.enterButton) {
665
+ renderArr.push(searchBtn);
666
+ } else {
667
+ renderArr.push(searchIcon);
668
+ }
669
+ return h(input, {
670
+ props: this.$props,
671
+ 'class': 'mds-input-search',
672
+ on: {
673
+ input: function input(value) {
674
+ return _this.$emit('input', value);
675
+ },
676
+ 'press-enter': function pressEnter() {
677
+ return _this.$emit('search', _this.value);
678
+ }
679
+ }
680
+ }, renderArr);
681
+ }
682
+ });
683
+ // CONCATENATED MODULE: ./components/input/search.vue?vue&type=script&lang=js&
684
+ /* harmony default export */ var input_searchvue_type_script_lang_js_ = (searchvue_type_script_lang_js_);
685
+ // CONCATENATED MODULE: ./components/input/search.vue
686
+ var search_render, search_staticRenderFns
687
+
688
+
689
+
690
+
691
+ /* normalize component */
692
+
693
+ var search_component = Object(componentNormalizer["a" /* default */])(
694
+ input_searchvue_type_script_lang_js_,
695
+ search_render,
696
+ search_staticRenderFns,
697
+ false,
698
+ null,
699
+ null,
700
+ null
701
+
702
+ )
703
+
704
+ /* hot reload */
705
+ if (false) { var search_api; }
706
+ search_component.options.__file = "components/input/search.vue"
707
+ /* harmony default export */ var search = (search_component.exports);
708
+ // EXTERNAL MODULE: ./components/input/textarea.vue + 5 modules
709
+ var input_textarea = __webpack_require__(41);
710
+
711
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/input/group.vue?vue&type=template&id=9e2c1de2&
712
+ var groupvue_type_template_id_9e2c1de2_render = function () {
713
+ var _vm = this
714
+ var _h = _vm.$createElement
715
+ var _c = _vm._self._c || _h
716
+ return _c("span", { class: _vm.classes }, [_vm._t("default")], 2)
717
+ }
718
+ var groupvue_type_template_id_9e2c1de2_staticRenderFns = []
719
+ groupvue_type_template_id_9e2c1de2_render._withStripped = true
720
+
721
+
722
+ // CONCATENATED MODULE: ./components/input/group.vue?vue&type=template&id=9e2c1de2&
723
+
724
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/input/group.vue?vue&type=script&lang=js&
725
+
726
+ //
727
+ //
728
+ //
729
+ //
730
+ //
731
+ //
732
+
733
+
734
+
735
+ /* harmony default export */ var groupvue_type_script_lang_js_ = ({
736
+ name: 'MdsInputGroup',
737
+ props: {
738
+ compact: {
739
+ type: Boolean,
740
+ default: false
741
+ },
742
+ conjoined: {
743
+ type: Boolean,
744
+ default: false
745
+ },
746
+ prefixCls: {
747
+ type: String,
748
+ default: 'mds-input-group'
749
+ },
750
+ size: {
751
+ type: String,
752
+ default: 'default',
753
+ validator: function validator(value) {
754
+ return Object(proptype_["oneOf"])(value, ['default', 'small', 'large']);
755
+ }
756
+ }
757
+ },
758
+ computed: {
759
+ classes: function classes() {
760
+ var _ref;
761
+
762
+ return [this.prefixCls, (_ref = {}, defineProperty_default()(_ref, this.prefixCls + '-lg', this.size === 'large'), defineProperty_default()(_ref, this.prefixCls + '-sm', this.size === 'small'), defineProperty_default()(_ref, this.prefixCls + '-compact', this.compact), defineProperty_default()(_ref, this.prefixCls + '-conjoined', this.conjoined), _ref)];
763
+ }
764
+ }
765
+ });
766
+ // CONCATENATED MODULE: ./components/input/group.vue?vue&type=script&lang=js&
767
+ /* harmony default export */ var input_groupvue_type_script_lang_js_ = (groupvue_type_script_lang_js_);
768
+ // CONCATENATED MODULE: ./components/input/group.vue
769
+
770
+
771
+
772
+
773
+
774
+ /* normalize component */
775
+
776
+ var group_component = Object(componentNormalizer["a" /* default */])(
777
+ input_groupvue_type_script_lang_js_,
778
+ groupvue_type_template_id_9e2c1de2_render,
779
+ groupvue_type_template_id_9e2c1de2_staticRenderFns,
780
+ false,
781
+ null,
782
+ null,
783
+ null
784
+
785
+ )
786
+
787
+ /* hot reload */
788
+ if (false) { var group_api; }
789
+ group_component.options.__file = "components/input/group.vue"
790
+ /* harmony default export */ var group = (group_component.exports);
791
+ // CONCATENATED MODULE: ./components/input/index.js
792
+
793
+
794
+
795
+
796
+
797
+
798
+ input.Group = group;
799
+ input.Search = search;
800
+ input.TextArea = input_textarea["a" /* default */];
801
+ /* istanbul ignore next */
802
+ input.install = function (Vue) {
803
+ Vue.component(input.name, input);
804
+ Vue.component(search.name, search);
805
+ Vue.component(group.name, group);
806
+ Vue.component(input_textarea["a" /* default */].name, input_textarea["a" /* default */]);
807
+ };
808
+ /* harmony default export */ var components_input = __webpack_exports__["default"] = (input);
809
+
810
+ /***/ }),
811
+
812
+ /***/ 131:
813
+ /***/ (function(module, exports) {
814
+
815
+ // removed by extract-text-webpack-plugin
816
+
817
+ /***/ }),
818
+
819
+ /***/ 169:
820
+ /***/ (function(module, exports) {
821
+
822
+ // removed by extract-text-webpack-plugin
823
+
824
+ /***/ }),
825
+
826
+ /***/ 3:
827
+ /***/ (function(module, exports) {
828
+
829
+ module.exports = __WEBPACK_EXTERNAL_MODULE__3__;
830
+
831
+ /***/ }),
832
+
833
+ /***/ 4:
834
+ /***/ (function(module, exports) {
835
+
836
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
837
+
838
+ /***/ }),
839
+
840
+ /***/ 41:
841
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
842
+
843
+ "use strict";
844
+
845
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/input/textarea.vue?vue&type=template&id=5786ca5a&
846
+ var render = function () {
847
+ var _vm = this
848
+ var _h = _vm.$createElement
849
+ var _c = _vm._self._c || _h
850
+ return _c(
851
+ "div",
852
+ { class: _vm.prefixCls + "-content " + (_vm.disabled ? "disable" : "") },
853
+ [
854
+ _c("textarea", {
855
+ directives: [
856
+ {
857
+ name: "model",
858
+ rawName: "v-model",
859
+ value: _vm.valueData,
860
+ expression: "valueData",
861
+ },
862
+ ],
863
+ ref: "textAreaRef",
864
+ class: _vm.prefixCls + " " + _vm.prefixCls + "-textarea",
865
+ style: _vm.textareaStyles,
866
+ attrs: {
867
+ maxlength: _vm.max_length,
868
+ minlength: _vm.min_length,
869
+ rows: _vm.rows,
870
+ placeholder: _vm.placeholder,
871
+ disabled: _vm.disabled,
872
+ },
873
+ domProps: { value: _vm.valueData },
874
+ on: {
875
+ input: [
876
+ function ($event) {
877
+ if ($event.target.composing) {
878
+ return
879
+ }
880
+ _vm.valueData = $event.target.value
881
+ },
882
+ _vm.handleInput,
883
+ ],
884
+ keypress: _vm.handleKeyDown,
885
+ change: _vm.handleChange,
886
+ focus: _vm.handleFocus,
887
+ blur: _vm.handleBlur,
888
+ },
889
+ }),
890
+ _vm.showLimit && _vm.max_length
891
+ ? _c("span", { class: _vm.prefixCls + "-show-limit" }, [
892
+ _vm._v(_vm._s(_vm.number) + "/" + _vm._s(_vm.max_length)),
893
+ ])
894
+ : _vm._e(),
895
+ ]
896
+ )
897
+ }
898
+ var staticRenderFns = []
899
+ render._withStripped = true
900
+
901
+
902
+ // CONCATENATED MODULE: ./components/input/textarea.vue?vue&type=template&id=5786ca5a&
903
+
904
+ // CONCATENATED MODULE: ./components/input/calculateNodeHeight.js
905
+ // Thanks to https://github.com/andreypopp/react-textarea-autosize/
906
+
907
+ /**
908
+ * calculateNodeHeight(uiTextNode, useCache = false)
909
+ */
910
+
911
+ var HIDDEN_TEXTAREA_STYLE = '\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n';
912
+
913
+ var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
914
+
915
+ var computedStyleCache = {};
916
+ var hiddenTextarea = void 0;
917
+
918
+ function calculateNodeStyling(node) {
919
+ var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
920
+
921
+ var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');
922
+
923
+ if (useCache && computedStyleCache[nodeRef]) {
924
+ return computedStyleCache[nodeRef];
925
+ }
926
+
927
+ var style = window.getComputedStyle(node);
928
+
929
+ var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');
930
+
931
+ var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
932
+
933
+ var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
934
+
935
+ var sizingStyle = SIZING_STYLE.map(function (name) {
936
+ return name + ':' + style.getPropertyValue(name);
937
+ }).join(';');
938
+
939
+ var nodeInfo = {
940
+ sizingStyle: sizingStyle,
941
+ paddingSize: paddingSize,
942
+ borderSize: borderSize,
943
+ boxSizing: boxSizing
944
+ };
945
+
946
+ if (useCache && nodeRef) {
947
+ computedStyleCache[nodeRef] = nodeInfo;
948
+ }
949
+
950
+ return nodeInfo;
951
+ }
952
+
953
+ function calculateNodeHeight(uiTextNode) {
954
+ var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
955
+ var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
956
+ var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
957
+
958
+ if (!hiddenTextarea) {
959
+ hiddenTextarea = document.createElement('textarea');
960
+ document.body.appendChild(hiddenTextarea);
961
+ }
962
+
963
+ // Fix wrap="off" issue
964
+ // https://github.com/mds-design/mds-design/issues/6577
965
+ if (uiTextNode.getAttribute('wrap')) {
966
+ hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
967
+ } else {
968
+ hiddenTextarea.removeAttribute('wrap');
969
+ }
970
+
971
+ // Copy all CSS properties that have an impact on the height of the content in
972
+ // the textbox
973
+
974
+ var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache),
975
+ paddingSize = _calculateNodeStyling.paddingSize,
976
+ borderSize = _calculateNodeStyling.borderSize,
977
+ boxSizing = _calculateNodeStyling.boxSizing,
978
+ sizingStyle = _calculateNodeStyling.sizingStyle;
979
+
980
+ // Need to have the overflow attribute to hide the scrollbar otherwise
981
+ // text-lines will not calculated properly as the shadow will technically be
982
+ // narrower for content
983
+
984
+
985
+ hiddenTextarea.setAttribute('style', sizingStyle + ';' + HIDDEN_TEXTAREA_STYLE);
986
+ hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
987
+
988
+ var minHeight = -Infinity;
989
+ var maxHeight = Infinity;
990
+ var height = hiddenTextarea.scrollHeight;
991
+ var overflowY = void 0;
992
+
993
+ if (boxSizing === 'border-box') {
994
+ // border-box: add border, since height = content + padding + border
995
+ height = height + borderSize;
996
+ } else if (boxSizing === 'content-box') {
997
+ // remove padding, since height = content
998
+ height = height - paddingSize;
999
+ }
1000
+
1001
+ if (minRows !== null || maxRows !== null) {
1002
+ // measure height of a textarea with a single row
1003
+ hiddenTextarea.value = '';
1004
+ var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
1005
+ if (minRows !== null) {
1006
+ minHeight = singleRowHeight * minRows;
1007
+ if (boxSizing === 'border-box') {
1008
+ minHeight = minHeight + paddingSize + borderSize;
1009
+ }
1010
+ height = Math.max(minHeight, height);
1011
+ }
1012
+ if (maxRows !== null) {
1013
+ maxHeight = singleRowHeight * maxRows;
1014
+ if (boxSizing === 'border-box') {
1015
+ maxHeight = maxHeight + paddingSize + borderSize;
1016
+ }
1017
+ overflowY = height > maxHeight ? '' : 'hidden';
1018
+ height = Math.min(maxHeight, height);
1019
+ }
1020
+ }
1021
+ // Remove scroll bar flash when autosize without maxRows
1022
+ if (!maxRows) {
1023
+ overflowY = 'hidden';
1024
+ }
1025
+ return { height: height + 'px', minHeight: minHeight + 'px', maxHeight: maxHeight + 'px', overflowY: overflowY };
1026
+ }
1027
+ // EXTERNAL MODULE: external "./_mixin/emitter"
1028
+ var emitter_ = __webpack_require__(6);
1029
+ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1030
+
1031
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/input/textarea.vue?vue&type=script&lang=js&
1032
+ //
1033
+ //
1034
+ //
1035
+ //
1036
+ //
1037
+ //
1038
+ //
1039
+ //
1040
+ //
1041
+ //
1042
+ //
1043
+ //
1044
+ //
1045
+ //
1046
+ //
1047
+ //
1048
+ //
1049
+ //
1050
+ //
1051
+ //
1052
+ //
1053
+ //
1054
+
1055
+
1056
+
1057
+
1058
+ function onNextFrame(cb) {
1059
+ if (window.requestAnimationFrame) {
1060
+ return window.requestAnimationFrame(cb);
1061
+ }
1062
+ return window.setTimeout(cb, 1);
1063
+ }
1064
+
1065
+ function clearNextFrameAction(nextFrameId) {
1066
+ if (window.cancelAnimationFrame) {
1067
+ window.cancelAnimationFrame(nextFrameId);
1068
+ } else {
1069
+ window.clearTimeout(nextFrameId);
1070
+ }
1071
+ }
1072
+
1073
+ /* harmony default export */ var textareavue_type_script_lang_js_ = ({
1074
+ name: 'MdsInputTextarea',
1075
+ mixins: [emitter_default.a],
1076
+ props: {
1077
+ autosize: {
1078
+ type: [Boolean, Object],
1079
+ default: false
1080
+ },
1081
+ prefixCls: {
1082
+ type: String,
1083
+ default: 'mds-input'
1084
+ },
1085
+ maxlength: {
1086
+ type: Number
1087
+ },
1088
+ minlength: {
1089
+ type: Number
1090
+ },
1091
+ rows: {
1092
+ type: Number,
1093
+ default: 4
1094
+ },
1095
+ showLimit: {
1096
+ type: Boolean,
1097
+ default: false
1098
+ },
1099
+ placeholder: {
1100
+ type: String,
1101
+ default: ''
1102
+ },
1103
+ disabled: {
1104
+ type: Boolean,
1105
+ default: false
1106
+ },
1107
+ value: null
1108
+ },
1109
+ data: function data() {
1110
+ return {
1111
+ textareaStyles: {},
1112
+ number: 0
1113
+ };
1114
+ },
1115
+
1116
+ computed: {
1117
+ valueData: {
1118
+ get: function get() {
1119
+ return this.value || '';
1120
+ },
1121
+ set: function set(value) {
1122
+ this.$emit('input', value);
1123
+ }
1124
+ },
1125
+ max_length: function max_length() {
1126
+ return this.$attrs.maxlength || this.maxlength;
1127
+ },
1128
+ min_length: function min_length() {
1129
+ return this.$attrs.minlength || this.minlength;
1130
+ }
1131
+ },
1132
+ watch: {
1133
+ valueData: function valueData(newVal) {
1134
+ if (newVal.length > this.maxlength) {
1135
+ return false;
1136
+ } else {
1137
+ this.number = newVal.length;
1138
+ }
1139
+ }
1140
+ },
1141
+ created: function created() {
1142
+ this.number = this.valueData.length;
1143
+ },
1144
+
1145
+ methods: {
1146
+ handleChange: function handleChange(e) {
1147
+ this.$emit('change', e);
1148
+ },
1149
+ handleInput: function handleInput(e) {
1150
+ if (this.nextFrameActionId) {
1151
+ clearNextFrameAction(this.nextFrameActionId);
1152
+ }
1153
+ this.nextFrameActionId = onNextFrame(this.resizeTextarea);
1154
+ this.$emit('input', e.target.value);
1155
+ this.dispatch('MdsFormItem', 'formItemChange', e.target.value);
1156
+ },
1157
+ handleKeyDown: function handleKeyDown(e) {
1158
+ if (e.keyCode === 13) {
1159
+ this.$emit('press-enter', e);
1160
+ }
1161
+ this.$emit('keydown', e);
1162
+ },
1163
+ resizeTextarea: function resizeTextarea() {
1164
+ if (!this.autosize) {
1165
+ return false;
1166
+ }
1167
+ var minRows = this.autosize ? this.autosize.minRows : null;
1168
+ var maxRows = this.autosize ? this.autosize.maxRows : null;
1169
+ this.textareaStyles = calculateNodeHeight(this.$refs.textAreaRef, false, minRows, maxRows);
1170
+ },
1171
+ handleFocus: function handleFocus(e) {
1172
+ this.$emit('focus', e);
1173
+ },
1174
+ handleBlur: function handleBlur(e) {
1175
+ this.$emit('blur', e);
1176
+ this.dispatch('MdsFormItem', 'formItemBlur', e);
1177
+ },
1178
+ focus: function focus() {
1179
+ this.getInput().focus();
1180
+ },
1181
+ blur: function blur() {
1182
+ this.getInput().blur();
1183
+ },
1184
+ getInput: function getInput() {
1185
+ return this.$refs.textAreaRef;
1186
+ }
1187
+ },
1188
+ mounted: function mounted() {
1189
+ this.resizeTextarea();
1190
+ }
1191
+ });
1192
+ // CONCATENATED MODULE: ./components/input/textarea.vue?vue&type=script&lang=js&
1193
+ /* harmony default export */ var input_textareavue_type_script_lang_js_ = (textareavue_type_script_lang_js_);
1194
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1195
+ var componentNormalizer = __webpack_require__(0);
1196
+
1197
+ // CONCATENATED MODULE: ./components/input/textarea.vue
1198
+
1199
+
1200
+
1201
+
1202
+
1203
+ /* normalize component */
1204
+
1205
+ var component = Object(componentNormalizer["a" /* default */])(
1206
+ input_textareavue_type_script_lang_js_,
1207
+ render,
1208
+ staticRenderFns,
1209
+ false,
1210
+ null,
1211
+ null,
1212
+ null
1213
+
1214
+ )
1215
+
1216
+ /* hot reload */
1217
+ if (false) { var api; }
1218
+ component.options.__file = "components/input/textarea.vue"
1219
+ /* harmony default export */ var input_textarea = __webpack_exports__["a"] = (component.exports);
1220
+
1221
+ /***/ }),
1222
+
1223
+ /***/ 54:
1224
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1225
+
1226
+ "use strict";
1227
+ /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(131);
1228
+ /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
1229
+ /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
1230
+ /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
1231
+
1232
+
1233
+
1234
+ /***/ }),
1235
+
1236
+ /***/ 6:
1237
+ /***/ (function(module, exports) {
1238
+
1239
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6__;
1240
+
1241
+ /***/ }),
1242
+
1243
+ /***/ 7:
1244
+ /***/ (function(module, exports) {
1245
+
1246
+ module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
1247
+
1248
+ /***/ })
1249
+
1250
+ /******/ });
1251
+ });