easy3wui 2.0.9 → 2.0.12
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/Easy3wMFormPage/index.js +12 -9
- package/package.json +1 -1
|
@@ -28,11 +28,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
|
|
|
28
28
|
|
|
29
29
|
var Item = _antdMobile.Form.Item;
|
|
30
30
|
|
|
31
|
-
var
|
|
32
|
-
(0, _inherits3['default'])(
|
|
31
|
+
var Easy3wMFormPage = function (_Component) {
|
|
32
|
+
(0, _inherits3['default'])(Easy3wMFormPage, _Component);
|
|
33
33
|
|
|
34
|
-
function
|
|
35
|
-
(0, _classCallCheck3['default'])(this,
|
|
34
|
+
function Easy3wMFormPage(props) {
|
|
35
|
+
(0, _classCallCheck3['default'])(this, Easy3wMFormPage);
|
|
36
36
|
|
|
37
37
|
var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props));
|
|
38
38
|
|
|
@@ -40,7 +40,8 @@ var Easy3wMGridPage = function (_Component) {
|
|
|
40
40
|
var fieldType = item.fieldType,
|
|
41
41
|
childrenProps = item.childrenProps,
|
|
42
42
|
label = item.label,
|
|
43
|
-
options = item.options
|
|
43
|
+
options = item.options,
|
|
44
|
+
element = item.element;
|
|
44
45
|
|
|
45
46
|
if (fieldType === 'input') {
|
|
46
47
|
return _react2['default'].createElement(_antdMobile.Input, (0, _extends3['default'])({ placeholder: '\u8BF7\u8F93\u5165' + label }, childrenProps));
|
|
@@ -114,6 +115,8 @@ var Easy3wMGridPage = function (_Component) {
|
|
|
114
115
|
return _react2['default'].createElement(_antdMobile.Switch, childrenProps);
|
|
115
116
|
} else if (fieldType === 'textArea') {
|
|
116
117
|
return _react2['default'].createElement(_antdMobile.TextArea, childrenProps);
|
|
118
|
+
} else if (fieldType === 'else') {
|
|
119
|
+
return element;
|
|
117
120
|
}
|
|
118
121
|
};
|
|
119
122
|
|
|
@@ -121,11 +124,11 @@ var Easy3wMGridPage = function (_Component) {
|
|
|
121
124
|
return _this;
|
|
122
125
|
}
|
|
123
126
|
|
|
124
|
-
|
|
127
|
+
Easy3wMFormPage.prototype.componentWillUnmount = function componentWillUnmount() {};
|
|
125
128
|
// 渲染item的子内容
|
|
126
129
|
|
|
127
130
|
|
|
128
|
-
|
|
131
|
+
Easy3wMFormPage.prototype.render = function render() {
|
|
129
132
|
var _this2 = this;
|
|
130
133
|
|
|
131
134
|
var _props = this.props,
|
|
@@ -184,8 +187,8 @@ var Easy3wMGridPage = function (_Component) {
|
|
|
184
187
|
);
|
|
185
188
|
};
|
|
186
189
|
|
|
187
|
-
return
|
|
190
|
+
return Easy3wMFormPage;
|
|
188
191
|
}(_react.Component);
|
|
189
192
|
|
|
190
|
-
exports['default'] =
|
|
193
|
+
exports['default'] = Easy3wMFormPage;
|
|
191
194
|
module.exports = exports['default'];
|