@mdsfe/mds-ui 0.2.0 → 0.2.9-rc.1

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/CHANGELOG.md +178 -0
  2. package/README.md +9 -9
  3. package/dist/_mixin/popper.js +1 -0
  4. package/dist/_util/_popper/dom-helper.js +284 -0
  5. package/dist/_util/_popper/popper-mixin.js +35 -0
  6. package/dist/_util/_popper/popper.js +1267 -0
  7. package/dist/_util/_popper/popup/popup-main.js +224 -0
  8. package/dist/_util/_popper/popup/popup-manager.js +205 -0
  9. package/dist/_util/_popper/vue-popper.js +204 -0
  10. package/dist/_util/popup/index.js +1 -1
  11. package/dist/_util/tree/node.js +2 -0
  12. package/dist/_util/tree/tree.js +65 -21
  13. package/dist/_util/util.js +29 -1
  14. package/dist/affix.js +18 -18
  15. package/dist/anchor.js +18 -18
  16. package/dist/avatar.js +17 -17
  17. package/dist/backtop.js +19 -19
  18. package/dist/badge.js +21 -21
  19. package/dist/bordershadow.js +20 -9
  20. package/dist/breadcrumb.js +18 -18
  21. package/dist/button.js +21 -21
  22. package/dist/card.js +18 -18
  23. package/dist/carousel.js +76 -76
  24. package/dist/cascader.js +4980 -0
  25. package/dist/cascaderpanel.js +645 -603
  26. package/dist/checkbox.js +23 -23
  27. package/dist/col.js +14 -14
  28. package/dist/collapse.js +6 -6
  29. package/dist/color.js +6 -6
  30. package/dist/datepicker.js +2487 -266
  31. package/dist/divider.js +19 -19
  32. package/dist/drawer.js +787 -37
  33. package/dist/dropdown.js +150 -104
  34. package/dist/empty.js +19 -19
  35. package/dist/font/iconfont.28359fa.ttf +0 -0
  36. package/dist/font/iconfont.486e3d3.woff2 +0 -0
  37. package/dist/font/iconfont.675049e.woff +0 -0
  38. package/dist/font.js +6 -6
  39. package/dist/form.js +28 -26
  40. package/dist/icon.js +55 -47
  41. package/dist/index.js +1 -1
  42. package/dist/input.js +65 -49
  43. package/dist/inputnumber.js +59 -39
  44. package/dist/layout.js +25 -25
  45. package/dist/list.js +17 -17
  46. package/dist/loading.js +21 -8
  47. package/dist/mds-ui.min.css +3 -3
  48. package/dist/mds-ui.min.js +19183 -15407
  49. package/dist/menu.js +31 -31
  50. package/dist/message.js +773 -24
  51. package/dist/modal.js +1146 -307
  52. package/dist/notification.js +27 -27
  53. package/dist/pagination.js +78 -55
  54. package/dist/popconfirm.js +36 -36
  55. package/dist/popover.js +2778 -48
  56. package/dist/progress.js +107 -65
  57. package/dist/radio.js +56 -54
  58. package/dist/rate.js +67 -59
  59. package/dist/row.js +14 -14
  60. package/dist/select.js +847 -503
  61. package/dist/slider.js +25 -25
  62. package/dist/slottable.js +2663 -129
  63. package/dist/steps.js +18 -18
  64. package/dist/style/affix.css +224 -2
  65. package/dist/style/anchor.css +224 -2
  66. package/dist/style/avatar.css +224 -2
  67. package/dist/style/badge.css +224 -2
  68. package/dist/style/bordershadow.css +236 -59
  69. package/dist/style/breadcrumb.css +224 -2
  70. package/dist/style/button.css +234 -5
  71. package/dist/style/card.css +224 -2
  72. package/dist/style/carousel.css +224 -2
  73. package/dist/style/cascader.css +214 -0
  74. package/dist/style/cascaderpanel.css +13 -16
  75. package/dist/style/checkbox.css +230 -8
  76. package/dist/style/col.css +225 -3
  77. package/dist/style/collapse.css +224 -2
  78. package/dist/style/color.css +224 -2
  79. package/dist/style/datepicker.css +236 -2
  80. package/dist/style/divider.css +227 -2
  81. package/dist/style/drawer.css +224 -2
  82. package/dist/style/dropdown.css +234 -5
  83. package/dist/style/empty.css +224 -2
  84. package/dist/style/font.css +226 -4
  85. package/dist/style/form.css +224 -2
  86. package/dist/style/icon.css +226 -3
  87. package/dist/style/input.css +231 -5
  88. package/dist/style/inputnumber.css +224 -2
  89. package/dist/style/layout.css +224 -2
  90. package/dist/style/list.css +224 -2
  91. package/dist/style/loading.css +2527 -2
  92. package/dist/style/menu.css +340 -129
  93. package/dist/style/message.css +1 -4
  94. package/dist/style/modal.css +247 -25
  95. package/dist/style/notification.css +224 -2
  96. package/dist/style/pagination.css +236 -7
  97. package/dist/style/popconfirm.css +334 -180
  98. package/dist/style/popover.css +324 -177
  99. package/dist/style/progress.css +226 -3
  100. package/dist/style/radio.css +225 -3
  101. package/dist/style/rate.css +226 -3
  102. package/dist/style/row.css +225 -3
  103. package/dist/style/select.css +240 -12
  104. package/dist/style/slider.css +224 -2
  105. package/dist/style/slottable.css +350 -149
  106. package/dist/style/steps.css +224 -2
  107. package/dist/style/switch.css +224 -2
  108. package/dist/style/table.css +458 -314
  109. package/dist/style/tabs.css +225 -18
  110. package/dist/style/tag.css +224 -2
  111. package/dist/style/text.css +224 -2
  112. package/dist/style/timeline.css +224 -2
  113. package/dist/style/timepicker.css +231 -6
  114. package/dist/style/tooltip.css +340 -129
  115. package/dist/style/tree.css +228 -6
  116. package/dist/style/typography.css +224 -2
  117. package/dist/style/upload.css +224 -2
  118. package/dist/switch.js +20 -20
  119. package/dist/table.js +3071 -201
  120. package/dist/tabs.js +24 -22
  121. package/dist/tag.js +17 -23
  122. package/dist/text.js +38 -22
  123. package/dist/timeline.js +14 -14
  124. package/dist/timepicker.js +3063 -172
  125. package/dist/tooltip.js +2550 -27
  126. package/dist/transfer.js +28 -28
  127. package/dist/transition.js +6 -6
  128. package/dist/tree.js +316 -171
  129. package/dist/typography.js +6 -6
  130. package/dist/upload.js +46 -38
  131. package/package.json +9 -5
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: {
@@ -397,8 +389,14 @@ var SIZEMAP = {
397
389
  type: 'line-close-circle'
398
390
  },
399
391
  'class': this.prefixCls + '-clearable',
392
+ key: this.prefixCls + '-clearable-key',
400
393
  nativeOn: {
401
- click: this.clear
394
+ click: function click(e) {
395
+ if (e.target.className.includes('search')) {
396
+ return;
397
+ }
398
+ _this.clear(e);
399
+ }
402
400
  }
403
401
  });
