@mdsfe/mds-ui 0.2.0 → 0.2.8

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 (131) hide show
  1. package/README.md +9 -9
  2. package/dist/_mixin/popper.js +1 -0
  3. package/dist/_util/_popper/dom-helper.js +284 -0
  4. package/dist/_util/_popper/popper-mixin.js +35 -0
  5. package/dist/_util/_popper/popper.js +1267 -0
  6. package/dist/_util/_popper/popup/popup-main.js +224 -0
  7. package/dist/_util/_popper/popup/popup-manager.js +205 -0
  8. package/dist/_util/_popper/vue-popper.js +204 -0
  9. package/dist/_util/popup/index.js +1 -1
  10. package/dist/_util/tree/node.js +2 -0
  11. package/dist/_util/tree/tree.js +65 -21
  12. package/dist/_util/util.js +29 -1
  13. package/dist/affix.js +18 -18
  14. package/dist/anchor.js +18 -18
  15. package/dist/avatar.js +17 -17
  16. package/dist/backtop.js +19 -19
  17. package/dist/badge.js +21 -21
  18. package/dist/bordershadow.js +20 -9
  19. package/dist/breadcrumb.js +18 -18
  20. package/dist/button.js +21 -21
  21. package/dist/card.js +18 -18
  22. package/dist/carousel.js +76 -76
  23. package/dist/cascader.js +4976 -0
  24. package/dist/cascaderpanel.js +645 -603
  25. package/dist/checkbox.js +23 -23
  26. package/dist/col.js +14 -14
  27. package/dist/collapse.js +6 -6
  28. package/dist/color.js +6 -6
  29. package/dist/datepicker.js +2487 -266
  30. package/dist/divider.js +19 -19
  31. package/dist/drawer.js +787 -37
  32. package/dist/dropdown.js +150 -104
  33. package/dist/empty.js +19 -19
  34. package/dist/font/iconfont.28359fa.ttf +0 -0
  35. package/dist/font/iconfont.486e3d3.woff2 +0 -0
  36. package/dist/font/iconfont.675049e.woff +0 -0
  37. package/dist/font.js +6 -6
  38. package/dist/form.js +28 -26
  39. package/dist/icon.js +55 -47
  40. package/dist/index.js +1 -1
  41. package/dist/input.js +58 -48
  42. package/dist/inputnumber.js +59 -39
  43. package/dist/layout.js +25 -25
  44. package/dist/list.js +17 -17
  45. package/dist/loading.js +21 -8
  46. package/dist/mds-ui.min.css +3 -3
  47. package/dist/mds-ui.min.js +19176 -15406
  48. package/dist/menu.js +31 -31
  49. package/dist/message.js +773 -24
  50. package/dist/modal.js +1146 -307
  51. package/dist/notification.js +27 -27
  52. package/dist/pagination.js +78 -55
  53. package/dist/popconfirm.js +36 -36
  54. package/dist/popover.js +2778 -48
  55. package/dist/progress.js +107 -65
  56. package/dist/radio.js +56 -54
  57. package/dist/rate.js +67 -59
  58. package/dist/row.js +14 -14
  59. package/dist/select.js +847 -503
  60. package/dist/slider.js +25 -25
  61. package/dist/slottable.js +2663 -129
  62. package/dist/steps.js +18 -18
  63. package/dist/style/affix.css +224 -2
  64. package/dist/style/anchor.css +224 -2
  65. package/dist/style/avatar.css +224 -2
  66. package/dist/style/badge.css +224 -2
  67. package/dist/style/bordershadow.css +236 -59
  68. package/dist/style/breadcrumb.css +224 -2
  69. package/dist/style/button.css +234 -5
  70. package/dist/style/card.css +224 -2
  71. package/dist/style/carousel.css +224 -2
  72. package/dist/style/cascader.css +214 -0
  73. package/dist/style/cascaderpanel.css +13 -16
  74. package/dist/style/checkbox.css +230 -8
  75. package/dist/style/col.css +225 -3
  76. package/dist/style/collapse.css +224 -2
  77. package/dist/style/color.css +224 -2
  78. package/dist/style/datepicker.css +236 -2
  79. package/dist/style/divider.css +227 -2
  80. package/dist/style/drawer.css +224 -2
  81. package/dist/style/dropdown.css +234 -5
  82. package/dist/style/empty.css +224 -2
  83. package/dist/style/font.css +226 -4
  84. package/dist/style/form.css +224 -2
  85. package/dist/style/icon.css +226 -3
  86. package/dist/style/input.css +231 -5
  87. package/dist/style/inputnumber.css +224 -2
  88. package/dist/style/layout.css +224 -2
  89. package/dist/style/list.css +224 -2
  90. package/dist/style/loading.css +2527 -2
  91. package/dist/style/menu.css +340 -129
  92. package/dist/style/message.css +1 -4
  93. package/dist/style/modal.css +247 -25
  94. package/dist/style/notification.css +224 -2
  95. package/dist/style/pagination.css +236 -7
  96. package/dist/style/popconfirm.css +334 -180
  97. package/dist/style/popover.css +324 -177
  98. package/dist/style/progress.css +226 -3
  99. package/dist/style/radio.css +225 -3
  100. package/dist/style/rate.css +226 -3
  101. package/dist/style/row.css +225 -3
  102. package/dist/style/select.css +240 -12
  103. package/dist/style/slider.css +224 -2
  104. package/dist/style/slottable.css +350 -149
  105. package/dist/style/steps.css +224 -2
  106. package/dist/style/switch.css +224 -2
  107. package/dist/style/table.css +458 -314
  108. package/dist/style/tabs.css +225 -18
  109. package/dist/style/tag.css +224 -2
  110. package/dist/style/text.css +224 -2
  111. package/dist/style/timeline.css +224 -2
  112. package/dist/style/timepicker.css +231 -6
  113. package/dist/style/tooltip.css +340 -129
  114. package/dist/style/tree.css +228 -6
  115. package/dist/style/typography.css +224 -2
  116. package/dist/style/upload.css +224 -2
  117. package/dist/switch.js +20 -20
  118. package/dist/table.js +3071 -201
  119. package/dist/tabs.js +24 -22
  120. package/dist/tag.js +17 -23
  121. package/dist/text.js +38 -22
  122. package/dist/timeline.js +14 -14
  123. package/dist/timepicker.js +3063 -172
  124. package/dist/tooltip.js +2550 -27
  125. package/dist/transfer.js +28 -28
  126. package/dist/transition.js +6 -6
  127. package/dist/tree.js +316 -171
  128. package/dist/typography.js +6 -6
  129. package/dist/upload.js +46 -38
  130. package/package.json +9 -5
  131. package/CHANGELOG.md +0 -778
