ukelli-ui
Version:
Base on React's UI lib. Make frontend's dev simpler and faster.
65 lines (64 loc) • 2.37 kB
JavaScript
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 __());
};
})();
import { Component, PureComponent } from 'react';
import { getUkelliConfig, setUkelliConfig, $T, $T_UKE } from '../config';
/**
* 用于提供所有 uke 组件的通用函数
* 通过继承 UkeComponent 或者 UkePureComponent 获取通用函数
*/
var UkeComponent = /** @class */ (function (_super) {
__extends(UkeComponent, _super);
function UkeComponent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
/** gm 将要弃用 */
_this.gm = $T;
/** 外部国际化键值对 $T() */
_this.$T = $T;
/** gmUke 将要弃用 */
_this.gmUke = $T_UKE;
/** uke 内部国际化键值对 $T_UKE() */
_this.$T_UKE = $T_UKE;
/** 获取 uke 内部配置 */
_this.getConfig = getUkelliConfig;
/** 设置 uke 内部配置 */
_this.setConfig = setUkelliConfig;
return _this;
}
return UkeComponent;
}(Component));
export { UkeComponent };
var UkePureComponent = /** @class */ (function (_super) {
__extends(UkePureComponent, _super);
function UkePureComponent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
/** gm 将要弃用 */
_this.gm = $T;
/** 外部国际化键值对 $T() */
_this.$T = $T;
/** gmUke 将要弃用 */
_this.gmUke = $T_UKE;
/** uke 内部国际化键值对 $T_UKE() */
_this.$T_UKE = $T_UKE;
/** 获取 uke 内部配置 */
_this.getConfig = getUkelliConfig;
/** 设置 uke 内部配置 */
_this.setConfig = setUkelliConfig;
return _this;
}
return UkePureComponent;
}(PureComponent));
export { UkePureComponent };
// export {
// UkeComponent, UkePureComponent
// };