cy-element-ui 1.0.74 → 1.0.76
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/element-ui.common.js +23 -16
- package/lib/empty.js +2 -2
- package/lib/form-item.js +46 -39
- package/lib/image.js +2 -2
- package/lib/index.js +1 -1
- package/lib/skeleton-item.js +2 -2
- package/lib/transfer.js +24 -24
- package/package.json +1 -1
- package/packages/form/src/label-wrap.vue +82 -78
- package/src/index.js +3 -3
package/lib/skeleton-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 =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 72);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -192,7 +192,7 @@ function normalizeComponent(
|
|
|
192
192
|
|
|
193
193
|
/***/ }),
|
|
194
194
|
|
|
195
|
-
/***/
|
|
195
|
+
/***/ 72:
|
|
196
196
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
197
197
|
|
|
198
198
|
"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 =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 70);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -2220,7 +2220,29 @@ function _broadcast(componentName, eventName, params) {
|
|
|
2220
2220
|
|
|
2221
2221
|
/***/ }),
|
|
2222
2222
|
|
|
2223
|
-
/***/
|
|
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:
|
|
2224
2246
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2225
2247
|
|
|
2226
2248
|
"use strict";
|
|
@@ -2971,28 +2993,6 @@ main.install = function (Vue) {
|
|
|
2971
2993
|
|
|
2972
2994
|
/* harmony default export */ var transfer = __webpack_exports__["default"] = (main);
|
|
2973
2995
|
|
|
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,78 +1,82 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
this.updateLabelWidth('update');
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.updateLabelWidth('
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
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>
|
package/src/index.js
CHANGED
|
@@ -94,8 +94,8 @@ import SubTitle from '../packages/subTitle/index.js';
|
|
|
94
94
|
import TabDialog from '../packages/tabDialog/index.js';
|
|
95
95
|
import FileUpload from '../packages/fileUpload/index.js';
|
|
96
96
|
import SelectDisplayInput from '../packages/selectDisplayInput/index.js';
|
|
97
|
-
import locale from '
|
|
98
|
-
import CollapseTransition from '
|
|
97
|
+
import locale from './locale';
|
|
98
|
+
import CollapseTransition from './transitions/collapse-transition';
|
|
99
99
|
|
|
100
100
|
const components = [
|
|
101
101
|
Pagination,
|
|
@@ -221,7 +221,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
export default {
|
|
224
|
-
version: '1.0.
|
|
224
|
+
version: '1.0.76',
|
|
225
225
|
locale: locale.use,
|
|
226
226
|
i18n: locale.i18n,
|
|
227
227
|
install,
|