@antv/f2
Version:
Charts for mobile visualization.
60 lines • 1.56 kB
JavaScript
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
var Component = /*#__PURE__*/function () {
function Component(props, context, updater) {
_classCallCheck(this, Component);
this.destroyed = false;
this.props = props;
this.state = {};
this.context = context;
this.updater = updater;
}
_createClass(Component, [{
key: "willMount",
value: function willMount() {}
}, {
key: "didMount",
value: function didMount() {}
}, {
key: "willReceiveProps",
value: function willReceiveProps(_props, context) {}
}, {
key: "willUpdate",
value: function willUpdate() {}
}, {
key: "didUpdate",
value: function didUpdate() {}
}, {
key: "render",
value: function render() {
return null;
}
}, {
key: "didUnmount",
value: function didUnmount() {}
}, {
key: "setState",
value: function setState(partialState, callback) {
this.updater.enqueueSetState(this, partialState, callback);
}
}, {
key: "forceUpdate",
value: function forceUpdate(callback) {
this.updater.enqueueForceUpdate(this, {}, callback);
}
}, {
key: "setAnimate",
value: function setAnimate(animate) {
this.animate = animate;
}
}, {
key: "destroy",
value: function destroy() {
this.destroyed = true;
}
}]);
return Component;
}(); // 标识是否是组件
// @ts-ignore
Component.prototype.isF2Component = true;
export default Component;