cy-element-ui 1.0.76 → 1.0.77

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
  /******/ ([
@@ -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
  /******/ ([
@@ -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.77",
4
4
  "description": "基于ElementUI开发的组件",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -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
 
@@ -1,4 +1,3 @@
1
- <template></template>
2
1
  <script>
3
2
 
4
3
  export default {
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.77',
225
225
  locale: locale.use,
226
226
  i18n: locale.i18n,
227
227
  install,