UNPKG

@alicloud/cloud-charts

Version:

![](https://img.shields.io/npm/v/@alicloud/cloud-charts?color=%23ff8200)

58 lines (47 loc) 2.15 kB
'use strict'; import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose"; import * as React from 'react'; import classNames from 'classnames'; import { getStatusColorName } from '../common/common'; import chartLog from "../common/log"; import { isMobileWithProps } from "../common/platform"; import { FullCrossName, PrefixName } from '../constants'; import "./index.css"; var prefix = PrefixName + "-wminicontainer"; var Wminicontainer = /*#__PURE__*/function (_React$Component) { _inheritsLoose(Wminicontainer, _React$Component); function Wminicontainer(props) { var _this; _this = _React$Component.call(this, props) || this; // 图表初始化时记录日志 chartLog('Wminicontainer', 'init'); return _this; } var _proto = Wminicontainer.prototype; _proto.render = function render() { var _classNames; var _this$props = this.props, _this$props$height = _this$props.height, height = _this$props$height === void 0 ? 80 : _this$props$height, className = _this$props.className, status = _this$props.status, style = _this$props.style, isMobile = _this$props.isMobile, otherProps = _objectWithoutPropertiesLoose(_this$props, ["height", "className", "status", "style", "isMobile"]); var mainClasses = classNames((_classNames = {}, _classNames[FullCrossName] = true, _classNames["" + prefix] = true, _classNames[prefix + "-mobile"] = isMobileWithProps(this.props), _classNames[prefix + "-" + getStatusColorName(status)] = !!status, _classNames[className] = !!className, _classNames)); return /*#__PURE__*/React.createElement("div", _extends({ className: mainClasses, style: _extends({ minHeight: height, height: height }, style) }, otherProps), this.props.children); }; return Wminicontainer; }(React.Component); Wminicontainer.displayName = 'Wminicontainer'; Wminicontainer.defaultProps = { status: '' }; export { Wminicontainer as default };