404
402
  var renderLabeledInput = function renderLabeledInput(children) {
@@ -424,7 +422,7 @@ var SIZEMAP = {
424
422
  return children;
425
423
  }
426
424
 
427
- var limit = h('span', { 'class': _this.prefixCls + '-showLimit' }, [_this.value.length + '/' + _this.maxlength]);
425
+ var limit = h('span', { 'class': _this.prefixCls + '-showLimit' }, [(_this.value ? _this.value.length : 0) + '/' + _this.maxlength]);
428
426
 
429
427
  var prefix = h('span', { 'class': _this.prefixCls + '-prefix' }, [_this.$slots.prefix || _this.prefix]);
430
428
  var suffix = h('span', { 'class': _this.prefixCls + '-suffix' }, [_this.showClear ? clearBtn : null, _this.showLimitText ? limit : null, _this.$slots.suffix || _this.suffix]);
@@ -517,7 +515,7 @@ var SIZEMAP = {
517
515
  this.$emit('click', e);
518
516
  },
519
517
  handleChange: function handleChange(e) {
520
- this.$emit('change', e.target.value);
518
+ this.$emit('change', e);
521
519
  }
522
520
  }
523
521
  });
@@ -550,7 +548,7 @@ if (false) { var api; }
550
548
  component.options.__file = "components/input/input.vue"
551
549
  /* harmony default export */ var input = (component.exports);
552
550
  // EXTERNAL MODULE: external "./button"
553
- var external_button_ = __webpack_require__(7);
551
+ var external_button_ = __webpack_require__(13);
554
552
  var external_button_default = /*#__PURE__*/__webpack_require__.n(external_button_);
555
553
 
556
554
  // 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 +622,6 @@ var BUTTONSIZE = {
624
622
  type: {
625
623
  type: String
626
624
  },
627
- maxlength: {
628
- type: Number
629
- },
630
- minlength: {
631
- type: Number
632
- },
633
625
  value: null
634
626
  },
