@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
53 lines (52 loc) • 3.25 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 (Object.prototype.hasOwnProperty.call(b, 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 __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import React from 'react';
import { observer } from 'mobx-react';
import { InputNumber } from '@qn-pandora/pandora-component';
import { HoneycombLocale } from '../../../../constants/language/honeycomb/type';
import errorBoundary from '../../../../hocs/errorBoundary';
import { Form } from '../../../Common';
var Item = Form.Item;
var StyleElement = /** @class */ (function (_super) {
__extends(StyleElement, _super);
function StyleElement() {
return _super !== null && _super.apply(this, arguments) || this;
}
StyleElement.prototype.render = function () {
var _a = this.props.chartStyleService, _b = _a.maxRadius, maxRadius = _b === void 0 ? 100 : _b, _c = _a.minRadius, minRadius = _c === void 0 ? 10 : _c, distance = _a.distance, lineGroupNum = _a.lineGroupNum, honeycombNum = _a.honeycombNum;
return (React.createElement(React.Fragment, null,
React.createElement(Item, { label: HoneycombLocale.radius.max, field: "maxRadius" },
React.createElement(InputNumber, { value: maxRadius, min: minRadius, addonAfter: 'px' })),
React.createElement(Item, { label: HoneycombLocale.radius.min, field: "minRadius" },
React.createElement(InputNumber, { value: minRadius, min: 1, addonAfter: 'px' })),
React.createElement(Item, { field: "distance", label: HoneycombLocale.distance, explain: HoneycombLocale.distance_explain },
React.createElement(InputNumber, { value: distance, min: 0 })),
React.createElement(Item, { label: HoneycombLocale.group_num, field: "lineGroupNum" },
React.createElement(InputNumber, { value: lineGroupNum, min: 1 })),
React.createElement(Item, { label: HoneycombLocale.honeycomb_num, field: "honeycombNum" },
React.createElement(InputNumber, { value: honeycombNum, min: 1 }))));
};
StyleElement = __decorate([
observer
], StyleElement);
return StyleElement;
}(React.Component));
export { StyleElement };
export default errorBoundary(StyleElement);