package/dist/input.js CHANGED
@@ -7,7 +7,7 @@
7
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
8
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
9
  }
10
- })(window, function(__WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__) {
10
+ })(window, function(__WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__8__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__13__) {
11
11
  return /******/ (function(modules) { // webpackBootstrap
12
12
  /******/ // The module cache
13
13
  /******/ var installedModules = {};
@@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap
91
91
  /******/
92
92
  /******/
93
93
  /******/ // Load entry module and return exports
94
- /******/ return __webpack_require__(__webpack_require__.s = 100);
94
+ /******/ return __webpack_require__(__webpack_require__.s = 108);
95
95
  /******/ })
96
96
  /************************************************************************/
97
97
  /******/ ({
@@ -203,14 +203,7 @@ function normalizeComponent (
203
203
 
204
204
  /***/ }),
205
205
 
206
- /***/ 1:
207
- /***/ (function(module, exports) {
208
-
209
- module.exports = require("babel-runtime/helpers/defineProperty");
210
-
211
- /***/ }),
212
-
213
- /***/ 100:
206
+ /***/ 108:
214
207
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
215
208
 
216
209
  "use strict";
@@ -218,21 +211,21 @@ module.exports = require("babel-runtime/helpers/defineProperty");
218
211
  __webpack_require__.r(__webpack_exports__);
219
212
 
220
213
  // EXTERNAL MODULE: ./components/input/style/index.js
221
- var style = __webpack_require__(54);
214
+ var style = __webpack_require__(59);
222
215
 
223
216
  // EXTERNAL MODULE: external "babel-runtime/helpers/defineProperty"
224
- var defineProperty_ = __webpack_require__(1);
217
+ var defineProperty_ = __webpack_require__(3);
225
218
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_);
226
219
 
227
220
  // EXTERNAL MODULE: external "./_util/proptype"
228
- var proptype_ = __webpack_require__(3);
221
+ var proptype_ = __webpack_require__(7);
229
222
 
230
223
  // EXTERNAL MODULE: external "./icon"
231
- var external_icon_ = __webpack_require__(4);
224
+ var external_icon_ = __webpack_require__(8);
232
225
  var external_icon_default = /*#__PURE__*/__webpack_require__.n(external_icon_);
233
226
 
234
227
  // EXTERNAL MODULE: external "./_mixin/emitter"
235
- var emitter_ = __webpack_require__(6);
228
+ var emitter_ = __webpack_require__(12);
236
229
  var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
237
230
 
238
231
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/input/input.vue?vue&type=script&lang=js&
@@ -355,7 +348,6 @@ var SIZEMAP = {
355
348
  render: function render(h) {
356
349
  var _this = this;
357
350
 
358
- console.log(this.showLimitText);
359
351
  // bug hack from https://github.com/vuejs/vue/blob/dev/src/platforms/web/util/attrs.js#L10-L18
360
352
  var basicInput = h('input', {
361
353
  attrs: {
@@ -424,7 +416,7 @@ var SIZEMAP = {
424
416
  return children;
425
417
  }
426
418
 
427
- var limit = h('span', { 'class': _this.prefixCls + '-showLimit' }, [_this.value.length + '/' + _this.maxlength]);
419
+ var limit = h('span', { 'class': _this.prefixCls + '-showLimit' }, [(_this.value ? _this.value.length : 0) + '/' + _this.maxlength]);
428
420
 
429
421
  var prefix = h('span', { 'class': _this.prefixCls + '-prefix' }, [_this.$slots.prefix || _this.prefix]);
430
422
  var suffix = h('span', { 'class': _this.prefixCls + '-suffix' }, [_this.showClear ? clearBtn : null, _this.showLimitText ? limit : null, _this.$slots.suffix || _this.suffix]);
@@ -517,7 +509,7 @@ var SIZEMAP = {
517
509
  this.$emit('click', e);
518
510
  },
519
511
  handleChange: function handleChange(e) {
520
- this.$emit('change', e.target.value);
512
+ this.$emit('change', e);
521
513
  }
522
514
  }
523
515
  });
@@ -550,7 +542,7 @@ if (false) { var api; }
550
542
  component.options.__file = "components/input/input.vue"
551
543
  /* harmony default export */ var input = (component.exports);
552
544
  // EXTERNAL MODULE: external "./button"
553
- var external_button_ = __webpack_require__(7);
545
+ var external_button_ = __webpack_require__(13);
554
546
  var external_button_default = /*#__PURE__*/__webpack_require__.n(external_button_);
555
547
 
556
548
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/input/search.vue?vue&type=script&lang=js&
@@ -624,12 +616,6 @@ var BUTTONSIZE = {
624
616
  type: {
625
617
  type: String
626
618
  },
627
- maxlength: {
628
- type: Number
629
- },
630
- minlength: {
631
- type: Number
632
- },
633
619
  value: null
634
620
  },
635
621
  render: function render(h) {
@@ -668,6 +654,7 @@ var BUTTONSIZE = {
668
654
  }
669
655
  return h(input, {
670
656
  props: this.$props,
657
+ attrs: this.$attrs,
671
658
  'class': 'mds-input-search',
672
659
  on: {
673
660
  input: function input(value) {
@@ -706,7 +693,7 @@ if (false) { var search_api; }
706
693
  search_component.options.__file = "components/input/search.vue"
707
694
  /* harmony default export */ var search = (search_component.exports);
708
695
  // EXTERNAL MODULE: ./components/input/textarea.vue + 5 modules
709
- var input_textarea = __webpack_require__(41);
696
+ var input_textarea = __webpack_require__(47);
710
697
 
711
698
  // 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
699
  var groupvue_type_template_id_9e2c1de2_render = function () {
@@ -809,35 +796,42 @@ input.install = function (Vue) {
809
796
 
810
797
  /***/ }),
811
798
 
812
- /***/ 131:
799
+ /***/ 12:
813
800
  /***/ (function(module, exports) {
814
801
 
815
- // removed by extract-text-webpack-plugin
802
+ module.exports = __WEBPACK_EXTERNAL_MODULE__12__;
803
+
804
+ /***/ }),
805
+
806
+ /***/ 13:
807
+ /***/ (function(module, exports) {
808
+
809
+ module.exports = __WEBPACK_EXTERNAL_MODULE__13__;
816
810
 
817
811
  /***/ }),
818
812
 
819
- /***/ 169:
813
+ /***/ 139:
820
814
  /***/ (function(module, exports) {
821
815
 
822
816
  // removed by extract-text-webpack-plugin
823
817
 
824
818
  /***/ }),
825
819
 
826
- /***/ 3:
820
+ /***/ 181:
827
821
  /***/ (function(module, exports) {
828
822
 
829
- module.exports = __WEBPACK_EXTERNAL_MODULE__3__;
823
+ // removed by extract-text-webpack-plugin
830
824
 
831
825
  /***/ }),
832
826
 
833
- /***/ 4:
827
+ /***/ 3:
834
828
  /***/ (function(module, exports) {
835
829
 
836
- module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
830
+ module.exports = require("babel-runtime/helpers/defineProperty");
837
831
 
838
832
  /***/ }),
839
833
 
840
- /***/ 41:
834
+ /***/ 47:
841
835
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
842
836
 
843
837
  "use strict";
@@ -861,7 +855,10 @@ var render = function () {
861
855
  },
862
856
  ],
863
857
  ref: "textAreaRef",
864
- class: _vm.prefixCls + " " + _vm.prefixCls + "-textarea",
858
+ class: [
859
+ _vm.prefixCls + " " + _vm.prefixCls + "-textarea",
860
+ _vm.disabled ? "mds-input-disabled" : "",
861
+ ],
865
862
  style: _vm.textareaStyles,
866
863
  attrs: {
867
864
  maxlength: _vm.max_length,
@@ -1025,7 +1022,7 @@ function calculateNodeHeight(uiTextNode) {
1025
1022
  return { height: height + 'px', minHeight: minHeight + 'px', maxHeight: maxHeight + 'px', overflowY: overflowY };
1026
1023
  }
1027
1024
  // EXTERNAL MODULE: external "./_mixin/emitter"
1028
- var emitter_ = __webpack_require__(6);
1025
+ var emitter_ = __webpack_require__(12);
1029
1026
  var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1030
1027
 
1031
1028
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/input/textarea.vue?vue&type=script&lang=js&
@@ -1051,6 +1048,11 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1051
1048
  //
1052
1049
  //
1053
1050
  //
1051
+ //
1052
+ //
1053
+ //
1054
+ //
1055
+ //
1054
1056
 
1055
1057
 
1056
1058
 
@@ -1130,11 +1132,19 @@ function clearNextFrameAction(nextFrameId) {
1130
1132
  }
1131
1133
  },
1132
1134
  watch: {
1133
- valueData: function valueData(newVal) {
1134
- if (newVal.length > this.maxlength) {
1135
- return false;
1136
- } else {
1137
- this.number = newVal.length;
1135
+ valueData: {
1136
+ immediate: true,
1137
+ handler: function handler(newVal) {
1138
+ var _this = this;
1139
+
1140
+ this.$nextTick(function () {
1141
+ _this.resizeTextarea();
1142
+ });
1143
+ if (newVal.length > this.maxlength) {
1144
+ return false;
1145
+ } else {
1146
+ this.number = newVal.length;
1147
+ }
1138
1148
  }
1139
1149
  }
1140
1150
  },
@@ -1220,30 +1230,30 @@ component.options.__file = "components/input/textarea.vue"
1220
1230
 
1221
1231
  /***/ }),
1222
1232
 
1223
- /***/ 54:
1233
+ /***/ 59:
1224
1234
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1225
1235
 
1226
1236
  "use strict";
1227
- /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(131);
1237
+ /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(139);
1228
1238
  /* 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);
1239
+ /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(181);
1230
1240
  /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
1231
1241
 
1232
1242
 
1233
1243
 
1234
1244
  /***/ }),
1235
1245
 
1236
- /***/ 6:
1246
+ /***/ 7:
1237
1247
  /***/ (function(module, exports) {
1238
1248
 
1239
- module.exports = __WEBPACK_EXTERNAL_MODULE__6__;
1249
+ module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
1240
1250
 
1241
1251
  /***/ }),
1242
1252
 
1243
- /***/ 7:
1253
+ /***/ 8:
1244
1254
  /***/ (function(module, exports) {
1245
1255
 
1246
- module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
1256
+ module.exports = __WEBPACK_EXTERNAL_MODULE__8__;
1247
1257
 
1248
1258
  /***/ })
1249
1259
 
@@ -7,7 +7,7 @@
7
7
  var a = typeof exports === 'object' ? factory(require("./icon"), require("./_mixin/emitter"), require("./input")) : factory(root["./icon"], root["./_mixin/emitter"], root["./input"]);
8
8
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
9
  }
10
- })(window, function(__WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__10__) {
10
+ })(window, function(__WEBPACK_EXTERNAL_MODULE__8__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__16__) {
11
11
  return /******/ (function(modules) { // webpackBootstrap
12
12
  /******/ // The module cache
13
13
  /******/ var installedModules = {};
@@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap
91
91
  /******/
92
92
  /******/
93
93
  /******/ // Load entry module and return exports
94
- /******/ return __webpack_require__(__webpack_require__.s = 111);
94
+ /******/ return __webpack_require__(__webpack_require__.s = 119);
95
95
  /******/ })
96
96
  /************************************************************************/
97
97
  /******/ ({
@@ -203,14 +203,7 @@ function normalizeComponent (
203
203
 
204
204
  /***/ }),
205
205
 
206
- /***/ 10:
207
- /***/ (function(module, exports) {
208
-
209
- module.exports = __WEBPACK_EXTERNAL_MODULE__10__;
210
-
211
- /***/ }),
212
-
213
- /***/ 111:
206
+ /***/ 119:
214
207
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
215
208
 
216
209
  "use strict";
@@ -218,10 +211,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__10__;
218
211
  __webpack_require__.r(__webpack_exports__);
219
212
 
220
213
  // EXTERNAL MODULE: ./components/style/index.less
221
- var style = __webpack_require__(131);
214
+ var style = __webpack_require__(139);
222
215
 
223
216
  // EXTERNAL MODULE: ./components/inputnumber/style/index.less
224
- var inputnumber_style = __webpack_require__(171);
217
+ var inputnumber_style = __webpack_require__(183);
225
218
 
226
219
  // CONCATENATED MODULE: ./components/inputnumber/style/index.js
227
220
 
@@ -318,11 +311,11 @@ render._withStripped = true
318
311
  // CONCATENATED MODULE: ./components/inputnumber/inputnumber.vue?vue&type=template&id=6240322c&
319
312
 
320
313
  // EXTERNAL MODULE: external "./icon"
321
- var external_icon_ = __webpack_require__(4);
314
+ var external_icon_ = __webpack_require__(8);
322
315
  var external_icon_default = /*#__PURE__*/__webpack_require__.n(external_icon_);
323
316
 
324
317
  // EXTERNAL MODULE: external "./input"
325
- var external_input_ = __webpack_require__(10);
318
+ var external_input_ = __webpack_require__(16);
326
319
  var external_input_default = /*#__PURE__*/__webpack_require__.n(external_input_);
327
320
 
328
321
  // CONCATENATED MODULE: ./components/inputnumber/props.js
@@ -398,11 +391,12 @@ var external_input_default = /*#__PURE__*/__webpack_require__.n(external_input_)
398
391
  focus: {
399
392
  type: Function,
400
393
  default: function _default() {}
401
- }
394
+ },
395
+ stepStrictly: Boolean
402
396
  }
403
397
  });
404
398
  // EXTERNAL MODULE: external "./_mixin/emitter"
405
- var emitter_ = __webpack_require__(6);
399
+ var emitter_ = __webpack_require__(12);
406
400
  var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
407
401
 
408
402
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/inputnumber/inputnumber.vue?vue&type=script&lang=js&
@@ -485,9 +479,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
485
479
  if (!this.val) return this.val;
486
480
  return this.precision ? this.__addPercision(this.value) : this.val;
487
481
  },
488
- set: function set(value) {
489
- // console.log(value, 222)
490
- }
482
+ set: function set(value) {}
491
483
  },
