cy-element-ui 1.0.76 → 1.0.78

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.
package/lib/loading.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 74);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 73);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -463,7 +463,7 @@ function normalizeComponent(
463
463
 
464
464
  /***/ }),
465
465
 
466
- /***/ 74:
466
+ /***/ 73:
467
467
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
468
468
 
469
469
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 87);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 86);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -192,7 +192,7 @@ function normalizeComponent(
192
192
 
193
193
  /***/ }),
194
194
 
195
- /***/ 87:
195
+ /***/ 86:
196
196
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
197
 
198
198
  "use strict";
package/lib/menu-item.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 86);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 85);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -2703,7 +2703,7 @@ var scrollBarWidth = void 0;
2703
2703
 
2704
2704
  /***/ }),
2705
2705
 
2706
- /***/ 86:
2706
+ /***/ 85:
2707
2707
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2708
2708
 
2709
2709
  "use strict";
package/lib/menu.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 79);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 78);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -1027,7 +1027,7 @@ function _broadcast(componentName, eventName, params) {
1027
1027
 
1028
1028
  /***/ }),
1029
1029
 
1030
- /***/ 79:
1030
+ /***/ 78:
1031
1031
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1032
1032
 
1033
1033
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 77);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 76);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -2153,7 +2153,7 @@ function _broadcast(componentName, eventName, params) {
2153
2153
 
2154
2154
  /***/ }),
2155
2155
 
2156
- /***/ 77:
2156
+ /***/ 76:
2157
2157
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2158
2158
 
2159
2159
  "use strict";
package/lib/message.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 83);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 82);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -861,7 +861,7 @@ var scrollBarWidth = void 0;
861
861
 
862
862
  /***/ }),
863
863
 
864
- /***/ 83:
864
+ /***/ 82:
865
865
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
866
866
 
867
867
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 82);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 81);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -861,7 +861,7 @@ var scrollBarWidth = void 0;
861
861
 
862
862
  /***/ }),
863
863
 
864
- /***/ 82:
864
+ /***/ 81:
865
865
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
866
866
 
867
867
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 92);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 91);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -232,7 +232,7 @@ function _broadcast(componentName, eventName, params) {
232
232
 
233
233
  /***/ }),
234
234
 
235
- /***/ 92:
235
+ /***/ 91:
236
236
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
237
237
 
238
238
  "use strict";
package/lib/pagination.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 78);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 77);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ([
@@ -6170,8 +6170,7 @@ src_select.install = function (Vue) {
6170
6170
  /* 74 */,
6171
6171
  /* 75 */,
6172
6172
  /* 76 */,
6173
- /* 77 */,
6174
- /* 78 */
6173
+ /* 77 */
6175
6174
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
6176
6175
 
6177
6176
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 89);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 88);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -232,7 +232,7 @@ function _broadcast(componentName, eventName, params) {
232
232
 
233
233
  /***/ }),
234
234
 
235
- /***/ 89:
235
+ /***/ 88:
236
236
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
237
237
 
238
238
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 88);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 87);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -232,7 +232,7 @@ function _broadcast(componentName, eventName, params) {
232
232
 
233
233
  /***/ }),
234
234
 
235
- /***/ 88:
235
+ /***/ 87:
236
236
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
237
237
 
238
238
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 72);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 71);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -192,7 +192,7 @@ function normalizeComponent(
192
192
 
193
193
  /***/ }),
194
194
 
195
- /***/ 72:
195
+ /***/ 71:
196
196
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
197
 
198
198
  "use strict";
package/lib/switch.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 91);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 90);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -671,7 +671,7 @@ function _broadcast(componentName, eventName, params) {
671
671
 
672
672
  /***/ }),
673
673
 
674
- /***/ 91:
674
+ /***/ 90:
675
675
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
676
676
 
677
677
  "use strict";
package/lib/tabDialog.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 76);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 75);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -1258,7 +1258,7 @@ function _broadcast(componentName, eventName, params) {
1258
1258
 
1259
1259
  /***/ }),
1260
1260
 
1261
- /***/ 76:
1261
+ /***/ 75:
1262
1262
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1263
1263
 
