UNPKG

@activatortube/react-native-form

Version:
40 lines (39 loc) 1.34 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); /** * form子项的基本类 * 2019-09-07 16:08. * * @author WheelerLee https://github.com/WheelerLee * @copyright 2019 */ import { Component } from 'react'; var BaseFormItem = /** @class */ (function (_super) { __extends(BaseFormItem, _super); function BaseFormItem(props, state) { var _this = _super.call(this, props, state) || this; _this.value = props.value; return _this; } BaseFormItem.prototype.isForm = function () { return true; }; BaseFormItem.prototype.componentWillReceiveProps = function (nextProps) { if (nextProps.value !== this.value) { this.value = nextProps.value; } }; return BaseFormItem; }(Component)); export default BaseFormItem;