492
484
  formatterValue: {
493
485
  get: function get() {
@@ -497,16 +489,22 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
497
489
  return this.precisionValue;
498
490
  }
499
491
  },
500
- set: function set(value) {
501
- // console.log(value, 'sddda')
502
- }
492
+ set: function set(value) {}
503
493
  }
504
494
  },
505
495
  created: function created() {
506
496
  this.resetVal = parseFloat(this.val);
497
+ this.checkCodeValue(this.val, true);
498
+ this.checkInitValue();
507
499
  },
508
500
 
509
501
  methods: {
502
+ checkStepStrictly: function checkStepStrictly() {},
503
+ checkInitValue: function checkInitValue() {
504
+ if (this.val === '') {
505
+ this.val = 0;
506
+ }
507
+ },
510
508
  __toPrecision: function __toPrecision(val) {
511
509
  return this.precision ? this.__percisionToRetain(Math.round(val * Math.pow(10, this.precision)) / Math.pow(10, this.precision)) : val;
512
510
  },
@@ -521,7 +519,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
521
519
  __addPercision: function __addPercision(val) {
522
520
  if (val.indexOf('.') !== -1) {
523
521
  var num = val.length - val.indexOf('.') - 1;
524
- if (num < this.precision) {
522
+ if (num <= this.precision) {
525
523
  return this.__loopRetain(this.precision - num, val);
526
524
  } else {
527
525
  console.error('precision should not be less than the decimal places of step');
@@ -544,7 +542,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
544
542
  this.$emit('blur', this);
545
543
  this.dispatch('MdsFormItem', 'formItemBlur', this.formatterValue);
546
544
  },
547
- checkCodeValue: function checkCodeValue(value) {
545
+ checkCodeValue: function checkCodeValue(value, initFlag) {
548
546
  var reg = /^[+-]?\d+(\.\d+)?$/;
549
547
  var pattern = new RegExp(reg);
550
548
  if (pattern.test(Number(value))) {
@@ -557,11 +555,23 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
557
555
  return;
558
556
  }
559
557
  }
558
+ if (this.stepStrictly) {
559
+ var valueString = value + '';
560
+ var dotPosition = valueString.indexOf('.');
561
+ var precision = 0;
562
+ if (dotPosition !== -1) {
563
+ precision = valueString.length - dotPosition - 1;
564
+ }
565
+ var precisionFactor = Math.pow(10, precision);
566
+ value = Math.round(value / this.step) * precisionFactor * this.step / precisionFactor;
567
+ }
560
568
  if (value >= this.max) value = this.max;
561
569
  if (value <= this.min) value = this.min;
562
570
  this.val = value;
563
- this.$emit('input', value);
564
- this.$emit('change', value);
571
+ if (!initFlag) {
572
+ this.$emit('input', value);
573
+ this.$emit('change', value);
574
+ }
565
575
  },
566
576
  handleChange: function handleChange(e) {
567
577
  this.val = e.target.value.trim();
@@ -579,10 +589,8 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
579
589
  this.resetVal = this.val;
580
590
  }
581
591
  this.dispatch('MdsFormItem', 'formItemChange', this.formatterValue);
582
- // console.log(this.resetVal)
583
592
  },
584
593
  handleInput: function handleInput(value) {
585
- // console.log(value, 'input')
586
594
  this.resetVal = value;
587
595
  },
588
596
  handleDecrease: function handleDecrease() {
@@ -610,10 +618,15 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
610
618
  val: function val(newVal) {
611
619
  this.$emit('input', '' + newVal);
612
620
  },
613
- value: function value(newVal, oldVal) {
614
- if (newVal !== oldVal) {
615
- this.val = newVal;
616
- }
621
+
622
+ value: {
623
+ handler: function handler(newVal, oldVal) {
624
+ if (newVal !== oldVal) {
625
+ this.val = newVal;
626
+ }
627
+ },
628
+
629
+ immediate: true
617
630
  }
618
631
  }
619
632
  });
@@ -657,31 +670,38 @@ inputnumber.install = function (Vue) {
657
670
 
658
671
  /***/ }),
659
672
 
660
- /***/ 131:
673
+ /***/ 12:
661
674
  /***/ (function(module, exports) {
662
675
 
663
- // removed by extract-text-webpack-plugin
676
+ module.exports = __WEBPACK_EXTERNAL_MODULE__12__;
664
677
 
665
678
  /***/ }),
666
679
 
667
- /***/ 171:
680
+ /***/ 139:
668
681
  /***/ (function(module, exports) {
669
682
 
670
683
  // removed by extract-text-webpack-plugin
671
684
 
672
685
  /***/ }),
673
686
 
674
- /***/ 4:
687
+ /***/ 16:
675
688
  /***/ (function(module, exports) {
676
689
 
677
- module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
690
+ module.exports = __WEBPACK_EXTERNAL_MODULE__16__;
691
+
692
+ /***/ }),
693
+
694
+ /***/ 183:
695
+ /***/ (function(module, exports) {
696
+
697
+ // removed by extract-text-webpack-plugin
678
698
 
679
699
  /***/ }),
680
700
 
681
- /***/ 6:
701
+ /***/ 8:
682
702
  /***/ (function(module, exports) {
683
703
 
684
- module.exports = __WEBPACK_EXTERNAL_MODULE__6__;
704
+ module.exports = __WEBPACK_EXTERNAL_MODULE__8__;
685
705
 
686
706
  /***/ })
687
707
 
package/dist/layout.js CHANGED
@@ -7,7 +7,7 @@
7
7
  var a = typeof exports === 'object' ? factory(require("./icon")) : factory(root["./icon"]);
8
8
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
9
  }