1264
1264
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 81);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 80);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ([
@@ -5305,7 +5305,7 @@ var component = Object(componentNormalizer["a" /* default */])(
5305
5305
 
5306
5306
  "use strict";
5307
5307
 
5308
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=d9910d56
5308
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=0642cc1d
5309
5309
  var render = function render() {
5310
5310
  var _vm = this,
5311
5311
  _c = _vm._self._c
@@ -5482,7 +5482,7 @@ var staticRenderFns = []
5482
5482
  render._withStripped = true
5483
5483
 
5484
5484
 
5485
- // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=d9910d56
5485
+ // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=0642cc1d
5486
5486
 
5487
5487
  // EXTERNAL MODULE: external "vue"
5488
5488
  var external_vue_ = __webpack_require__(0);
@@ -5942,7 +5942,7 @@ var validator = function validator(val) {
5942
5942
  } else if (formattedValue) {
5943
5943
  return this.type === 'dates' || this.type === 'years' || this.type === 'months' ? formattedValue.join(', ') : formattedValue;
5944
5944
  } else {
5945
- return '';
5945
+ return this.ranged ? ['', ''] : '';
5946
5946
  }
5947
5947
  },
5948
5948
  parsedValue: function parsedValue() {
@@ -7002,8 +7002,7 @@ var component = Object(componentNormalizer["a" /* default */])(
7002
7002
  /* 77 */,
7003
7003
  /* 78 */,
7004
7004
  /* 79 */,
7005
- /* 80 */,
7006
- /* 81 */
7005
+ /* 80 */
7007
7006
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7008
7007
 
7009
7008
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 80);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 79);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ([
@@ -4999,7 +4999,7 @@ function scrollIntoView(container, selected) {
4999
4999
 
5000
5000
  "use strict";
5001
5001
 
5002
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=d9910d56
5002
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=0642cc1d
5003
5003
  var render = function render() {
5004
5004
  var _vm = this,
5005
5005
  _c = _vm._self._c
@@ -5176,7 +5176,7 @@ var staticRenderFns = []
5176
5176
  render._withStripped = true
5177
5177
 
5178
5178
 
5179
- // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=d9910d56
5179
+ // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=0642cc1d
5180
5180
 
5181
5181
  // EXTERNAL MODULE: external "vue"
5182
5182
  var external_vue_ = __webpack_require__(0);
@@ -5636,7 +5636,7 @@ var validator = function validator(val) {
5636
5636
  } else if (formattedValue) {
5637
5637
  return this.type === 'dates' || this.type === 'years' || this.type === 'months' ? formattedValue.join(', ') : formattedValue;
5638
5638
  } else {
5639
- return '';
5639
+ return this.ranged ? ['', ''] : '';
5640
5640
  }
5641
5641
  },
5642
5642
  parsedValue: function parsedValue() {
@@ -6103,8 +6103,7 @@ var component = Object(componentNormalizer["a" /* default */])(
6103
6103
  /* 76 */,
6104
6104
  /* 77 */,
6105
6105
  /* 78 */,
6106
- /* 79 */,
6107
- /* 80 */
6106
+ /* 79 */
6108
6107
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
6109
6108
 
6110
6109
  "use strict";
package/lib/transfer.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 70);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 69);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -2220,29 +2220,7 @@ function _broadcast(componentName, eventName, params) {
2220
2220
 
2221
2221
  /***/ }),
2222
2222
 
2223
- /***/ 7:
2224
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2225
-
2226
- "use strict";
2227
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
2228
- for (var i = 1, j = arguments.length; i < j; i++) {
2229
- var source = arguments[i] || {};
2230
- for (var prop in source) {
2231
- if (source.hasOwnProperty(prop)) {
2232
- var value = source[prop];
2233
- if (value !== undefined) {
2234
- target[prop] = value;
2235
- }
2236
- }
2237
- }
2238
- }
2239
-
2240
- return target;
2241
- });;
2242
-
2243
- /***/ }),
2244
-
2245
- /***/ 70:
2223
+ /***/ 69:
2246
2224
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2247
2225
 
2248
2226
  "use strict";
@@ -2993,6 +2971,28 @@ main.install = function (Vue) {
2993
2971
 
2994
2972
  /* harmony default export */ var transfer = __webpack_exports__["default"] = (main);
2995
2973
 
2974
+ /***/ }),
2975
+
2976
+ /***/ 7:
2977
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2978
+
2979
+ "use strict";
2980
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
2981
+ for (var i = 1, j = arguments.length; i < j; i++) {
2982
+ var source = arguments[i] || {};
2983
+ for (var prop in source) {
2984
+ if (source.hasOwnProperty(prop)) {
2985
+ var value = source[prop];
2986
+ if (value !== undefined) {
2987
+ target[prop] = value;
2988
+ }
2989
+ }
2990
+ }
2991
+ }
2992
+
2993
+ return target;
2994
+ });;
2995
+
2996
2996
  /***/ })
2997
2997
 
2998
2998
  /******/ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cy-element-ui",
3
- "version": "1.0.76",
3
+ "version": "1.0.78",
4
4
  "description": "基于ElementUI开发的组件",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -542,7 +542,7 @@ export default {
542
542
  ? formattedValue.join(', ')
543
543
  : formattedValue;
544
544
  } else {
545
- return '';
545
+ return this.ranged ? ['', ''] : '';
546
546
  }
547
547
  },
548
548
 
@@ -43,7 +43,86 @@
43
43
  import emitter from '../../../src/mixins/emitter';
44
44
  import objectAssign from '../../../src/utils/merge';
45
45
  import { noop, getPropByPath } from '../../../src/utils/util';