635
627
  render: function render(h) {
@@ -668,6 +660,7 @@ var BUTTONSIZE = {
668
660
  }
669
661
  return h(input, {
670
662
  props: this.$props,
663
+ attrs: this.$attrs,
671
664
  'class': 'mds-input-search',
672
665
  on: {
673
666
  input: function input(value) {
@@ -706,7 +699,7 @@ if (false) { var search_api; }
706
699
  search_component.options.__file = "components/input/search.vue"
707
700
  /* harmony default export */ var search = (search_component.exports);
708
701
  // EXTERNAL MODULE: ./components/input/textarea.vue + 5 modules
709
- var input_textarea = __webpack_require__(41);
702
+ var input_textarea = __webpack_require__(47);
710
703
 
711
704
  // 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
705
  var groupvue_type_template_id_9e2c1de2_render = function () {
@@ -809,35 +802,42 @@ input.install = function (Vue) {
809
802
 
810
803
  /***/ }),
811
804
 
812
- /***/ 131:
805
+ /***/ 12:
813
806
  /***/ (function(module, exports) {
814
807
 
815
- // removed by extract-text-webpack-plugin
808
+ module.exports = __WEBPACK_EXTERNAL_MODULE__12__;
809
+
810
+ /***/ }),
811
+
812
+ /***/ 13:
813
+ /***/ (function(module, exports) {
814
+
815
+ module.exports = __WEBPACK_EXTERNAL_MODULE__13__;
816
816
 
817
817
  /***/ }),
818
818
 
819
- /***/ 169:
819
+ /***/ 139:
820
820
  /***/ (function(module, exports) {
821
821
 
822
822
  // removed by extract-text-webpack-plugin
823
823
 
824
824
  /***/ }),
825
825
 
826
- /***/ 3:
826
+ /***/ 181:
827
827
  /***/ (function(module, exports) {
828
828
 
829
- module.exports = __WEBPACK_EXTERNAL_MODULE__3__;
829
+ // removed by extract-text-webpack-plugin
830
830
 
831
831
  /***/ }),
832
832
 
833
- /***/ 4:
833
+ /***/ 3:
834
834
  /***/ (function(module, exports) {
835
835
 
836
- module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
836
+ module.exports = require("babel-runtime/helpers/defineProperty");
837
837
 
838
838
  /***/ }),
839
839
 
840
- /***/ 41:
840
+ /***/ 47:
841
841
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
842
842
 
843
843
  "use strict";
@@ -861,7 +861,10 @@ var render = function () {
861
861
  },
862
862
  ],
863
863
  ref: "textAreaRef",
864
- class: _vm.prefixCls + " " + _vm.prefixCls + "-textarea",
864
+ class: [
865
+ _vm.prefixCls + " " + _vm.prefixCls + "-textarea",
866
+ _vm.disabled ? "mds-input-disabled" : "",
867
+ ],
865
868
  style: _vm.textareaStyles,
866
869
  attrs: {
867
870
  maxlength: _vm.max_length,
@@ -1025,7 +1028,7 @@ function calculateNodeHeight(uiTextNode) {
1025
1028
  return { height: height + 'px', minHeight: minHeight + 'px', maxHeight: maxHeight + 'px', overflowY: overflowY };
1026
1029
  }
1027
1030
  // EXTERNAL MODULE: external "./_mixin/emitter"
1028
- var emitter_ = __webpack_require__(6);
1031
+ var emitter_ = __webpack_require__(12);
1029
1032
  var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1030
1033
 
1031
1034
  // 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 +1054,11 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1051
1054
  //
1052
1055
  //
1053
1056
  //
1057
+ //
1058
+ //
1059
+ //
1060
+ //
1061
+ //
1054
1062
 
1055
1063
 
1056
1064
 
@@ -1130,11 +1138,19 @@ function clearNextFrameAction(nextFrameId) {
1130
1138
  }
1131
1139
  },
1132
1140
  watch: {
1133
- valueData: function valueData(newVal) {
1134
- if (newVal.length > this.maxlength) {
1135
- return false;
1136
- } else {
1137
- this.number = newVal.length;
1141
+ valueData: {
1142
+ immediate: true,
1143
+ handler: function handler(newVal) {
1144
+ var _this = this;
1145
+
1146
+ this.$nextTick(function () {
1147
+ _this.resizeTextarea();
1148
+ });
1149
+ if (newVal.length > this.maxlength) {
1150
+ return false;
1151
+ } else {
1152
+ this.number = newVal.length;
1153
+ }
1138
1154
  }
1139
1155
  }
1140
1156
  },
@@ -1220,30 +1236,30 @@ component.options.__file = "components/input/textarea.vue"
1220
1236
 
1221
1237
  /***/ }),
1222
1238
 
1223
- /***/ 54:
1239
+ /***/ 59:
1224
1240
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1225
1241
 
1226
1242
  "use strict";
1227
- /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(131);
1243
+ /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(139);
1228
1244
  /* 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);
1245
+ /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(181);
1230
1246
  /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
1231
1247
 
1232
1248
 
1233
1249
 
1234
1250
  /***/ }),
1235
1251
 
1236
- /***/ 6:
1252
+ /***/ 7:
1237
1253
  /***/ (function(module, exports) {
1238
1254
 
1239
- module.exports = __WEBPACK_EXTERNAL_MODULE__6__;
1255
+ module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
1240
1256
 
1241
1257
  /***/ }),
1242
1258
 
1243
- /***/ 7:
1259
+ /***/ 8:
1244
1260
  /***/ (function(module, exports) {
1245
1261
 
1246
- module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
1262
+ module.exports = __WEBPACK_EXTERNAL_MODULE__8__;
1247
1263
 
1248
1264
  /***/ })
1249
1265
 
@@ -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
  /******/ });