10
- })(window, function(__WEBPACK_EXTERNAL_MODULE__4__) {
10
+ })(window, function(__WEBPACK_EXTERNAL_MODULE__8__) {
11
11
  return /******/ (function(modules) { // webpackBootstrap
12
12
  /******/ // The module cache
13
13
  /******/ var installedModules = {};
@@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap
91
91
  /******/
92
92
  /******/
93
93
  /******/ // Load entry module and return exports
94
- /******/ return __webpack_require__(__webpack_require__.s = 85);
94
+ /******/ return __webpack_require__(__webpack_require__.s = 92);
95
95
  /******/ })
96
96
  /************************************************************************/
97
97
  /******/ ({
@@ -203,42 +203,49 @@ function normalizeComponent (
203
203
 
204
204
  /***/ }),
205
205
 
206
- /***/ 1:
206
+ /***/ 139:
207
207
  /***/ (function(module, exports) {
208
208
 
209
- module.exports = require("babel-runtime/helpers/defineProperty");
209
+ // removed by extract-text-webpack-plugin
210
210
 
211
211
  /***/ }),
212
212
 
213
- /***/ 131:
213
+ /***/ 185:
214
214
  /***/ (function(module, exports) {
215
215
 
216
216
  // removed by extract-text-webpack-plugin
217
217
 
218
218
  /***/ }),
219
219
 
220
- /***/ 173:
220
+ /***/ 3:
221
221
  /***/ (function(module, exports) {
222
222
 
223
- // removed by extract-text-webpack-plugin
223
+ module.exports = require("babel-runtime/helpers/defineProperty");
224
224
 
225
225
  /***/ }),
226
226
 
227
- /***/ 4:
227
+ /***/ 37:
228
228
  /***/ (function(module, exports) {
229
229
 
230
- module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
230
+ module.exports = require("lodash.debounce");
231
231
 
232
232
  /***/ }),
233
233
 
234
- /***/ 45:
234
+ /***/ 6:
235
235
  /***/ (function(module, exports) {
236
236
 
237
- module.exports = require("lodash.debounce");
237
+ module.exports = require("babel-runtime/core-js/object/assign");
238
+
239
+ /***/ }),
240
+
241
+ /***/ 8:
242
+ /***/ (function(module, exports) {
243
+
244
+ module.exports = __WEBPACK_EXTERNAL_MODULE__8__;
238
245
 
239
246
  /***/ }),
240
247
 
241
- /***/ 85:
248
+ /***/ 92:
242
249
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
243
250
 
244
251
  "use strict";
@@ -246,10 +253,10 @@ module.exports = require("lodash.debounce");
246
253
  __webpack_require__.r(__webpack_exports__);
247
254
 
248
255
  // EXTERNAL MODULE: ./components/style/index.less
249
- var style = __webpack_require__(131);
256
+ var style = __webpack_require__(139);
250
257
 
251
258
  // EXTERNAL MODULE: ./components/layout/style/index.less
252
- var layout_style = __webpack_require__(173);
259
+ var layout_style = __webpack_require__(185);
253
260
 
254
261
  // CONCATENATED MODULE: ./components/layout/style/index.js
255
262
 
@@ -386,19 +393,19 @@ sidervue_type_template_id_26701691_render._withStripped = true
386
393
  // CONCATENATED MODULE: ./components/layout/sider.vue?vue&type=template&id=26701691&
387
394
 
388
395
  // EXTERNAL MODULE: external "babel-runtime/core-js/object/assign"
389
- var assign_ = __webpack_require__(9);
396
+ var assign_ = __webpack_require__(6);
390
397
  var assign_default = /*#__PURE__*/__webpack_require__.n(assign_);
391
398
 
392
399
  // EXTERNAL MODULE: external "babel-runtime/helpers/defineProperty"
393
- var defineProperty_ = __webpack_require__(1);
400
+ var defineProperty_ = __webpack_require__(3);
394
401
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_);
395
402
 
396
403
  // EXTERNAL MODULE: external "./icon"
397
- var external_icon_ = __webpack_require__(4);
404
+ var external_icon_ = __webpack_require__(8);
398
405
  var external_icon_default = /*#__PURE__*/__webpack_require__.n(external_icon_);
399
406
 
400
407
  // EXTERNAL MODULE: external "lodash.debounce"
401
- var external_lodash_debounce_ = __webpack_require__(45);
408
+ var external_lodash_debounce_ = __webpack_require__(37);
402
409
  var external_lodash_debounce_default = /*#__PURE__*/__webpack_require__.n(external_lodash_debounce_);
403
410
 
404
411
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/layout/sider.vue?vue&type=script&lang=js&
@@ -773,13 +780,6 @@ layout.install = function (Vue) {
773
780
  };
774
781
  /* harmony default export */ var components_layout = __webpack_exports__["default"] = (layout);
775
782
 
776
- /***/ }),
777
-
778
- /***/ 9:
779
- /***/ (function(module, exports) {
780
-
781
- module.exports = require("babel-runtime/core-js/object/assign");
782
-
783
783
  /***/ })
784
784
 
785
785
  /******/ });