46
- import LabelWrap from './label-wrap';
46
+
47
+ const LabelWrap = {
48
+ props: {
49
+ isAutoWidth: Boolean,
50
+ updateAll: Boolean
51
+ },
52
+
53
+ inject: ['elForm', 'elFormItem'],
54
+
55
+ render: function(h) {
56
+ var slots = this.$slots.default;
57
+ if (!slots) return null;
58
+ if (this.isAutoWidth) {
59
+ var autoLabelWidth = this.elForm.autoLabelWidth;
60
+ var style = {};
61
+ if (autoLabelWidth && autoLabelWidth !== 'auto') {
62
+ var marginLeft = parseInt(autoLabelWidth, 10) - this.computedWidth;
63
+ if (marginLeft) {
64
+ style.marginLeft = marginLeft + 'px';
65
+ }
66
+ }
67
+ return h(
68
+ 'div',
69
+ { 'class': 'el-form-item__label-wrap', style: style },
70
+ [slots]
71
+ );
72
+ } else {
73
+ return slots[0];
74
+ }
75
+ },
76
+
77
+ methods: {
78
+ getLabelWidth: function() {
79
+ if (this.$el && this.$el.firstElementChild) {
80
+ var computedWidth = window.getComputedStyle(this.$el.firstElementChild).width;
81
+ return Math.ceil(parseFloat(computedWidth));
82
+ } else {
83
+ return 0;
84
+ }
85
+ },
86
+ updateLabelWidth: function(action) {
87
+ action = action || 'update';
88
+ if (this.$slots.default && this.isAutoWidth && this.$el.firstElementChild) {
89
+ if (action === 'update') {
90
+ this.computedWidth = this.getLabelWidth();
91
+ } else if (action === 'remove') {
92
+ this.elForm.deregisterLabelWidth(this.computedWidth);
93
+ }
94
+ }
95
+ }
96
+ },
97
+
98
+ watch: {
99
+ computedWidth: function(val, oldVal) {
100
+ if (this.updateAll) {
101
+ this.elForm.registerLabelWidth(val, oldVal);
102
+ this.elFormItem.updateComputedLabelWidth(val);
103
+ }
104
+ }
105
+ },
106
+
107
+ data: function() {
108
+ return {
109
+ computedWidth: 0
110
+ };
111
+ },
112
+
113
+ mounted: function() {
114
+ this.updateLabelWidth('update');
115
+ },
116
+
117
+ updated: function() {
118
+ this.updateLabelWidth('update');
119
+ },
120
+
121
+ beforeDestroy: function() {
122
+ this.updateLabelWidth('remove');
123
+ }
124
+ };
125
+
47
126
  export default {
48
127
  name: 'ElFormItem',
49
128
 
package/src/index.js CHANGED
@@ -221,7 +221,7 @@ if (typeof window !== 'undefined' && window.Vue) {
221
221
  }
222
222
 
223
223
  export default {
224
- version: '1.0.76',
224
+ version: '1.0.78',
225
225
  locale: locale.use,
226
226
  i18n: locale.i18n,
227
227
  install,
@@ -1,82 +0,0 @@
1
- <template></template>
2
- <script>
3
-
4
- export default {
5
- props: {
6
- isAutoWidth: Boolean,
7
- updateAll: Boolean
8
- },
9
-
10
- inject: ['elForm', 'elFormItem'],
11
-
12
- render: function(h) {
13
- var slots = this.$slots.default;
14
- if (!slots) return null;
15
- if (this.isAutoWidth) {
16
- var autoLabelWidth = this.elForm.autoLabelWidth;
17
- var style = {};
18
- if (autoLabelWidth && autoLabelWidth !== 'auto') {
19
- var marginLeft = parseInt(autoLabelWidth, 10) - this.computedWidth;
20
- if (marginLeft) {
21
- style.marginLeft = marginLeft + 'px';
22
- }
23
- }
24
- return h(
25
- 'div',
26
- { 'class': 'el-form-item__label-wrap', style: style },
27
- [slots]
28
- );
29
- } else {
30
- return slots[0];
31
- }
32
- },
33
-
34
- methods: {
35
- getLabelWidth: function() {
36
- if (this.$el && this.$el.firstElementChild) {
37
- var computedWidth = window.getComputedStyle(this.$el.firstElementChild).width;
38
- return Math.ceil(parseFloat(computedWidth));
39
- } else {
40
- return 0;
41
- }
42
- },
43
- updateLabelWidth: function(action) {
44
- action = action || 'update';
45
- if (this.$slots.default && this.isAutoWidth && this.$el.firstElementChild) {
46
- if (action === 'update') {
47
- this.computedWidth = this.getLabelWidth();
48
- } else if (action === 'remove') {
49
- this.elForm.deregisterLabelWidth(this.computedWidth);
50
- }
51
- }
52
- }
53
- },
54
-
55
- watch: {
56
- computedWidth: function(val, oldVal) {
57
- if (this.updateAll) {
58
- this.elForm.registerLabelWidth(val, oldVal);
59
- this.elFormItem.updateComputedLabelWidth(val);
60
- }
61
- }
62
- },
63
-
64
- data: function() {
65
- return {
66
- computedWidth: 0
67
- };
68
- },
69
-
70
- mounted: function() {
71
- this.updateLabelWidth('update');
72
- },
73
-
74
- updated: function() {
75
- this.updateLabelWidth('update');
76
- },
77
-
78
- beforeDestroy: function() {
79
- this.updateLabelWidth('remove');
80
- }
81
- };
82
- </script>