@byteluck-fe/model-driven-controls 2.6.0-alpha.17 → 2.6.0-alpha.17b

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.
@@ -80,7 +80,9 @@ var AddressControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPrope
80
80
  _classCallCheck(this, AddressControlPropertyRuntimeRules);
81
81
  var _this;
82
82
  _this = _super.call(this, props);
83
- _this[0].type = 'object';
83
+ if (_this[0] !== undefined) {
84
+ _this[0].type = 'object';
85
+ }
84
86
  if (props.required && !props.isHide) {
85
87
  var valueValidate = {
86
88
  type: 'object',
@@ -151,7 +151,9 @@ var AmountPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRunti
151
151
  _classCallCheck(this, AmountPropertyRuntimeRules);
152
152
  var _this;
153
153
  _this = _super.call(this, props);
154
- _this[0].type = 'object';
154
+ if (_this[0] !== undefined) {
155
+ _this[0].type = 'object';
156
+ }
155
157
  var amountMax = props.rangeMax === '' ? undefined : props.rangeMax;
156
158
  var amountMin = props.rangeMin === '' ? undefined : props.rangeMin;
157
159
  _this.push({
@@ -101,7 +101,9 @@ var AttachmentControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPr
101
101
  _classCallCheck(this, AttachmentControlPropertyRuntimeRules);
102
102
  var _this;
103
103
  _this = _super.call(this, props);
104
- _this[0].type = 'array';
104
+ if (_this[0] !== undefined) {
105
+ _this[0].type = 'array';
106
+ }
105
107
  _this.push({
106
108
  type: 'array',
107
109
  max: props.maxLimit,
@@ -98,7 +98,9 @@ var CalcControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlProperty
98
98
  _classCallCheck(this, CalcControlPropertyRuntimeRules);
99
99
  var _this;
100
100
  _this = _super.call(this, props);
101
- _this[0].type = 'object';
101
+ if (_this[0] !== undefined) {
102
+ _this[0].type = 'object';
103
+ }
102
104
  _this.push({
103
105
  type: 'object',
104
106
  message: RulesMessage.getMessage('isNotObject'),
@@ -105,7 +105,9 @@ var CheckboxPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRun
105
105
  _classCallCheck(this, CheckboxPropertyRuntimeRules);
106
106
  var _this;
107
107
  _this = _super.call(this, props);
108
- _this[0].type = 'array';
108
+ if (_this[0] !== undefined) {
109
+ _this[0].type = 'array';
110
+ }
109
111
  _this.push({
110
112
  type: 'array',
111
113
  max: typeof props.limitMax === 'number' ? props.limitMax : undefined,
@@ -81,8 +81,10 @@ var DateRangePropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRu
81
81
  _classCallCheck(this, DateRangePropertyRuntimeRules);
82
82
  var _this;
83
83
  _this = _super.call(this, props);
84
- _this[0].type = 'object';
85
- if (!props.isHide) {
84
+ if (_this[0] !== undefined) {
85
+ _this[0].type = 'object';
86
+ }
87
+ if (props.required && !props.isHide) {
86
88
  _this.push({
87
89
  type: 'object',
88
90
  fields: {
@@ -79,7 +79,9 @@ var DepartmentPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyR
79
79
  _classCallCheck(this, DepartmentPropertyRuntimeRules);
80
80
  var _this;
81
81
  _this = _super.call(this, props);
82
- _this[0].type = 'array';
82
+ if (_this[0] !== undefined) {
83
+ _this[0].type = 'array';
84
+ }
83
85
  return _this;
84
86
  }
85
87
  return DepartmentPropertyRuntimeRules;
@@ -110,7 +110,9 @@ var Department2PropertyRuntimeRules = /*#__PURE__*/ function(BaseControlProperty
110
110
  _classCallCheck(this, Department2PropertyRuntimeRules);
111
111
  var _this;
112
112
  _this = _super.call(this, props);
113
- _this[0].type = 'array';
113
+ if (_this[0] !== undefined) {
114
+ _this[0].type = 'array';
115
+ }
114
116
  return _this;
115
117
  }
116
118
  return Department2PropertyRuntimeRules;
@@ -79,7 +79,9 @@ var EmployeeControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlProp
79
79
  _classCallCheck(this, EmployeeControlPropertyRuntimeRules);
80
80
  var _this;
81
81
  _this = _super.call(this, props);
82
- _this[0].type = 'array';
82
+ if (_this[0] !== undefined) {
83
+ _this[0].type = 'array';
84
+ }
83
85
  return _this;
84
86
  }
85
87
  return EmployeeControlPropertyRuntimeRules;
@@ -110,7 +110,9 @@ var Employee2ControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPro
110
110
  _classCallCheck(this, Employee2ControlPropertyRuntimeRules);
111
111
  var _this;
112
112
  _this = _super.call(this, props);
113
- _this[0].type = 'array';
113
+ if (_this[0] !== undefined) {
114
+ _this[0].type = 'array';
115
+ }
114
116
  return _this;
115
117
  }
116
118
  return Employee2ControlPropertyRuntimeRules;
@@ -125,7 +125,9 @@ var NumberControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlProper
125
125
  _classCallCheck(this, NumberControlPropertyRuntimeRules);
126
126
  var _this;
127
127
  _this = _super.call(this, props);
128
- _this[0].type = 'number';
128
+ if (_this[0] !== undefined) {
129
+ _this[0].type = 'number';
130
+ }
129
131
  var max = props.rangeMax !== '' ? props.rangeMax : undefined;
130
132
  var min = props.rangeMin !== '' ? props.rangeMin : undefined;
131
133
  _this.push({
@@ -110,7 +110,9 @@ var OrganizationSelectionPropertyRuntimeRules = /*#__PURE__*/ function(BaseContr
110
110
  _classCallCheck(this, OrganizationSelectionPropertyRuntimeRules);
111
111
  var _this;
112
112
  _this = _super.call(this, props);
113
- _this[0].type = 'array';
113
+ if (_this[0] !== undefined) {
114
+ _this[0].type = 'array';
115
+ }
114
116
  return _this;
115
117
  }
116
118
  return OrganizationSelectionPropertyRuntimeRules;
@@ -116,7 +116,9 @@ var ScoreControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropert
116
116
  _classCallCheck(this, ScoreControlPropertyRuntimeRules);
117
117
  var _this;
118
118
  _this = _super.call(this, props);
119
- _this[0].type = 'number';
119
+ if (_this[0] !== undefined) {
120
+ _this[0].type = 'number';
121
+ }
120
122
  // 如果是必填情况下,最小为1,非必填的情况下,最小为0
121
123
  var min = props.required ? 1 : 0;
122
124
  _this.push({
@@ -81,22 +81,26 @@ var SearchDateRangePropertyRuntimeRules = /*#__PURE__*/ function(BaseControlProp
81
81
  _classCallCheck(this, SearchDateRangePropertyRuntimeRules);
82
82
  var _this;
83
83
  _this = _super.call(this, props);
84
- _this[0].type = 'array';
85
- _this.push({
86
- type: 'array',
87
- fields: {
88
- 0: {
89
- type: 'string',
90
- required: props.required,
91
- message: _this[0].message
92
- },
93
- 1: {
94
- type: 'string',
95
- required: props.required,
96
- message: _this[0].message
84
+ if (_this[0] !== undefined) {
85
+ _this[0].type = 'array';
86
+ }
87
+ if (props.required && !props.isHide) {
88
+ _this.push({
89
+ type: 'array',
90
+ fields: {
91
+ 0: {
92
+ type: 'string',
93
+ required: props.required,
94
+ message: _this[0].message
95
+ },
96
+ 1: {
97
+ type: 'string',
98
+ required: props.required,
99
+ message: _this[0].message
100
+ }
97
101
  }
98
- }
99
- });
102
+ });
103
+ }
100
104
  return _this;
101
105
  }
102
106
  return SearchDateRangePropertyRuntimeRules;
@@ -80,7 +80,9 @@ var SearchNumberRangePropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPr
80
80
  _classCallCheck(this, SearchNumberRangePropertyRuntimeRules);
81
81
  var _this;
82
82
  _this = _super.call(this, props);
83
- _this[0].type = 'array';
83
+ if (_this[0] !== undefined) {
84
+ _this[0].type = 'array';
85
+ }
84
86
  _this.push({
85
87
  validator: function validator(rule, value) {
86
88
  if (props.required) {
@@ -89,7 +89,9 @@ var SelectMultipleControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseContr
89
89
  _classCallCheck(this, SelectMultipleControlPropertyRuntimeRules);
90
90
  var _this;
91
91
  _this = _super.call(this, props);
92
- _this[0].type = 'array';
92
+ if (_this[0] !== undefined) {
93
+ _this[0].type = 'array';
94
+ }
93
95
  return _this;
94
96
  }
95
97
  return SelectMultipleControlPropertyRuntimeRules;
@@ -128,7 +128,9 @@ var TreePropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRuntime
128
128
  _classCallCheck(this, TreePropertyRuntimeRules);
129
129
  var _this;
130
130
  _this = _super.call(this, props);
131
- _this[0].type = 'array';
131
+ if (_this[0] !== undefined) {
132
+ _this[0].type = 'array';
133
+ }
132
134
  return _this;
133
135
  }
134
136
  return TreePropertyRuntimeRules;
@@ -94,7 +94,9 @@ var VueFormItemPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlProperty
94
94
  _classCallCheck(this, VueFormItemPropertyRuntimeRules);
95
95
  var _this;
96
96
  _this = _super.call(this, props);
97
- _this[0].type = 'any';
97
+ if (_this[0] !== undefined) {
98
+ _this[0].type = 'any';
99
+ }
98
100
  return _this;
99
101
  }
100
102
  return VueFormItemPropertyRuntimeRules;
@@ -134,7 +134,9 @@ var WPSPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRuntimeR
134
134
  _classCallCheck(this, WPSPropertyRuntimeRules);
135
135
  var _this;
136
136
  _this = _super.call(this, props);
137
- _this[0].type = 'array';
137
+ if (_this[0] !== undefined) {
138
+ _this[0].type = 'array';
139
+ }
138
140
  return _this;
139
141
  }
140
142
  return WPSPropertyRuntimeRules;