cy-element-ui 1.0.77 → 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.
@@ -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() {
@@ -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() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cy-element-ui",
3
- "version": "1.0.77",
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
 
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.77',
224
+ version: '1.0.78',
225
225
  locale: locale.use,
226
226
  i18n: locale.i18n,
227
227
  install,
@@ -1,81 +0,0 @@
1
- <script>
2
-
3
- export default {
4
- props: {
5
- isAutoWidth: Boolean,
6
- updateAll: Boolean
7
- },
8
-
9
- inject: ['elForm', 'elFormItem'],
10
-
11
- render: function(h) {
12
- var slots = this.$slots.default;
13
- if (!slots) return null;
14
- if (this.isAutoWidth) {
15
- var autoLabelWidth = this.elForm.autoLabelWidth;
16
- var style = {};
17
- if (autoLabelWidth && autoLabelWidth !== 'auto') {
18
- var marginLeft = parseInt(autoLabelWidth, 10) - this.computedWidth;
19
- if (marginLeft) {
20
- style.marginLeft = marginLeft + 'px';
21
- }
22
- }
23
- return h(
24
- 'div',
25
- { 'class': 'el-form-item__label-wrap', style: style },
26
- [slots]
27
- );
28
- } else {
29
- return slots[0];
30
- }
31
- },
32
-
33
- methods: {
34
- getLabelWidth: function() {
35
- if (this.$el && this.$el.firstElementChild) {
36
- var computedWidth = window.getComputedStyle(this.$el.firstElementChild).width;
37
- return Math.ceil(parseFloat(computedWidth));
38
- } else {
39
- return 0;
40
- }
41
- },
42
- updateLabelWidth: function(action) {
43
- action = action || 'update';
44
- if (this.$slots.default && this.isAutoWidth && this.$el.firstElementChild) {
45
- if (action === 'update') {
46
- this.computedWidth = this.getLabelWidth();
47
- } else if (action === 'remove') {
48
- this.elForm.deregisterLabelWidth(this.computedWidth);
49
- }
50
- }
51
- }
52
- },
53
-
54
- watch: {
55
- computedWidth: function(val, oldVal) {
56
- if (this.updateAll) {
57
- this.elForm.registerLabelWidth(val, oldVal);
58
- this.elFormItem.updateComputedLabelWidth(val);
59
- }
60
- }
61
- },
62
-
63
- data: function() {
64
- return {
65
- computedWidth: 0
66
- };
67
- },
68
-
69
- mounted: function() {
70
- this.updateLabelWidth('update');
71
- },
72
-
73
- updated: function() {
74
- this.updateLabelWidth('update');
75
- },
76
-
77
- beforeDestroy: function() {
78
- this.updateLabelWidth('remove');
79
- }
80
- };
81
- </script>